LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   php code exposed on browser (https://www.linuxquestions.org/questions/linux-general-1/php-code-exposed-on-browser-414451/)

Swakoo 02-12-2006 03:30 AM

php code exposed on browser
 
hi guys,

recentlyi have a web server that went down. so after restoring the OS etc... I uploaded back the scripts.

To my horror I realise scripts running off it.. the php codes are exposed. meaning to say, instead of the web page, or just static html, it is show the php code on viewing.

What am I missing,done wrong, screwed up here?

reddazz 02-12-2006 03:41 AM

Do you have the following lines in various sections of your httpd.conf?
Code:

LoadModule php5_module modules/libphp5.so (If you use php4 its libphp4.so)

AddType application/x-httpd-php .php

DirectoryIndex index.html index.php


ivanatora 02-12-2006 07:01 AM

Do the scripts are executable?
chmod +x script.php


All times are GMT -5. The time now is 11:06 AM.