PHPBuilder - Apache on WIN32 Page 2



RSS Twitter
Articles Setup And Installation

Apache on WIN32 - Page 2

by: Brian Moon
|
July 30, 2000

Setting Up PHP3
There is a readme that comes with PHP3 on doing this. I will however walk through it here as well. There is a file called php3.ini-dist that came in the zip file. Copy that file to your 'windows' or 'winnt' folder. Rename it php3.ini. You will need to edit this file. The main thing is to load any modules that you want to use in PHP3 such as mysql. To do this, find the section in the .ini file that reads like:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; if you wish to have an extension loaded automatically, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so

Following that will be several commented out lines. For example:


;Windows Extensions
;extension=php3_mysql.dll
;extension=php3_nsmail.dll
;extension=php3_calendar.dll
;extension=php3_dbase.dll


More than likely, all you need to do is uncomment the ones that you need. In my case, I needed mysql enabled. So, I removed the ; from the line ;extension=php3_mysql.dll. If for some reason there is a dll that you need to load that is not listed, simply put it in here like:

extension=mydll.dll

Ok, so PHP3 is now ready to go.
Setting Up Apache To Use PHP3
Remember I told you that you would need to get to the folder where you installed Apache? Well, it is now time. Open up your favorite text editor. The open the file called httpd.conf. It will be in the conf folder under the folder in which you installed Apache. In our case it will be at 'c:\apache\conf\httpd.conf'. For a full determination of what all this stuff does, see the Apache documentation. You need to add 3 lines to this file:

ScriptAlias /php3/ "c:/php306/"
Action application/x-httpd-php3 "/php3/php.exe"
AddType application/x-httpd-php3 .php3

You can copy and paste the last two. In the first one you will need to put the actual path to the folder where you installed PHP3. Save this file and you are ready to try it out.

« Previous Page
1
|
2
|
3
|
4
|
5
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Brian Moon

Comment:



Comment:

(Maximum characters: 1200). You have characters left.