PHP on Windows

start > Best Practices > Software > PHP > PHP Windows

PHP Windows

Created by gattis. Last edited by gattis, one year and 315 days ago. Viewed 8 times. #4
[diff] [history] [delete] [lock] [view] [edit] [new] [copy] [rdf]

Getting the config file to work

Most people suggest getting the 'zipped' package. This is fine, but it requires a few steps, such as making sure the php.ini location is in the right place. You can fined this information after setup by displaying a phpinfo() page.

Configuration File (php.ini) Path = C:WINDOWS

You will see a lot on the internet about specifying your config file location with registry settings, but they had no effect in our environment. Go ahead and put your config file there.

The -recommended file made phpinfo fail. Use the -dist instead.

Also - make sure to set

; Defines the default timezone used by the date functions
date.timezone = America/New_York
or you will get GMT in your apps

Adding MySQL

  • Add the mysql bin to the system path
  • Change the php.ini to load the mysql.dll
Rumor has it that you have to add this to your system path
E:Program FilesMySQLMySQL Server 5.1bin

It has to do with PHP needing to see, (or the DLL you configure below) the file libmySQL.dll

You also have to edit your php.ini and specify the extension_dir and uncomment php_mysql.dll

… … extension_dir = "E:Program Filesphp-5.2.4-Win32ext" … … extension=php_mysql.dll … …