2016-03-26 15 views
6

Il framework PHP che utilizzo necessita di OpenSSL per varie funzionalità, ma quando si esegue qualcosa correlato a OpenSSL, viene visualizzato il seguente errore: "Impossibile trovare l'ordinale 372 in DLL -file C: \ wamp64 \ bin \ apache \ apache2.4.17 \ bin \ openssl.exe ".Impossibile trovare l'ordinale 372 in WAMP/Apache's openssl.exe

Non so come correggere questo, ho già cercato dappertutto. Apprezzerei l'aiuto, perché non so come risolvere questo problema.

+0

Vedere anche [Wamp2 e "L'ordinale 942 non può essere posizionato nella libreria di collegamento dinamico LIBEAY.dll"] (http://stackoverflow.com/q/6178815/608639), [WAMPx64/Openssl Ordinal 372 non può essere localizzato] (http://stackoverflow.com/q/38046271/608639), [Impossibile trovare l'ordinale 372 in WAMP/Apache's openssl.exe] (http://stackoverflow.com/q/36238887/608639), ["Impossibile trovare l'ordinale 112 nella libreria di collegamento dinamico ..."] (http://stackoverflow.com/q/36163468/608639), ecc. – jww

risposta

1

... "Can't find ordinal 372 in DLL-file C:\wamp64\bin\apache\apache2.4.17\bin\openssl.exe"

sto speculando sua PEM_SealInit o SSL_CONF_cmd_argv da OpenSSL 1.0.2; oppure ASN1_i2d_fp o SSL_SESSION_set1_id_context da OpenSSL 1.1.0.

# OpenSSL 1.1.0 
$ find $PWD -type f -iname '*.num' -exec grep " 372" {} \; 
ASN1_i2d_fp        372 1_1_0 EXIST::FUNCTION:STDIO 
SSL_SESSION_set1_id_context    372 1_1_0 EXIST::FUNCTION: 
... 

# OpenSSL 1.0.2 
$ find $PWD -type f -iname '*.num' -exec grep " 372" {} \; 
PEM_SealInit       372 EXIST::FUNCTION:RSA 
SSL_CONF_cmd_argv      372 EXIST::FUNCTION: 
... 

Sarà necessario verificarlo utilizzando dumpbin o Dependency Walker. Vedi anche How can I find the exported function name from ordinal (export by ordinal)? su Stack Overflow.


Gli ordinali vengono creati utilizzando <openssl src>\util\mkdef.pl. Puoi vedere il codice sorgente dalla presenza di GitHub di OpenSSL. Here is 1.0.2 e here is 1.1.0.

Ecco i commenti di testa per il file:

#!/usr/local/bin/perl -w 
# 
# generate a .def file 
# 
# It does this by parsing the header files and looking for the 
# prototyped functions: it then prunes the output. 
# 
# Intermediary files are created, call libcrypto.num and libssl.num, 
# The format of these files is: 
# 
# routine-name nnnn vers info 
# 
# The "nnnn" and "vers" fields are the numeric id and version for the symbol 
# respectively. The "info" part is actually a colon-separated string of fields 
# with the following meaning: 
# 
# existence:platform:kind:algorithms 
# 
# - "existence" can be "EXIST" or "NOEXIST" depending on if the symbol is 
# found somewhere in the source, 
# - "platforms" is empty if it exists on all platforms, otherwise it contains 
# comma-separated list of the platform, just as they are if the symbol exists 
# for those platforms, or prepended with a "!" if not. This helps resolve 
# symbol name variants for platforms where the names are too long for the 
# compiler or linker, or if the systems is case insensitive and there is a 
# clash, or the symbol is implemented differently (see 
# EXPORT_VAR_AS_FUNCTION). This script assumes renaming of symbols is found 
# in the file crypto/symhacks.h. 
# The semantics for the platforms is that every item is checked against the 
# environment. For the negative items ("!FOO"), if any of them is false 
# (i.e. "FOO" is true) in the environment, the corresponding symbol can't be 
# used. For the positive itms, if all of them are false in the environment, 
# the corresponding symbol can't be used. Any combination of positive and 
# negative items are possible, and of course leave room for some redundancy. 
# - "kind" is "FUNCTION" or "VARIABLE". The meaning of that is obvious. 
# - "algorithms" is a comma-separated list of algorithm names. This helps 
# exclude symbols that are part of an algorithm that some user wants to 
# exclude. 
+0

@RiggsFolly - Un commento per il downvote sarebbe utile per i futuri visitatori. Non è chiaro il motivo per cui la risposta precedente mostra come OpenSSL utilizza gli ordinali e identifica il problema ordinale non corretto. – jww

9

Per risolvere il problema, sono necessarie due cose:

1) Assicurarsi che non si dispone di collegamenti simbolici per libeay32.dll e ssleay32.dll nella directory bin di Apache (ad esempio, il mio è: C: \ wamp64 \ bin \ apache \ apache2.4.23 \ bin)

Se si dispone di collegamenti simbolici (ovvero le dimensioni del file sono 0 byte), è necessario scaricare le DLL da Apache Lounge. Per esempio, ho afferrato i due file dll dalla versione a 64 bit di Apache 2.4.23 ospitato presso https://www.apachelounge.com/download/

2) Una volta che hai i file dll effettivi ripristinati, è necessario fare in modo che WampServer isn' t sovrascrivendoli. WampServer 3 ha uno script di configurazione che viene eseguito ogni volta che viene avviato. In quello script sovrascriverà quelli .dll con collegamenti simbolici. È necessario DISATTIVARE tale funzionalità. Per fare ciò, commentare i riferimenti a questi due file in: C: \ wamp64 \ scripts \ config.inc.php (i miei si trovavano alle righe 133 e 139).

Ciò dovrebbe consentire di abilitare il modulo mod_ssl in Apache. Dovrai inoltre rimuovere il commento "Include conf/extra/httpd-ssl.conf" dopo aver riavviato Apache correttamente con mod_ssl abilitato. (Tuttavia, è probabile che tu debba cancellare la maggior parte di ciò che c'è e ricominciare dal momento che include molti percorsi e bug codificati)

+0

Non modificare mai gli script WAMPServer. Se si tratta di un problema reale (questo non lo è) che stai cercando di risolvere, suggerire una correzione su http://forum.wampserver.com/list.php?2 dove può essere valutata e unita agli aggiornamenti futuri se viene considerata una soluzione a un problema reale – RiggsFolly

+0

@RiggsFolly - Sarei interessato a sapere ... Come si sostiene che questo non è un vero problema? Non solo è un vero problema, è un problema ricorrente che emerge su Stack Overflow. Forse le persone Winamp dovrebbero monitorare l'overflow dello stack per le tendenze. – jww

+0

@RiggsFolly - Certo, riferirò la mia correzione agli sviluppatori. Poiché ho trascorso diverse ore a lavorare su HTTPS, volevo passare questa patch temporanea fino a quando gli sviluppatori non sono riusciti a correggerla correttamente. (È possibile deselezionare questo come un duplicato poiché l'altro thread non è un problema causato da WampServer?) Grazie! –

0

Ho appena incontrato lo stesso problema, su Windows e usando xampp invece di Wamp.

Facendo ciò che è descritto nei commenti di questa pagina risolto: PHP cURL Installation.

Ho copiato i 3 file .dll dalla directory di installazione di PHP nella directory apache/bin e ho riavviato xampp.