Running as a server module
1. Download PHP5 for Windows (binary zip pkg)
2. Extract the distribution file to a directory of your choice (C:\php).
3. If you are using any php extension dlls then you will need those as well. To make sure that the dlls can be found, you can either copy them to the system directory (e.g. winnt/system32 or windows/system) or you can make sure that they live in the same directory as the main php executable or dll your web server will use (e.g. php.exe, php5apache.dll). The latter is much easier. If I am going to use any extensions, I typically copy them from the C:\php\ext folder to the C:\phpfolder that was created in step 2.
Code: Select all
Note: There have only been two files that have given me fits in the past, and they deal with the GD Library extension for images. I'm not sure if this has been fixed in PHP5 as I have not tested it yet. Go ahead and try using image functions after copying the related dlls from the C:\php\ext folder to the C:\phpfolder that was created in step 2. If you have difficulties, copy libeay32.dll and ssleay32.dll to the Windows root directory (C:\WINDOWS as instructed in the Image functions pages of the PHP manual.
# Edit your php.ini file. This is where you are going to personalize your PHP installation. I am only including what I might call "bare minimum" changes here. First, let's search through the php.ini file for these directives and update them accordingly. Note, if your paths and/or filenames are different, update accordingly:
Code: Select all
doc_root = "C:\Program Files\Apache Group\Apache2\htdocs"
extension_dir = "c:\php\"
; created my own directory so I can
; manage cleanup of temporary session files:
session.save_path = "C:\Program Files\Apache Group\Apache2\htdocs\tmp"
Code: Select all
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mysql.dll
Code: Select all
[mail function]
; For Win32 only.
; This can be used if you are running the
; Windows SMTP service (see IIS):
;SMTP = localhost
; Otherwise, use the external server for
; now (Note: Change to yours!):
SMTP = mail.myserver.com
;
; For Win32 only. (Note: Change to yours!):
sendmail_from = [email protected]
;
; For Unix only. You may supply arguments
; as well (default: "sendmail -t -i").
;sendmail_path =
;
; Force the addition of the specified parameters
; to be passed as extra parameters
; to the sendmail binary. These parameters will
; always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_paramaters =
Code: Select all
127.0.0.1 localhost
Anyone care to contribute more...?