2009-11-27 6 views
7

Questo sta diventando un problema molto frustrante. Sto cercando di fare un'installazione pulita di apache 2.2 e PHP 5.2.11. Tutto sembra essere configurato correttamente, ma i moduli PHP non stanno iniziando ...Avvio di PHP: impossibile caricare la libreria dinamica, Windows, Apache 2.2, php 5.2.11

PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0

nel php.ini

include_path = ".;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\php" 
extension_dir = ".;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/" 

Tutti i file ci sono ... I file dll come ssleay32.dll, libmcrypt.dll, libmysql.dll, libeay32.dll sono installati a ...

C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/

I li ho anche inclusi nella C: \ Windows \ System32

e anche aggiunto C:/Programmi (x86)/Apache Software Foundation/Apache2.2/php/al percorso di Windows.

Non ho idea del motivo per cui questo non funziona e sembra una situazione senza vincita. Qualcuno ha qualche idea su come far funzionare tutto ok?

risposta

10

Prova questa:

extension_dir = "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/" 

senza partire con il .;

+0

Questo ha funzionato di nuovo. ora devo solo capire perché OpenSSL e paypalewp non funzionano bene anche dopo un'installazione pulita ... Grazie per la risposta –

+0

Felice di aiutare! Invia un'altra domanda sui tuoi problemi di OpenSSL se non riesci a risolverlo. Forse qualcuno qui intorno può aiutarti. :) –

+0

Grazie mille funziona come un fascino !! –

1

Solo per il mio futuro auto, se no-altro. Questo è con PHP 5.2.13 in esecuzione in Windows su IIS 8.

ho ottenuto il seguente errore:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_openssl.dll' - The specified module could not be found.

Da phpinfo() file php.ini caricato era C:\Program Files (x86)\PHP\php.ini.

La directory di estensione:

extension_dir ="C:\Program Files (x86)\PHP\ext" 

Queste sono state le ultime due righe del file php.ini:

[PHP_SQLSRV] 
extension=php_sqlsrv_52_nts_vc6.dll 
[PHP_OPENSSL] 
extension=php_openssl.dll 

I file php_openssl.dll e php_sqlsrv_52_nts_vc6.dll si trovano nella directory ext. Il php_openssl.dll non è corrotto (è la stessa dimensione del file di quella su un'altra macchina che funziona).

PHP troverà la DLL sqlsrv ma non la DLL di openssl. Non ho idea del perché. Nessuna quantità di riavvio di IIS ha fatto nulla.

La soluzione fino a quando non so è stato installare l'estensione openssl.dll utilizzando il programma di installazione di Windows PHP. È possibile rieseguire il programma di installazione e selezionare "Cambia" e consente di aggiungere o rimuovere le librerie. Non riesco a vedere alcuna differenza nel file o nel file php.ini ora, ma ora il file viene caricato.

ho il sospetto che in realtà il mio problema era simile a questo comment about OpenSSL installation on Windows:

At this point, when you start Apache it will attempt to load php_openssl.dll, but if your setup is anything like mine you will see an error. I prefer to start Apache manually, and the error appears in a dialog box: "The ordinal 4114 could not be located in the dynamic link library LIBEAY32.dll". (I'm not sure whether you would get this message if you started Apache as a service). The Apache log also contains an error message saying that php_openssl.dll cannot be loaded, though that message doesn't name libeay32.dll. Welcome to DLL Hell.

Libeay32.dll enters the picture because php_openssl.dll depends on it (and also on ssleay32.dll). What I think happens is that Apache first tries to load php_openssl.dll programmatically from the path specified by the extension_dir key. But then, the loading of the so-called dependent DLLs is left to Windows' default mechanism. If Windows finds an incompatible version of a dependent DLL, you get the error.

ho notato errori su ssleay32.dll quando si tenta di eseguire php -i dalla riga di comando. Ho solo dato per scontato che non ce l'avesse nell'ambiente.IIS non ha fatto menzione di eventuali errori ssleay32.dll nei suoi registri.

+0

Sì! ha funzionato. Ho eseguito Apache da cmd con il comando 'x: \ xampp \ apache \ bin \ httpd.exe -d x:/xampp/apache' copiato da Task Manager, colonna' riga di comando'). Ha gettato errori per entrambe le DLL. Ho dovuto copiare 'ssleay32.dll' e' libeay32.dll' da php dir ad apache \ bin. Grazie! –

1

Basta togliere il commento alla extension_dir in php.ini

enter image description here

0

stessi errori avuto, ma invece di copiare file aggiunti cartella php per percorso di sistema e ricostruito il server.

Problemi correlati