[PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Robert Sossomon
Here's the code for the page... while ($file = readdir($handle)) { for ($i = 0; $i < count($extensoes); $i++) { if (eregi("\.". $extensoes[$i] ."$", $file)) { $array[] = $file; } } } closedir($handle); sort($array); reset($array); // takes the objects in the array and randomizes them $

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread John Nichel
Robert Sossomon wrote: > // this is the path of your files folder. Change 'pathofile' > $dir = "images/"; I would make this the path from root, ie... $dir = "/root/path/images/"; // takes the objects in the array and randomizes them $arrayobj = array_rand($array); $random = $array[$arrayobj]; //

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Robert Sossomon
John Nichel is quoted as saying on 11/30/2004 2:17 PM: $width = imagesx($path)/4; $height = imagesy($path)/4; $width = imagesx($path)/4; $height = imagesy($path)/4; When I run it in the browser, I get: Fatal error: Call to undefined function: imagesx() in c:\fourh\spotlight3.php on line 31 when

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 14:43:51 -0500, Robert Sossomon <[EMAIL PROTECTED]> wrote: > Fatal error: Call to undefined function: imagesx() in c:\fourh\spotlight3.php > on > line 31 Do print_r( gd_info() ); to see if your PHP has support for working with images. -- Greg Donald Zend Certified Engineer

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Chris
imagesx() requires an image resource , not a file path. so you'd need to use one of the imagecreatefrom* functions to create the resource. But it looks like all you want is the width and height of an image If so use get imagesize() ( which *does* except a pathname, not a resource) Chris h

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread John Nichel
Robert Sossomon wrote: When I run it in the browser, I get: Fatal error: Call to undefined function: imagesx() in c:\fourh\spotlight3.php on line 31 when i run it from the command line I get: C:\fourh>php.exe spotlight3.php Content-type: text/html X-Powered-By: PHP/4.3.9 Warning: imagesx(): su

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Robert Sossomon
Chris is quoted as saying on 11/30/2004 2:53 PM: imagesx() requires an image resource , not a file path. so you'd need to use one of the imagecreatefrom* functions to create the resource. But it looks like all you want is the width and height of an image If so use get imagesize() ( which *

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-12-01 Thread Richard Lynch
Robert Sossomon wrote: > Chris is quoted as saying on 11/30/2004 2:53 PM: >> imagesx() requires an image resource , not a file path. so you'd need >> to use one of the imagecreatefrom* functions to create the resource. >> >> But it looks like all you want is the width and height of an image >