Page 1 of 1

php 5.0.4 win32..how to .......problem..help

Posted: Sun Apr 24, 2005 3:36 am
by crazytopu
Hi I just upgraded from php4.3.4 win32 to php5.0.4 win32

But i am having little touble getting the configuration right for the newer version.

I followed the instruction below:

Code: Select all

Copy php5_ts.dll to your windows\system32 directory 
Copy php.ini-dist to your WINDOWS directory- rename it to php.ini 

Open php.ini in an editor and at a minimum change extension_dir to: c:\php\extensions

I recommend quoting your values. ie: extension_dir=&quote;c:\php\extensions&quote;
Close php.ini file. 


Download apache from http://www.carfield.com.hk/mirror/apache/httpd/binaries/win32/
And click on apache_1_3_#-win32-no_src.msi
Install apache in C:\Program Files\Apache Group\Apache

Check if the apache server is running ok by going to your brower’s address bar and typing http://localhost

Open php.ini file again: 
Set the 'doc_root' to point to your web servers 
document_root. ex: C:\Program Files\Apache Group\Apache\htdocs 
use no quote this time. 
close php.ini file. 


open G:\Program Files\Apache Group\Apache\conf\httpd.conf file: 
Just add the following lines to your httpd.conf:

LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Teh above instructions was meant to be for version 4.3.4 So I applied a little sense and figured out for the newer version it would be like


LoadModule php5_module c:/php/php5apache.dll
AddModule mod_php5.c
AddType application/x-httpd-php .php

and also, since there is not directory called extensions I made extension_dir="c:\php\ext"

When I ran apache-test, i got no syntax error, but yet, my php files are not being recognised as php. I am simply getting all the code output as plain text.

Any clue?

Posted: Sun Apr 24, 2005 4:58 am
by Chris Corbyn
:arrow: Moved to Apache, IIS, Web Servers :?

Posted: Sun Apr 24, 2005 10:38 am
by phpScott
this what i have httpd.conf
# For PHP 5 do something like this:
LoadModule php5_module "e:/php5/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "e:/php5"
you will have to change your paths