The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error imagecreatefromjpeg

Discussion in 'EasyApache' started by garrablanka, Apr 12, 2017.

  1. garrablanka

    garrablanka Member

    Joined:
    Apr 12, 2017
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chile
    cPanel Access Level:
    Website Owner
    hello, i have this code:

    echo '1';
    $file = 'localr/093294d3.jpg';
    echo '2';
    $img = imagecreatefromjpeg($file);
    echo '3';
    $new = imagecreatetruecolor(500,500);
    echo '4';
    imagecopy($new,$img,0,0,0,0,500,500);
    imagejpeg($new);
    imagedestroy($new);

    The output is just '12', so I realized that the problem is 'imagecreatefromjpeg'...

    the phpinfo output:

    --enable-gd-native-ttf

    GD Support->enabled
    GD Version->bundled (2.1.0 compatible)
    FreeType Support->enabled
    FreeType Linkage->with freetype
    FreeType Version->2.3.11
    T1Lib Support->enabled
    GIF Read Support->enabled
    GIF Create Support->enabled
    JPEG Support->enabled
    libJPEG Version->6b
    PNG Support->enabled
    libPNG Version->1.2.49
    WBMP Support->enabled
    XPM Support->enabled
    libXpm Version->30411
    XBM Support->enabled
    WebP Support->enabled

    I dont understand... help please!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,285
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You may want to check with the developer or support team for the PHP script you are using to see if any other PHP extensions are required. Also, do you notice any error messages in /usr/local/apache/logs/error_log or in the error_log file within the document root of the script when reproducing the issue?

    Thank you.
     
  3. garrablanka

    garrablanka Member

    Joined:
    Apr 12, 2017
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chile
    cPanel Access Level:
    Website Owner
    Hi Michael
    We only work in PHP and we think we dont need other PHP extensrions, we only have installed gb.
    This is very strange cause the output of '/usr/local/apache/logs/error_log' is empty.
    When its reading the code, just stop when starts 'imagecreatefromjpeg'..

    any other recommedation please?
    thanks you
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,617
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might check this link to see if it's of any use to you:
    stackoverflow.com/questions/14003404/imagecreatefromjpeg-not-working
     
  5. garrablanka

    garrablanka Member

    Joined:
    Apr 12, 2017
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chile
    cPanel Access Level:
    Website Owner
    Thanks Michael but its not working :(:(
    Previously I used a shared hosting and the code works perfectly and now i use a vps and the code doesnt work.. :eek:
    Do you think this is a wrong cofiguration?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,285
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Were you able to verify if an error_log file exists in the same directory as the PHP script you are testing?

    Thank you.
     
  7. garrablanka

    garrablanka Member

    Joined:
    Apr 12, 2017
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chile
    cPanel Access Level:
    Website Owner
    yes it is the same directory cause i only have one website

    :(:(
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,285
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Do you notice any different error output when testing with the PHP script referenced on the URL below? EX:

    stackoverflow.com/questions/14003404/imagecreatefromjpeg-not-working

    Thank you.
     
  9. garrablanka

    garrablanka Member

    Joined:
    Apr 12, 2017
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chile
    cPanel Access Level:
    Website Owner
    how can i open a conversation with you?
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,285
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You can click on a profile name, and then click on "Start A Conversation". Keep in mind you should not share any login details or identifying information about the server on the forums. Instead, you'd open a support ticket using the link in my signature if you'd like us to take a closer look at the affected system.

    Thank you.
     
    garrablanka likes this.
  11. garrablanka

    garrablanka Member

    Joined:
    Apr 12, 2017
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chile
    cPanel Access Level:
    Website Owner
Loading...

Share This Page