PHP 5.6.18 is available

Instalación de extensiones en Windows

Después de instalar PHP y un servidor web en Windows, es probable que desee instalar algunas extensiones para mayor funcionalidad. Puede elegir cuales extensiones desea cargar cuando PHP inicia modificando php.ini. También puede cargar un módulo dinámicamente en el script con dll().

Las DLL para las extensiones de PHP tienen el prefijo php_.

Algunas extensiones son construidas dentro de la versión de Windows de PHP. Esto significa que los ficheros DLL adicionales, y la extensión directiva, no se utiliza para cargar estas extensiones. En la tabla de Windows las extensiones PHP son enumeradas las extensiones que se requieren, se utilizan, ficheros PHP DLL adicionales. Aquí hay una lista de extensiones construidas:

En PHP 4 (actualización de PHP 4.3.11): BCMath, Caledar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML y Zlib

En PHP 5 (actualización de PHP 5.0.4), existen los siguientes cambios. Contruidos en: DOM, LibXML, Iconv, SimpleXML, SPL y SQLite. Y a continuación se enumeran los no construidos en: MySQL y Overload.

La ubicación predeterminada de las búsquedas PHP para las extensiones es C:\php4\extensions en PHP 4 y C:\php5 en PHP 5. Para cambiar estos parámetros reflejando la configuración de PHP, edite el fichero php.ini:

  • Tendrá que cambiar los parámetros de la extension_dir para apuntar al directorio donde está la extensión, o donde tenga localizado el fichero php_*.dll. Por ejemplo:

    extension_dir = C:\php\extensions

  • Habilite la extensión(s) en php.ini que desea utilizar descomentando las siguientes líneas extension=php_*.dll en php.ini. Esto se hace mediante el borrado de la cabecera, desde la extensión que desea cargar.

    Ejemplo #1 Habilitar la extensión Bzip2 para PHP-Windows

    // cambiar la siguiente línea de ...
    // ... to

  • Algunas de las extensiones de archivos necesita DLL extras para trabajar. Un par de ellos se puede encontrar en el paquete de distribución, en la carpeta C:\php\dlls\ en PHP 4 o en la carpeta principal en PHP 5, pero algunos, por ejemplo Oracle requieren (php_oci8.dll) ficheros DLL que no se incluyen con el paquete de distribución. Si va a instalar PHP 4, copie el paquete DLL de la carpeta C:\php\dlls a la carpeta principal C:\php. No se olvide de incluir en el sistema C:\php PATH (Este proceso se explica por separado en Preguntas Frecuentes de entrada).

  • Algunos de estos DLLs no se incluye con la distribución de PHP. Consulta cada página de documentación de las extensiones para más detalles. Además, lea el manual sección titulada Instalación de extensiones PECL para más detalles sobre PECL. Un gran número de extensiones de PHP se encuentran en PECL, y estas extensiones requieren una descarga independiente .

Nota: Si está ejecutando un servidor de la versión de PHP como módulo recuerde reiniciar su servidor web para reflejar los cambios a php.ini.

En la tabla siguiente se describen algunas de las extensiones disponibles y las dlls adicionales.

