PHP source code was shown on the webpage - security issue ?
I am not sure this is my setting problem, I am using ISPConfig version 2.2.24
1) I have enable php globally and uncheck the PHP Scripts and PHP Safe Mode options in one of my virtual site, say www.example.com
2) There is a test.php program in the /var/www/example.com/web/
When I visit the virtual site www.example.copm/test.php, the source code of test.php shows up. I feel very unsafe that the php source code reveal to any visitors?
This is a problem with your settings.
1) If you uncheck the php option in the site settings then PHP is disabled and you see the sourcecode. hats the intended behaviour of disabling PHP ;) Enable it and it in the site settings and it should work properly. You can not enable php globally, take a look at the perfect setup guide and configure your server properly as described there.
# AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
so, is it inevitable to show the php source code or I must remove any .php programs under /web ? This might be inconvenience for temporary disable php function per virtual website!
Again, by experiment I found that if "AddType application/x-httpd-php .php" was remarked in /etc/httpd/conf.d/php.conf, and disable (uncheck) the php script of one virtual site (www.example.com) in ispconfig UI, the .php program source will be displayed on that website; like www.example.com/test.php.
I have tried php4 and php5 in different server, will there be any gentlemen/ladies give me an advice?
Which distribution are you using?
and for ServerB
I have followed the installation guide
for /etc/httpd/conf.d/php.conf which only with this
LoadModule php4_module modules/libphp4.so
and in Server B
LoadModule php5_module modules/libphp5.so
Does this information help?
Looks ok. What's in your Vhosts_ispconfig.conf? Can you go to the directory where Vhosts_ispconfig.conf is located and post the output of
You could use a .htaccesss file to disable all access to *php
It is the intention that php source code is shown if you disable php, as php is DISABLED theb. So if you want to upload PHP files to a website you should enable php as it is absolutely useseless to upload php files to a website were you disabled php in the site settings.
|All times are GMT +2. The time now is 14:22.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.