PHP files in Debian Squeeze
Hello. I installed apache2, php5, mysql-server and phpmyadmin in Debian Squeeze using Synaptic. After that, I create a link to userdir.conf and userdir.load to /etc/apache2/mods-enabled so that i can store and run my PHP files in /home/user/public_html. But when I tried to browse my files in a browser, a dialog box asking me whether to open or save the file appears. But if I try to open phpmyadmin, it correctly display the page. How can i configure it to display the PHP file which resides in public_html in my browser? Thanks in advance.
|
Are you pointing your web browser at the http server or directly at the file?
Eg Code:
http://localhost/~user/somefile.php Code:
file:///home/user/public_html/somefile.php If the later: You should not expect it to work since php is server side interpreted. Evo2. |
Thank evo2. Yes, libapache2-mod-php5 is installed in my system. I type in address bar this:
Code:
http://localhost/~user/info.php Code:
<?php |
I put a # in the php_admin_value engine Off of /etc/apache2/mods-enabled/php5.conf like this:
Code:
<IfModule mod_userdir.c> |
Quote:
Cheers, Evo2. |
Thanks evo2 for the reply. Is it the same as
Code:
php_admin_value engine On |
Quote:
answer you will need to read the documentation and check all your apache config files. Evo2. |
Thanks for the advice evo2. Will mark it now as solved.
|
All times are GMT -5. The time now is 02:01 PM. |