|
Installation of extensions on Windows
After installing PHP and a web server on Windows, you will probably want to
install some extensions for added functionality. You can choose which
extensions you would like to load when PHP starts by modifying your
The DLLs for PHP extensions are prefixed with Many extensions are built into the Windows version of PHP. This means additional DLL files, and the extension directive, are not used to load these extensions. The Windows PHP Extensions table lists extensions that require, or used to require, additional PHP DLL files. Here's a list of built in extensions: In PHP 4 (updated PHP 4.3.11): BCMath, Caledar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML and Zlib In PHP 5 (updated PHP 5.0.4), the following changes exist. Built in: DOM, LibXML, Iconv, SimpleXML, SPL and SQLite. And the following are no longer built in: MySQL and Overload.
The default location PHP searches for extensions is
Note:
If you are running a server module version of PHP
remember to restart your web server to reflect your changes to The following table describes some of the extensions available and required additional dlls. Table 4.1. PHP Extensions
Code Examples / Notes » install.windows.extensionssopp_ladios
[editor note: this should be fixed in PHP 5.1.0] The order of the extensions listed in php.ini is causing problems... one must check that a particular extension A is enabled and above extension B if B requires A to be enabled. The original ordering doesnt make sure that this always happens (ie, A is above B) I came into this problem when I tried to enable the exif extension under windows. I knew mbstring is required but I kept getting errors even after I enabled both. The problem can only be fixed by moving the mbstring line above the exif line... glenn65535
When confronted with the problem "PHP Warning: PHP Startup: Unable to load dynamic library './php_mysql.dll' - Access is denied.\r\n in Unknown on line 0" I found I had to make the permissions "chmod.exe 755 php_mysql.dll" (This is on a Windows XP, but I am running Cygwin). freddo
We tried to install PHP 4 ISAPI Module on IIS 6 on a Windows Server 2003 SP2 at the office. The only way we found out to make these extensions work, is by putting the extensions DLLs in the System32\inetsrv in the Windows directory. We did the same previously with the php4isapi.dll and php4ts.dll to make PHP work. The system was asking for a password previously. We cannot explain it, it seems like a problem only occuring with SP2 installed because we never had this problem before. Giving the right permission to the PHP and extensions folders didn't do anything good. It always gave use a permission denied error. We even tried to give full control to Everyone on the PHP folder, same result. I hope it can help. jma59
Under windows, given an error similar to PHP Warning: PHP Startup: Unable to load dynamic library 'c:\\php\\ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 When PHP definitely should be able to find the module, it's fairly common knowledge that this error can also be caused by certain dlls not being in the PATH. These dlls (usually libeay32 and ssleay32) are generally found in your base php directory, and the modern windows installers add the base php directory to the PATH so that you don't need to worry about it. However, if when installing earlier versions you decided on moving libeay32, ssleay32 et al to C:\Windows\System32 instead of changing the PATH, then php will still end up with the old versions and the out of date versions will cause the same error as above. Don't fall into the trap like I did. elsint
Installing PHP5.1.6 on an IIS5.1 system. Some extensions are not working because of registry(like LDAP). You need to create a registry file named: "inifilepath.reg" Content should be the 3 lines under,be sure to define your PHP path correct: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\PHP] "IniFilePath"="C:\\PHP" After creating this file, double click it, click yes, and restart IIS. Hopefully this might solve problem for some, as it solved for me. jerryg
Installing PHP extensions for IIS for the first time is sort of a baptism by fire -- you will get your hands dirty, and other suitable metaphors of nastiness. Hopefully, you won't have to spend too many days googling around fora and restarting IIS 10 million times as I did until I finally realized both what was going on and what crazy things I'd done wrong. THIS (peter)guy really goes into terrific detail and troubleshooting, (with very good reasons and explanations of extension dependencies not listed on the current php page you're now reading): http://www.peterguy.com/php/install_IIS6.html Most of this is applicable for IIS5.1 as well, as far as I've found. The main problem I'd been butting my head up against was extensions being reported as not found, even though the .DLLs were definitely in C:\PHP\ext, and my PATH env var was setup correctly. The error messaging during dynamic loading of implicitly-linked libraries should be more specific, telling you that in fact it is a particular dependency of a dependency which is missing -- usually some obscure third-party .dll -- and name it! Eventually I stopped being so greedy and just cut down on the extensions I thought I needed by commenting them out in php.ini. That eliminated the startup errors. Apparently some of these extensions or their requirements, which either come with the base PHP install zip or the PECL extensions, are either too obscure or too fragile to be necessary anyway. Good luck, and I hope anyone who runs into the same trouble can hit upon this or Peter Guy's page directly before they go too crazy. hevesir
If You try to install PHP5 to IIS6 with Oracle.... Then You need some kind of pilot-exams, not for big planes, just a little one. So: After installations (php.ini is correct see above ie.: extenstion = php_oci8.dll etc) If You use anonymous access, You'll have a builtin user to use it. Make this user local administrator, or give minimum read access to PHP folder (ie.: c:\php) and ORAHOME (ie. c:\ora92) folders. If You use Windows Integrated authentication, give for Domain Users minimum read access to PHP folder (ie.: c:\php) and ORAHOME (ie. c:\ora92) folders. Goog luck. yye yeyuancn2
I just installed PHP5.2 + Apache2.2 + MySQL5 on Windows XP. Three imporatant things. 1. I tryed to put php.ini in windows directory like in early version. But php can't load it and using default values only. After I put php.ini into php installation directory, everything is fine. 2. You still need to copy libmysql.dll to windows\system32 directory for the mysql extension to work. 3. Don't forget for apache 2.2, you need php5apache2_2.dll instead of php5apache2.dll. simi_def
I had problems with PHP5/Apache2.2/MySQL 5 installation on a WinXp machine. I got the Fatal error: call to undefined function - mysql_connect(). message Solution : 1, use correct version of ext\php_mysql.dll and libmysql.dll 2, !!! edit the CORRECT php.ini (%windir%\php.ini) like c:\windows\php.ini !!! 3, add php installation dir to PATH 4, edit php.ini to load extension php_mysql.dll use <?php phpinfo(); ?> to check. |
Change LanguageWindows Installer (PHP 5.2 and later) Windows Installer (PHP 5.1.0 and earlier) Manual Installation Steps ActiveScript Microsoft IIS / PWS Apache 1.3.x on Microsoft Windows Apache 2.0.x on Microsoft Windows Sun OmniHTTPd Server Sambar Server on Microsoft Windows Xitami on Microsoft Windows Building from source Installation of extensions on Windows |