error imagecreatefromjpeg
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!
-
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. 0 -
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 0 -
You might check this link to see if it's of any use to you: stackoverflow.com/questions/14003404/imagecreatefromjpeg-not-working 0 -
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? 0 -
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'..
Were you able to verify if an error_log file exists in the same directory as the PHP script you are testing? Thank you.0 -
yes it is the same directory cause i only have one website :(:( 0 -
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. 0 -
how can i open a conversation with you? 0 -
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. 0 -
Thanks!! 0
Please sign in to leave a comment.
Comments
10 comments