Extensiones de PHP
Extensión Descripción Notas
php_bz2.dll Funciones de compresión bzip2 Nada
php_calendar.dll Funciones de conversión Calendario Construido a partir de PHP 4.0.3
php_crack.dll Funciones Crack Nada
php_ctype.dll Funciones familiares ctype Construido a partir de PHP 4.3.0
php_curl.dll Funciones de la libreria cliente URL CURL Requiere: libeay32.dll, ssleay32.dll(incluido)
php_dba.dll DBA: Funciones de Capa de abstracción de la Base de datos (dbm-style) Nada
php_dbase.dll Funciones dBase Nada
php_dbx.dll Funciones dbx  
php_domxml.dll Funciones de domxml para PHP 4 PHP <= 4.2.0 Requiere: libxml2.dll (incluido) PHP >= 4.3.0 Requiere: iconv.dll (incluido)
php_dotnet.dll Funciones de .NET PHP <= 4.1.1
php_exif.dll FuncionesEXIF php_mbstring.dll. y, php_exif.dll se debe cargar después de php_mbstring.dll en php.ini.
php_fbsql.dll Funciones FrontBase PHP <= 4.2.0
php_fdf.dll FDF: Formato de datos de formularios de funciones. Requiere: fdftk.dll (incluido)
php_filepro.dll Funciones filePro Acceso de sólo lectura
php_ftp.dll Funciones FTP Incorporado desde PHP 4.0.3
php_gd.dll Funciones de libreria de imagen GD Eliminada en PHP 4.3.2. También tenga en cuenta que las funciones de color verdadero no están disponibles en GD1, utilice en su lugar php_gd2.dll.
php_gd2.dll Funciones de libreria de imagen GD GD2
php_gettext.dll Funciones Gettext PHP <= 4.2.0 requiere gnu_gettext.dll (incluido), PHP >= 4.2.3 requiere libintl-1.dll, iconv.dll (incluido).
php_hyperwave.dll Funciones HyperWave Nada
php_iconv.dll Conversión de caracteres ICONV Requiere: iconv-1.3.dll (incluido), PHP >=4.2.1 iconv.dll
php_ifx.dll Funciones Informix Requiere: Librerias Informix
php_iisfunc.dll Funciones de administracion IIS Nada
php_imap.dll POP3 y Funciones NNTP IMAP Nada
php_ingres.dll Funciones Ingres Requiere: Librerias Ingres
php_interbase.dll Funciones InterBase Requiere: gds32.dll (incluido)
php_java.dll Funciones Java PHP <= 4.0.6 requiere: jvm.dll (incluido)
php_ldap.dll Funciones LDAP PHP <= 4.2.0 requiere libsasl.dll (incluido), PHP >= 4.3.0 requiere libeay32.dll, ssleay32.dll (incluido)
php_mbstring.dll Funciones Multi-Byte String Nada
php_mcrypt.dll Funciones Mcrypt Encryption Requiere: libmcrypt.dll
php_mhash.dll Funciones Mhash PHP >= 4.3.0 requiere: libmhash.dll (incluido)
php_mime_magic.dll Funciones Mimetype Requiere: magic.mime (incluido)
php_ming.dll Funciones para Flash Ming Nada
php_msql.dll Funciones mSQL Requiere: msql.dll (incluido)
php_mssql.dll Funciones MSSQL Requiere: ntwdblib.dll (incluido)
php_mysql.dll Funciones MySQL PHP >= 5.0.0, requiere libmysql.dll (incluido)
php_mysqli.dll Funciones MySQLi PHP >= 5.0.0, requiere libmysql.dll (libmysqli.dll en PHP <= 5.0.2) (incluido)
php_oci8.dll Funciones Oracle 8 Requiere: Librerias cliente Oracle 8.1+
php_openssl.dll Funciones OpenSSL Requiere: libeay32.dll (incluido)
php_overload.dll Funciones de sobrecarga de objetos de PHP 4 Incluido desde PHP 4.3.0, eliminado a partir de PHP 5.0.0
php_pdf.dll Funciones PDF Nada
php_pgsql.dll Funciones PostgreSQL Nada
php_shmop.dll Funciones Shared Memory Nada
php_snmp.dll Funciones SNMP Solo NT !
php_soap.dll Funciones SOAP PHP >= 5.0.0
php_sockets.dll Funciones Socket Nada
php_sybase_ct.dll Funciones Sybase Requiere: librerias cliente Sybase
php_tidy.dll Funciones Tidy PHP >= 5.0.0
php_tokenizer.dll Funciones Tokenizer Construido a partir de PHP 4.3.0
php_w32api.dll Funciones W32api Nada
php_xmlrpc.dll Funciones XML-RPC PHP >= 4.2.1 requiere: iconv.dll (incluido)
php_xslt.dll Funciones de XSLT PHP <= 4.2.0 requiere sablot.dll, expat.dll (incluido). PHP >= 4.2.1 requiere sablot.dll, expat.dll, iconv.dll (incluido).
php_yaz.dll Funciones YAZ Requiere: yaz.dll (incluido)
php_zip.dll Ficheros Zip incluido Acceso de sólo lectura
php_zlib.dll Funciones de compresión ZLib Construido a partir de PHP 4.3.0

add a note add a note

User Contributed Notes 14 notes

jwagner at digilog dot de
1 year ago
On Windows hosts libeay32.dll and ssleay32.dll have to be path-accessible for php_curl.dll to work correctly. Copying them into System32 (or even into the Windows main directory) is a bad hack (and does not even work with newer PHP versions). The right way to do it, is to add the PHP path to the Windows *Path* variable. In *Control Panel* --> *System* click on *Advanced System Settings* and use the button *Environment Variables*. Under *System Variables* you will find the *Path* variable. Edit it and append `;C:/PHP` to it - or whatever the path to your PHP root folder is.
6 years ago
I had problem with extensions - they don't loaded (without errors) on Windows installation and don't displayed in phpinfo().

Solve: full-specified directory name for extension_dir directive - "c:/php/ext/" instead "./"
8 years ago
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):

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.
7 years ago
I just recently tried to upgrade my php install on WinXP using the php-5.2.6-win32-installer.msi and with fingers crossed, tried to see if things still worked or not.

Unfortunately, they didn't.  I did see many posts here and elsewhere on the web regarding the error message:

"Unable to load dynamic link library 'ext\php_xxxxx.dll' - The specified module could not be found." says in the past when upgrading to simply copy over new php files, but now recommends using the windows installer.  Maybe the installer isn't quite up to the task yet.

My fix:

1. Completely uninstall current version of php (using Windows Control Panel > Add or Remove Programs).

2. Download the current php binaries for Windows (at under Windows Binaries).  Should be format: PHP 5.x.x zip package.  Again, download the binaries, NOT the installer.

3. Follow these easy steps

