terrorsathan Posted April 8, 2008 Share Posted April 8, 2008 Hi, I'm having the problem that php files in a specific folder won't get parsed. The ouput of the php files is just their source code with a text/plain header. Could someone explain me why it isn't working? Is there something wrong with the .htaccess file's content? I'd be very happy if someone could help me as soon as possible. Best regards Quote Link to comment Share on other sites More sharing options...
craygo Posted April 8, 2008 Share Posted April 8, 2008 How about some code form one of the pages. Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 One of the file's source code is just like a hello world (h.php): <?php echo "Hello, it works."; ?> And the ouput is exactly the content of the file. Regards Quote Link to comment Share on other sites More sharing options...
laffin Posted April 8, 2008 Share Posted April 8, 2008 sounds more like a web server configuration problem. Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 Hmm well but all the other files work (in a different directory). First I got a 500 error code (Internal Server Error) when I accessed a php file. So I created a .htaccess file with the following content: AddHandler application/x-httpd-php .php Now there isn't a error anymore, but the ouput is just plain source code. Regards Quote Link to comment Share on other sites More sharing options...
craygo Posted April 8, 2008 Share Posted April 8, 2008 how about some server specs OS? PHP version? APACHE or IIS? Ray Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 Here the info: Unix Apache/1.3.39 PHP 5 Quote Link to comment Share on other sites More sharing options...
craygo Posted April 8, 2008 Share Posted April 8, 2008 Is the folder inside of the web root IE www?? or somewhere under it. Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 Yeah, it's inside of the www root. Files in www/ work normally. Files in the folder www/upload/ won't work and all other directories like www/folder01/ work normally with parsing php files. Might there be a possibility to active the php file parsing with a htaccess file? Regards Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 8, 2008 Share Posted April 8, 2008 Is php running as an apache module or as cgi? Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 Is php running as an apache module or as cgi? I'm not 100%ly sure, sorry. My brother set up the server for me to use it and I'm not able to ask him now. Regards Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 8, 2008 Share Posted April 8, 2008 Cause if it's running as CGI, AddHandler application/x-httpd-php .php will do nothing, as far as i know. Is there any reason in specific that you have a custom htaccess file in that folder? If not, try removing it Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 Actually there was no htaccess file before. But without the htaccess file I made it returns the 500 error code. So removing it won't really help unfortunately ... Regards Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 No more ideas or solution? Might it be because of another htaccess file which blocks these files? Is it actually possible to disable php file parsing with htaccess files? Best Regards Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 8, 2008 Author Share Posted April 8, 2008 I just found something which might help: when I run a *.php5 file the following message is returned: Not Found The requested URL /cgi-bin/php5.cgi/php/server-up/uploadfolder/sathan.php5 was not found on this server. Looks like it's using cgi anyway? best regards Quote Link to comment Share on other sites More sharing options...
laffin Posted April 8, 2008 Share Posted April 8, 2008 more than likely uploadfolder is not allowed to run cgi/php. Quote Link to comment Share on other sites More sharing options...
terrorsathan Posted April 9, 2008 Author Share Posted April 9, 2008 more than likely uploadfolder is not allowed to run cgi/php. Hmm ok. And what do I need to do that files in that folder are allowed to get parsed? Is there a way to do it with htaccess? Best Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.