Support » Plugins » image processing.php line 12 PLS HELP.

  • Resolved loveglass

    (@loveglass)


    Hi, I am having a problem with uploading product images. It gives me error with “Fatal error: Out of memory (allocated 34078720) (tried to allocate 13056 bytes) in /homepages/7/d259763837/htdocs/wordpress/wp love-glass/wp-content/plugins/wp-e-commerce/image_processing.php on line 12
    When I go to Editing wp-e-commerce/image_processing.php it tells me it’s inactive?! I don’t know why and where I shall switch it on? And then I don’t understand what’s wrong on line 12? Could you pls have a look and help with it?!
    <?php
    function image_processing($image_input, $image_output, $width = null, $height = null,$imagefield=”) {
    global $wpdb;
    /*
    * this handles all resizing of images that results in a file being saved, if no width and height is supplied, then it just copies the image
    */
    $imagetype = getimagesize($image_input);
    if(file_exists($image_input) && is_numeric($height) && is_numeric($width) && function_exists(‘imagecreatefrompng’) && (($height != $imagetype[1]) && ($width != $imagetype[0]))) {
    switch($imagetype[2]) {
    case IMAGETYPE_JPEG:
    //$extension = “.jpg”;
    $src_img = imagecreatefromjpeg($image_input);
    $pass_imgtype = true;
    break;

    Thanks for help

Viewing 15 replies - 1 through 15 (of 18 total)
  • fix the memory issue 1st
    add this line to wp-config.php

    define('WP_MEMORY_LIMIT', '64M');

    Oh, thank you. Trouble is I don’t know where to edit wp-config.php?!?! Where is it?

    in your wordpress root

    in file wp-config.php does it matter where I will paste the line or not? and also I remember, last time when I was editing wp-config. there was some trick about saving file and putting back on ftp account? thank you

    put the line right after

    <?php
    // ** MySQL settings ** //

    if editing in host’s file manager – just save it

    if you downloaded to your computer – save it and upload it back to site

    thank you very much, appreciate your help.
    will do 🙂

    after i’ve done what you said it’s still giving me this error

    Fatal error: Out of memory (allocated 34078720) (tried to allocate 3264 bytes) in /homepages/7/d259763837/htdocs/wordpress/wp love-glass/wp-content/plugins/wp-e-commerce/image_processing.php on line 12

    any ideas?

    try changing 64M to 96M

    stiil the same

    // ** MySQL settings – You can get this info from your web host ** //
    define(‘WP_MEMORY_LIMIT’, ’96M’);
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘db301422293’);

    is there something wrong?

    thank u

    well then your host must not allow this method
    ask them to bump the php memory for you

    ok thanks

    Do you know why is it trying to allocate the image in d259763837 when my db is db301422293′)? My available storage space is 99.4 MB. 😐

    d259763837 is just a server designation – nothing to do with amount of space

    the error is specific to low php memory

    Try doing it by adding the following line in your .htaccess file:

    php_value memory_limit 64M

    i couldn’t get the .htaccess file from server through Fetch. I remember i have to rename it or something like that. What’s the trick guys pls. thanks ps. working in mac

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘image processing.php line 12 PLS HELP.’ is closed to new replies.