To use PHP's OpenSSL support you must also compile PHP --with-openssl[=DIR] .
The OpenSSL library also has additional requirements for normal operation at run-time. Most notably, OpenSSL requires access to a random or pseudo-random number generator; on most Unix and Unix-like platforms (including Linux), this means that it must have access to a /dev/urandom or /dev/random device.
Nota: Note to Win32 Users
Para esta extensão funcionar, existem arquivos DLL que devem estar disponíveis no PATH do sistema Windows. Para saber como fazer isso, veja o FAQ intitulado "Como eu adiciono o meu diretório PHP no PATH no Windows". Embora copiando arquivos DLL da pasta do PHP no diretório system do Windows também funcione (porque o diretório system está por padrão no PATH do sistema), isto não é recomendado. Esta extensão requer que os seguintes arquivos estejam no PATH: libeay32.dll
Additionally, if you are planning to use the key generation and certificate signing functions, you will need to install a valid openssl.cnf file on your system. We include a sample configuration file in our win32 binary distributions, in the extras/openssl directory.
PHP will search for the openssl.cnf using the following logic:
In your installation, you need to decide whether to install the configuration file at c:\usr\local\ssl\openssl.cnf or whether to install it someplace else and use environmental variables (possibly on a per-virtual-host basis) to locate the configuration file. Note that it is possible to override the default path from the script using the
- the OPENSSL_CONF environmental variable, if set, will be used as the path (including filename) of the configuration file.
- the SSLEAY_CONF environmental variable, if set, will be used as the path (including filename) of the configuration file.
- The file openssl.cnf will be assumed to be found in the default certificate area, as configured at the time that the openssl DLL was compiled. This is usually means that the default filename is c:\usr\local\ssl\openssl.cnf.
configargs
of the functions that require a configuration file.