Le problème c’est que j’ai copié collé du fichier texte install.txt dans mon fichier php.ini J’ai fais une installation par défaut, quand je lance php.exe Apache est deja en cour d’exécution. Si on accède à un fichier php il est affiché dans sont intégralité en mode texte.
Voilà ça marche pas…
Extrait de l’install.txt Web server configuration ========================
Installing PHP on Windows with Apache 1.3.x
There are two ways to set up PHP to work with Apache 1.3.x on Windows. One is to use the CGI binary (php.exe), the other is to use the Apache module dll. In either case you need to stop the Apache server, and edit your srm.conf or httpd.conf to configure Apache to work with PHP.
Although there can be a few variations of configuring PHP under Apache, these are simple enough to be used by the newcomer. Please consult the Apache Docs for further configuration directives.
If you unzipped the PHP package to C:\PHP\ as desribed above, you need to insert these lines to your Apache conf file to set up the CGI binary:
Remember to restart the server, for example, NET STOP APACHE followed by NET START APACHE
If you would like to use PHP as a module in Apache, you should move php4ts.dll to the windows/system (for Windows 9x/Me) or winnt/system32 (for Windows NT/2000) directory, overwriting any older file. Then you should add the following two lines to you Apache conf file:
Remember to restart the server, for example, NET STOP APACHE followed by NET START APACHE
To use the source code highlighting feature, simply create a PHP script file and stick this code in: <?php show_source("original_php_script.php" ); ?> Substitute original_php_script.php with the name of the file you wish to show the source of. (This is the only way of doing so).
On Win-Apache all backslashes in a path statement such as: "c:\directory\file.ext", must be converted to forward slashes.
Marsh Posté le 27-08-2001 à 18:12:59
Sujet : Apache et php
J’ai installé la dernière version d’Apache ainsi que de PHP4
Quand je lance php.exe j’ai le message d’erreur :
PHP: Error parsing D:\WINNT\php.ini on line 358
Ligne :368 | ScriptAlias /php/ "cphp/"
369 | AddType application/x-httpd-php .php
370 | Action application/x-httpd-php "php.exe"
Le problème c’est que j’ai copié collé du fichier texte install.txt dans mon fichier php.ini
J’ai fais une installation par défaut, quand je lance php.exe Apache est deja en cour d’exécution. Si on accède à un fichier php il est affiché dans sont intégralité en mode texte.
Voilà ça marche pas…
Extrait de l’install.txt
Web server configuration
========================
Installing PHP on Windows with Apache 1.3.x
There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (php.exe),
the other is to use the Apache module dll. In either case
you need to stop the Apache server, and edit your
srm.conf or httpd.conf to configure Apache to work with PHP.
Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Docs for further
configuration directives.
If you unzipped the PHP package to C:\PHP\ as desribed
above, you need to insert these lines to your Apache conf
file to set up the CGI binary:
ScriptAlias /php/ "cphp/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
Remember to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE
If you would like to use PHP as a module in Apache,
you should move php4ts.dll to the windows/system (for Windows 9x/Me)
or winnt/system32 (for Windows NT/2000) directory, overwriting any
older file. Then you should add the following two lines to you Apache
conf file:
LoadModule php4_module cphp/sapi/php4apache.dll
AddType application/x-httpd-php .php
Remember to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE
To use the source code highlighting feature, simply create a PHP
script file and stick this code in:
<?php show_source("original_php_script.php" ); ?>
Substitute original_php_script.php with the name of the
file you wish to show the source of. (This is the only way of
doing so).
On Win-Apache all backslashes in a path statement such
as: "c:\directory\file.ext", must be converted to
forward slashes.
----------------------------------------------------------
Voilà...