jyr / MNPP

Mac + Nginx + Percona + PHP a high performance web server in a one-click installer
http://getmnpp.org
314 stars 49 forks source link

OpenSSL extension for PHP #66

Open marcosgdf opened 11 years ago

marcosgdf commented 11 years ago

Hi there,

I know this may not be a bug but... How do I install openssl extension required by PHP to reach SSL urls with Phar.

I tried brew install openssl but that doesn't fix anything... How am I supposed to install openssl to use it with MNPP's PHP executable?

You say openssl is included with the stack but I can't find it anywhere... Also phpinfo tells me that I have to install OpenSSL extension...

Thanks.

ghost commented 10 years ago

my phpinfo() tells this : openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 0.9.8y 5 Feb 2013 OpenSSL Header Version OpenSSL 0.9.8y 5 Feb 2013

i still have the issue in composer, but i'm wondering how phpinfo tells you must install openssl extension. note : i brew php5.5 also.

fahdi104 commented 10 years ago

Hi,

any work around to fix this?

thanks

maderlock commented 10 years ago

The issue here seems to be that php is compiled with a completely incorrect path for ssl. It may be possible to symlink in the correct files.

In the end, I recompiled php54 with similar settings to those used initially by MNPP, but just compiling in openssl directly:

  1. Download latest version of php 5.4
  2. Configure: ./configure --prefix=/Applications/MNPP/Library/php54 --exec-prefix=/Applications/MNPP/Library/php54 --enable-cli --enable-gd-jis-conv --enable-gd-native-ttf --enable-mbstring --with-bz2 --with-curl --with-gd --with-gettext=shared,/Applications/MNPP/Library/gettext --with-freetype-dir=/Applications/MNPP/Library/freetype --with-jpeg-dir=/Applications/MNPP/Library/jpeg --with-libxml-dir=/Applications/MNPP/Library/xml --with-xsl=/Applications/MNPP/Library/xslt --with-mcrypt=shared,/Applications/MNPP/Library/mcrypt --with-mhash=/Applications/MNPP/Library/mhash --with-mysql=/Applications/MNPP/Library/mysql --enable-sockets --with-mysqli=/Applications/MNPP/Library/mysql/bin/mysql_config --with-openssl --with-zlib-dir=/Applications/MNPP/Library/zlib --with-png-dir=/Applications/MNPP/Library/png --with-readline --with-zlib --with-config-file-path=/Applications/MNPP/conf/php54 --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libedit --enable-libxml --enable-dom --enable-simplexml --with-iconv=/Applications/MNPP/Library/iconv --with-pdo-mysql=/Applications/MNPP/Library/mysql/bin/mysql_config --enable-soap
  3. make
  4. make install

This worked for me. I can still use MNPP to take this process up and down, and fpm works.