FFT
asked on
Openssl enabled via web but disabled when using php cli
Hello,
I'm using php 5.4.38 wich was compiled with open ssl (-with-openssl)
Via the web phpinfo() reads :
php -i | grep ssl
OpenSSL support => disabled (install ext/openssl)
Even if I force php cli to use the web php.ini, I know that when using cli php uses a different php.ini
php -c /usr/local/php54/lib/php.i ni -i | grep ssl
OpenSSL support => disabled (install ext/openssl)
I'm stuck there and when i want to download composer for php, the error message reads :
I'm using php 5.4.38 wich was compiled with open ssl (-with-openssl)
Via the web phpinfo() reads :
OpenSSL support enabled
OpenSSL Library Version OpenSSL 0.9.8o 01 Jun 2010
OpenSSL Header Version OpenSSL 0.9.8o 01 Jun 2010
Using openssl with php cli does not workphp -i | grep ssl
OpenSSL support => disabled (install ext/openssl)
Even if I force php cli to use the web php.ini, I know that when using cli php uses a different php.ini
php -c /usr/local/php54/lib/php.i
OpenSSL support => disabled (install ext/openssl)
I'm stuck there and when i want to download composer for php, the error message reads :
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Just for the record, here's a copy of my config for compiling php './configure' \
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
'--prefix=/usr/local/php54' \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--with-gd' \
'--enable-gd-native-ttf' \
'--with-png-dir=/lib' \
'--with-jpeg-dir=/usr/lib' \
'--with-zlib' \
'--enable-ftp' \
'--with-pdo-mysql=mysqlnd' \
'--with-mcrypt' \
'--with-freetype-dir=/usr/lib' \
'--enable-mbstring=all' \
'--with-openssl=/usr' \
'--with-curl=/usr/local/lib' \
'--enable-sockets' \
'--with-gettext=/usr/bin' \
'--enable-soap' \
'--enable-zip' \
'--with-imap=/usr/local/imap-2007f' \
'--with-libdir=lib64' \
'--with-kerberos=/usr' \
Are both installations using same php.ini file?
ASKER
Hello Gheist,
there is only ONE installation, by default php cli uses a different php.ini as in any php installation (wich is a bit troubling at first)
Either by using a symbolic link from /usr/local/lib/php.ini to /usr/local/php54/lib/php.i ni or forcing php cli to use a specific config file (php -c /usr/local/php54/lib/php.i ni) the result is the same when I try to use httpd conneciton (via curl or readfile) => OpenSSL support => disabled (install ext/openssl)
Inside the php.ini there is no option for openssl apart for the windows library to activate (extension=php_openssl.dll ), wich is not relevant in this case (Debian 6)
So i'm really stuck there...
there is only ONE installation, by default php cli uses a different php.ini as in any php installation (wich is a bit troubling at first)
php --ini
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File: /usr/local/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
Either by using a symbolic link from /usr/local/lib/php.ini to /usr/local/php54/lib/php.i
Inside the php.ini there is no option for openssl apart for the windows library to activate (extension=php_openssl.dll
So i'm really stuck there...
linux php will not activate windows ddl. it must be mod_php.so
ASKER
I know that , my current Apache 2 server uses php as an Apache module...
php_sapi_name() returns "apache2handler"
And inside the module line from phpinfo i read "Loaded Modules " : core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_deflate mod_log_config mod_env mod_setenvif mod_version mod_proxy mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_ajp mod_proxy_balancer mod_ssl prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_info mod_suexec mod_cgi mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_php5
php_sapi_name() returns "apache2handler"
And inside the module line from phpinfo i read "Loaded Modules " : core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_deflate mod_log_config mod_env mod_setenvif mod_version mod_proxy mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_ajp mod_proxy_balancer mod_ssl prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_info mod_suexec mod_cgi mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_php5
If you used php shipped with your distribution somebody could eventually help with the issue.
Since you built PHP yourself - either help yourself or move to vendor's PHP.
Since you built PHP yourself - either help yourself or move to vendor's PHP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As no one replied I had to search by myself...