I know that OpenSSL extension is in PHP source, but I can't enable it when I perform apt-get install php5
. There is not even a apt-get install php5-openssl
. How I must proceed?
asked Jul 22, 2013 at 13:40
1
I think SSL support doesn't depend on an extension, it's already built into Ubuntu's PHP. Try creating a PHP file in your web server with this content:
then access it in a browser [///.php
]. You should see:
and
I have only these PHP packages installed: libapache2-mod-php5, php5-cli, php5-common, php5-gd, php5-mcrypt, php5-mysql.
answered Jul 22, 2013 at 14:30
Eric CarvalhoEric Carvalho
52.5k102 gold badges134 silver badges161 bronze badges
3
Try:
php -i | grep -i openssl
If you have the OpenSSL extension installed, you should see something like this:
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1f 6 Jan 2014
OpenSSL Header Version => OpenSSL 1.0.1f 6 Jan 2014
openssl.cafile => no value => no value
openssl.capath => no value => no value
OpenSSL support => enabled
It seems that the OpenSSL extension is installed by default.
Update:
If you don't have this extension, you can edit php.ini file.
From php.ini:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; ... or with a path:
;
; extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
answered Jul 26, 2017 at 20:12
6
I installed OpenSSL 1.1.0f
using
# apt-get install openssl
# php -i | grep -i openssl
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.0f 25 May 2017
OpenSSL Header Version => OpenSSL 1.1.0f 25 May 2017
Openssl default config => /usr/lib/ssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native OpenSSL support => enabled
Hope it help someone!
answered Oct 31, 2017 at 11:57
I'm not sure how to recompile PHP with OpenSSL? I've been looking around the OpenSSL PHP page and the OpenSSL tutorials but I don't see any openssl.so
or php-openssl.so
around my server?
Is there a simple package on apt-get
channel so I can install it from there?
I just need to recompile PHP with OpenSSL, but I have no idea how to do this.
EDIT: I run a dedicated server and it's Ubuntu 11.10.
asked Jan 10, 2012 at 20:33
MacMacMacMac
1,9318 gold badges30 silver badges38 bronze badges
3
For a while PHP has had ssl support compliled into it. No extra modules are needed. Check with phpinfo[]
. E.g., on Ubuntu 10.04:
$ echo '' | php 2>&1 |grep -i ssl
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
SSL => Yes
SSL Version => OpenSSL/0.9.8k
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8k 25 Mar 2009
OpenSSL Header Version => OpenSSL 0.9.8k 25 Mar 2009
OpenSSL support => enabled
answered Jan 10, 2012 at 21:46
Mark WagnerMark Wagner
17.8k2 gold badges30 silver badges47 bronze badges
libssl1.0.0 or libssl-dev are probably what you're looking for, though I wonder why you'd need to do this?
answered Jan 10, 2012 at 21:21
Shane MaddenShane Madden
113k12 gold badges174 silver badges248 bronze badges