[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gulliver] apache php


From Sylvain Collilieux <sylvain dot collilieux at wanadoo dot fr>
Subject Re: [gulliver] apache php
Date Sat, 05 Mar 2005 16:20:32 +0100

le-sens-commun a écrit Le 05.03.2005 15:54 :
Rien n'y fait :
apache ne veux pas interpréter le php.
Je ne sais pas comment faire.

Quelqu'un connait-il un tutoriel complet et efficace ?


Dans ce cas, la première documentation à aller voir, c'est le répertoire /usr/share/doc/nondupaquet/. C'est vrai pour toutes les distribs. Ces répertoires contiennent un grand nombre de réponses.

Pour ton cas, voilà ce que dit cette doc sous DEBIAN

less /usr/share/doc/php4/README.Debian
[...]
Problems with Apache not being configured properly after installing PHP4
------------------------------------------------------------------------

Sometimes (pretty much always, actually), Apache isn't configured out of the
box to handle php scripts in a manner that people might expect.  You need to
do the following things in httpd.conf to get it working as you might expect.

1. Uncomment the LoadModule line, if it's commented out:

LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

2. Uncomment (and possibly edit) the AddType lines for PHP and PHP-source
handling.  If you need more extensions, you can list them all on the
same line,
as shown below:

AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps

3. If you want "index.php" (and possibly others) to work as directory
indexes,
you'll need to edit the DirectoryIndex line to look something like the
following
(edit to taste; if you use SSI, for instance, don't forget .shtml too):

DirectoryIndex index.php index.phtml index.php3 index.html
[...]


Après avoir fait les modifs, il faut redémarrer Apache.



-- Sylvain Jabber: sylvain at jabber dot fr

Attachment: signature.asc
Description: OpenPGP digital signature