Reply to Re: cron not working with php+gd

Your name:

Reply:


Posted by jdbartlett on 08/20/07 19:42

On Aug 20, 1:41 pm, push...@gmail.com wrote:
> I'm trying to run the following php code along with gd library as a
> cron job ,but cron is not generating any output.
> When I run this code from my browser I get an image correctly.
> Somebody please tell me what needs to be done to get an image via cron
> job.
> <?php
> //Header("Content-type: image/png");
> $height = 300;
> $width = 300;
> $im = ImageCreate($width, $height);
> $bck = ImageColorAllocate($im, 10,110,100);
> $white = ImageColorAllocate($im, 255, 255, 255);
> ImageFill($im, 0, 0, $bck);
> ImageLine($im, 0, 0, $width, $height, $white);
>
> for($i=0;$i<=299;$i=$i+10) {
> ImageLine($im, 0, $i, $width, $height, $white); }
>
> ImagePNG($im,"x.png");
> ?>

Does the user with this cron job have permission to create/overwrite
the file "x.png"?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация