...

View Full Version : cron job wont run imagecreatefrompng



mull300
03-30-2007, 11:39 PM
So i have a script on my server that creates a set of images from one. When the script is called in the browser the script runs fine. When it runs as a cron job it fails.

now to see if i am getting an error i ran the script from the command prompt as the same user that is running the cron job. and i get this error

call to undefined function: imagecreatefrompng()

but this works in the browser!!! any ideas?

mlseim
03-31-2007, 05:17 AM
Specifically, how do you "call" the script?

If you're using your browser to do something like: makephoto.php?photo=mypic.png

And you're doing the same thing with the CRON, the method you use
in your PHP script (to read the variable $photo) may be your problem.

Example:

$photo=$_POST['photo'];
$photo=$_GET['photo'];
$photo=$_REQUEST['photo'];

If you're not sure whether to use POST or GET, use REQUEST ... that
will handle all incoming variables.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum