Page 1 of 1

[phpinfo]: problem.

Posted: Thu Apr 19, 2007 8:25 am
by cheikhbouchihda
Hello,
I've installed apache2 and php5, under Debian sarge, as fellows:

Code: Select all

# aptitude install apache2 php5 libapache2-mod-php5
After that, I've registred the test.php srcipt in the directory /var/www
<?php
//test.php
phpinfo();
?>

But when I do, in command ligne:

Code: Select all

lynx http://debian/test.php
I get at the end of the screen:
application /x-httpd-php
D)ownload C)ancel
but not the phpinfo as normal.
So, I've edited the /etc/apache2/apache2.conf file and added the ligne:

Code: Select all

AddType application/x-httpd-php .php .inc

In sprite of that, I don't abtain the phpinfo page when I type http://debian/test.php ine the address of the firefox, for example.
So, what I must I do to have the phpinfo page ?
Thanks in advence for the help.

Posted: Thu Apr 19, 2007 11:37 pm
by califdon
1. Did you configure Apache2's Document Root?

2. Addressing Firefox that way bypasses Apache, so it won't interpret PHP. You must address it like: /localhost/test.php then it will go to the Apache server and look in its Document Root for the file test.php and preprocess it.