Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile PHP with new OpenSSL library

I am trying to compile PHP with OpenSSL. That works with the default OpenSSL library 0.9.6 by simply configuring with --with-openssl=/usr.

However, I have installed a new OpenSSL library 1.0.0 which I would like to compile PHP with. This library lives in /usr/local/ssl/bin.

That unfortunately does not work:

configure: error: Cannot find OpenSSL's <evp.h>

How can I compile PHP with the new OpenSSL library?

like image 463
merlin Avatar asked Oct 25 '25 03:10

merlin


1 Answers

fixed it by recompiling curl as the compiled version of curl was also using the old openssl lib

sudo ./configure -disable-shared -with-ssl=/usr/local/ssl

After compiling curl, also compiled php again --with-openssl=/usr and phpinfo tells me it is using the new openssl lib.

like image 138
merlin Avatar answered Oct 26 '25 18:10

merlin