4. Set your PATH for Windows to find php (if you haven't already):
a. Right-click on My Computer
b. Properties
c. Advanced Tab > Environment Variables
d. Under System variables, scroll down to find "Path", select and click on Edit
e. Add path to your php install on the end (make sure to precede with semi-colon ";").  Mine was ";G:\Apache\php"
f. Click Okay.  (then "Okay" on each of the other open windows).

5. Test php install. (see ricocheting link above for testing).

6. Getting the extensions to work again:
a. Open php.ini
b. uncomment each extension, restart Apache.

7. Special note on libmysql.dll and problems getting MySQL to work:
- You may have copied over this file into your Windows/System32 (or WINNT/System32 for me) to get mysql to work in the past.  If so, replace it with the most recent version you get with the upgrade (in top dir).
- If this is a fresh install, copy the libmysql.dll into your System32 folder.

Couple notes:
1. The above tutorial link is to install php 5.x on Apache 2.2 for Win.  If you're running Apache 2.0 like me, pay special attention to "Editing Apache Conf File" for correct LoadModule info.
2. If you ran the installer previously, double check your Apache conf where the php5 LoadModule stuff is.  The installer might have messed with this a bit.

I hope this stuff helps.
smaines at alaya dot com
7 years ago
== Problem

Consider the following from an httpd.conf file...

  LoadModule php5_module "E:/xyz/php/php5apache2_2.dll"
  PHPIniDir "E:/xyz/php"

...which led to the dreaded...

  PHP Warning:  PHP Startup: Unable to load dynamic library 'E:\\xyz\\php\\ext\\php_mysql.dll' - The specified module could not be found.

Note, however, that PHP.exe apparently was found and executed php pages in Apache, but the MySQL functions therein failed.

== Solution

Because PHP dir was not in $PATH, php5apache2_2.dll failed to find php_mysql.dll (the only extension I enabled) during Apache 2.2 start.

== Caveat (!)

The BIG issue is that, setting $PATH in...

  <desk icon>My Computer
  <rt click>Properties
  <button>Environment Variables

...didn't export the $PATH change such that restarting the Apache service (in MMC) would pick it up.  So I tested the working solution (adding PHP dir to $PATH), but it failed because of HOW I set it. It succeeded only when I REBOOTED after changing the $PATH.  There may be an easier way that this, but I do not know it at present.

== Comment

Consider whether PHP dir should need to be in $PATH at all, when PHP.exe apparently was found and executes php pages in Apache, but php5apache2_2.dll failed to find whatever was needed to load the extensions.  This should perhaps be addressed.

Note that on a WAMP installation (W2K,Apache,MySQL,PHP), only PHP is required in $PATH.
vatozana at yahoo dot com
5 years ago
I had problems registering Curl extentions and it was cause by the old dll of libeay32.dll and  ssleay32.dll  which were already in my c:\windows\system32 I replaced them and all is now fine!!
simi_def at c2 dot hu
9 years ago
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().


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

to check.
ole berge at web de
1 year ago


Windows Server 2012 R 64 bit
2 years ago
If you have problems, that windows-extensions can not be loaded (PHP Warning: PHP Startup: Unable to load dynamic library) and you are sure, the .ddl is in the right place, use ProcessMonitor (

here you can see at startup, which files php tries to find and in which locations php tries to find them!
Manda Krishna Srikanth
8 years ago
As far as my experience says, 95% of ext\php_mysql.dll - The specified module could not be found - error can be sorted out on Win 2003, IIS 6, PHP5.2.

Replace the php_mysql.dll and libmysql.dll downloaded from into extensions directory.

For MSSQL connectivity problems, replace the ntwdblib.dll in php dir with the one copied from system32 directory. Ofcourse the filesize will be less, no problem, replace it.
jma59 at cam dot ac dot uk
8 years ago
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.
6 years ago
I had a problem with the gd and mysqli mods on my PHP5.2/Apache2.2/Windows 2003 server. Even after enabling the options in the php.ini file and restarting the Apache service, the mods still would not load. I even tried to restart the Windows 2003 server that php is loaded on - and no go. After reviewing the system path variables in Windows, I noticed that the c:\php directory was set in the path variable, but not the folder for the gd, mysqli and others mods. So I added c:\php\ext to the path variable and rebooted the server. THAT FIXED IT!!
guy dot paddock at redbottledesign dot com
9 months ago
Note that if you're trying to install PECL HTTP on Windows, you will need to install:

- php_http
- php_ssh2
- php_propro
- php_raphf

Make sure that all plug-ins were compiled for your version of PHP (version number, whether or not it's thread-safe, etc). Otherwise, they will fail to load.

The version of PHP that comes with Acquia Dev Desktop is the thread-safe version, so all plug-ins must be thread safe (TS). I had to use an older release of php_http (2.3.2) to get the TS version.

For the other extensions, I had to make sure some of them loaded BEFORE php_http in the php.ini file:

rafaurl at gmail dot com
5 years ago
I got the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_curl.dll'

By using sysinternals procmon I saw that it failed after trying to load "zlib.dll". I found this file deployed with other software (in my case, Miranda IM) and copied it to the PHP installation directory. It worked fine after that. Hope that helps.
To Top