Ok, recently I switched servers, and I had a security code script setup for users to login, by typing in the numbers displayed on a jpg that was generated by PHP's GD extension. It worked on the other server. And this server has the GD extension installed, so wtf is wrong?

This is the error I get

Warning: imagecreatefromjpeg([url]http://phpublisher.net/images/code_bg.jpg[/url]): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/phpublis/public_html/Modules/Members/img.php on line 4

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/phpublis/public_html/Modules/Members/img.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at /home/phpublis/public_html/Modules/Members/img.php:4) in /home/phpublis/public_html/Modules/Members/img.php on line 6

Warning: imagestring(): supplied argument is not a valid Image resource in /home/phpublis/public_html/Modules/Members/img.php on line 7

Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/phpublis/public_html/Modules/Members/img.php on line 8

Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/phpublis/public_html/Modules/Members/img.php on line 9

The url inside createfromjpeg DOES exist, if u copy it and paste into browser address bar, it goes to the image, but the script says thqt it does NOT exist...Whats even more puzzeling is that I have the same script setup on the same server, on the another account, and it works fine. I checked to see if it was just not grabbing the image, and canged the url to grab the same image on another server and it worked, but the that image HAS to be where it needs to be recieved..Any ideas on whats going on and why its doing this?

    Um, why are you requesting it via a URL (and thus requiring an entire http request-response transaction between the web server and itself)? Couldn't you just read the file itself?

      Write a Reply...