Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't access images in php on a linux platform.

Status
Not open for further replies.

whirlpool6

Technical User
Sep 2, 2007
58
0
0
JP
hello everyone, i have posted something like this before but that was a mess and i would like to start from the very beginning.

i am deploying a php application in an apache web server on a linux platform. now i need to access images through urls in my php code and do some resizing. but i cant access the image. i only get this warning.

Warning: imagecreatefromjpeg( [function.imagecreatefromjpeg]: failed to open stream: HTTP request failed! HTTP/1.1 401 Access Denied in /usr/local/apache2/htdocs/iv_stage_fritz/try.php on line 14

but i can access this image on the browser. and i can also ping trialhost.

pls help me on this... this is very urgent...

hoping for a reply... thanks a lot.
 
Sounds like your server has mod_security enabled? Try adding this code to your .htaccess file. Remember, this is a random stab in the dark. Probably best if you could post a phpinfo.php file link so we can get some more details.

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
 
Oops, just saw it was localhost. Scratch the phpinfo link...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top