From 90a922b8fdb085b46a6be3a11b84798a9d3e6c56 Mon Sep 17 00:00:00 2001 From: Aidan Lister Date: Tue, 28 Sep 2004 12:00:49 +0000 Subject: [PATCH] Changes to reflect bug #29694. Also reworded and reorganised instructions. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@169431 c90b9560-bf6c-de11-be94-00142212c4b1 --- install/windows/apache1.xml | 96 +++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/install/windows/apache1.xml b/install/windows/apache1.xml index 61bc7eb0e7..4f37abf19e 100644 --- a/install/windows/apache1.xml +++ b/install/windows/apache1.xml @@ -1,17 +1,17 @@ - + Apache 1.3.x on Microsoft Windows This section contains notes and hints specific to Apache 1.3.x installs - of PHP on Microsoft Windows systems. We also - have instructions and notes - for Apache 2 on a separate page. + of PHP on Microsoft Windows systems. There are also + instructions and notes + for Apache 2 on a separate page. - You should read the manual - installation steps first! + Please read the manual + installation steps first! @@ -19,7 +19,7 @@ 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 for PHP 4 and php-cgi.exe for PHP 5), - the other is to use the Apache module DLL. In either case + the other is to use the Apache Module DLL. In either case you need to edit your &httpd.conf; to configure Apache to work with PHP, and then restart the server. @@ -54,42 +54,66 @@ PHP as an Apache 1.3.x module + + This assumes PHP is installed to c:\php. Adjust the + path if this is not the case. + + + For PHP 4: + + + + For PHP 5: + + + + + + For both: + + + conditional brace +AddType application/x-httpd-php .php + +# For syntax highlighted .phps files, also add +AddType application/x-httpd-php-source .phps ]]> - - You may find after using the Windows installer for Apache that you need - to define the AddModule directive for - mod_php4.c. This is especially important if the - ClearModuleList directive is defined, which you will - find by scrolling down a few lines. You will see a list of - AddModule entries, add the following line - at the end of the list: AddModule - mod_php4.c. For PHP 5, instead use AddModule - mod_php5.c - - - If you would like to use the source code highlighting feature, you need - to add the following line to your &httpd.conf;: - AddType application/x-httpd-php-source .phps. - This should be inserted at the same place where you inserted - AddType application/x-httpd-php .php above). With - this setup, all files served with the .phps extension - will be syntax highlighted for the browser. - + + + PHP will first search for &php.ini; in the directory defined by the + PHPRC system enviroment variable. Failing to find + it there, it will search the Windows system directory, then the Apache folder. + + + + Setting the <constant>PHPRC</constant> Enviroment Variable: + + Right-click My Computer and select Properties. + Click Advanced, then Enviroment Variables. + Under System Variables, select New. + Name the variable PHPRC, with the value of + c:\php (or the directory containing your &php.ini;). + The computer will need to be rebooted to take effect. + + @@ -129,11 +153,9 @@ SetEnv PHPRC C:/php If you would like to present PHP source files syntax highlighted, there is no such convenient option as with the module version of PHP. If you chose to configure Apache to use PHP as a CGI binary, you - will need to use the show_source function. To + will need to use the highlight_file function. To do this simply create a PHP script file and add this code: - <?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. + <?php highlight_file('some_php_script.php'); ?>.