FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP Image suddenly doesn't work?





bdoneck
It happened a while ago, but I use a tunnel system on the forums of my game for images (i.e. if someone posts the image http://www.site.com/me.jpg it will go through my tunnel to disallow scripts and show up as http://www.mysite.com/tunnel.php?img=http://www.site.com/me.jpg) It suddenly stopped working a while ago after no changes to my script and I get an error 500 when i go to the tunnel page with a valid image in the form.

Please help!

Thanks.
Daniel15
Make sure your script is CHMOD'ded to 0755. A script won't run if it is set to 0777

Use your FTP client or cPanel File Manager to do this.
Bondings
As daniel15 said, that 500 error is most likely a permission problem. Some settings regarding this have been changed a while ago. This causes insecure permissions to give a 500 error instead of being executed.
bdoneck
I changed it to 0755 but it still wont work...
Bondings
You need to make sure that if you make a temporary file or something similar, that the permissions are ok.

Please give us more details if you want to get more help.
bdoneck
Okay, sorry, my tunnel script to display images in a forum (i.e. the user uses a bbcode like code to display images and i make it display <img src=tunnel.php?img=their_image_location so it can go through my site and scripts can be disabled) suddenly stopped working on this server and i have made no changes to the script.

right now i havent added the part to disable scripts so its very simple and is just this
Code:
<?php

header('image/jpeg');
readfile($_GET['img']);

?>


It used to work and suddenly stopped a few weeks ago.

Tanks for the help.
Bondings
If I'm not mistaken, this feature has been disabled on this server because it's quite easy to abuse (happened already).

And, by the way, how can an image file execute scripts?
bdoneck
its very easy to make an image file have scripts.

all you have to do is make it a php image file or anything of that sort.

using a tunnel will allow me to disable the image if it is not a jpg, png, gif, or other image extension.
n0obie4life
http://www.spywire.net/tutorials/dynamicsig.html

Bondings, that.
Daniel15
Since you're getting an 'Internal Server Error', check your error log via cPanel or DirectAdmin. It should say what the error actually is.
Related topics
E-Cards with PHP & MySQL
PHP Image Upload (MySQL/Folder)
php image exif functions
Am I wired for life ?
PHP image
Computers at school
Make your own MasterCard "Priceless" commercial
Describe your typical day at work
Why Javascript inside php that opened with ajax doesn;t refr
Double margin bug. display: inline; doesn't work
Opening any image with PHP. Couldn't find anywhere.
Image Script not working.
Resize image in PNG Problem
xMPACT! PHP Image Viewer 1.0
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.