I need to use php_openssl.dll
, but I do not have access to php.ini
, the server is foreign and the support is also difficult to access.
extension=php_openssl.dll
Is there any way to use it without entering php.ini
?
I need to use php_openssl.dll
, but I do not have access to php.ini
, the server is foreign and the support is also difficult to access.
extension=php_openssl.dll
Is there any way to use it without entering php.ini
?
Assuming that you are using apache and that you have permission to do so, it is possible through an .htaccess file with the following content:
#verifica se o módulo do PHP 5 para o apache foi carregado
<IfModule mod_php5.c>
#define o caminho para sua pasta de extensões
php_xtension_dir /caminh/absoluto/para/sua/pasta/de/extencoes/
#carrega os modulos
php_extension mbstring.so
php_extension openssl.so
php_extension libcurl.so
</IfModule>
Command line:
The -d
parameter is used to set values in the file .ini
:
php -dextension=php_openssl.dll
Runtime:
This function has been removed since version 5.3
To load the extension at runtime, use the dl function:
<?php
if (!extension_loaded('openssl')) {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
dl('php_openssl.dll');
} else {
dl('openssl.so');
}
}