[phpinfo]: problem.

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
cheikhbouchihda
Forum Commoner
Posts: 51
Joined: Thu Mar 02, 2006 2:08 pm
Location: France.

[phpinfo]: problem.

Post 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.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post 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.
Post Reply