Shared PHP folder all of a sudden prompting to download
I have a shared php directory where I stick some php files that I use on multiple sites (like a captcha image, html editor, etc).
I have an Alias folder setup in my httpd.conf file like this:
Alias /sys-images/ /home/****/shared-scripts/images/
Then, on any site, I can access images and scripts by doing this:
one_of_my_sites.com/sys-images/myimage.jpg
Or...
one_of_my_sites.com/sys-images/captcha.php
All of a sudden, I think last night, or over the past couple days... any access to php files stopped working. (the images still work) It started prompting to download the file instead of executing it. I dont know what changed, but a whole bunch of stuff on the server doesnt work now.
I changed the PHP 5 Handler from dso to suphp (since all my other servers are configured that way) and it didnt help.. now instead of prompting to download, it just gives an Error 500 premature script headers error.
Does anyone know how I can fix this?
-
I changed it back to dso and the captcha image is working, but if I try to access a php file in the shared folder, its prompting the php file download. If I open it, you can see all the php code. This wasnt happening a week ago. Hoping someone has a suggestion soon, this is bad since people can now download my php files. :( 0 -
FIXED. All of a sudden, a .htaccess file appeared automatically in the folder with this in the contents: php_value engine off php_value engine off I never added this, it just appeared. :( I removed it and now it works. 0 -
Hello, I am happy to see you were able to resolve the issue. Note that you may want to consider uploading a copy of those files to each account instead of sharing a directory, as sharing a directory is not always the most secure method of accessing files. Thank you. 0 -
So this problem keeps happening over and over. Randomly, a new .htaccess file is automatically created and it sticks this contents in the file: php_value engine off php_value engine off I dont know how its being created or why it keeps appearing. Any ideas? 0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments