开发者

OpenSSL not listed under PHP modules but shows up in the configure command

PHP 5.2.12

OS X 10.5.8

If I compile PHP from source with the following configure command

./configure --disable-all --with-openssl=shared,/opt/local

it succeeds. However, after a make and make install,

php -m

does not list the openssl module.

Based on what I've read, I think it may be due开发者_如何学运维 to multiple installs of the openssl library. Installing the latest version of openssl from source and trying to specify the path in the configure command, --with-openssl=/usr/local, always results in the following error:

Undefined symbols:
  "_EVP_CIPHER_CTX_block_size", referenced from:
      _zif_openssl_seal in openssl.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

I've tried a few different variations on the path with no luck.

Based on http://blog.yimingliu.com/2009/02/24/missing-library-symbols-while-compiling-php-528/, I've also tried editing the Makefile so that MH_BUNDLE_FLAGS comes later in the compilation line.

After spending a good portion of the day on this issue, I'm at a loss.

Any suggestions?

Ideally, I'd like to be using the compiled and most recent version of OpenSSL. But at this point, I'm willing to accept whatever works.


Duh. Of course php -m would not list the module. It's specified as "shared". Yes, I'm not all that familiar with compiling from source.

My solution consisted of

./configure
--disable-all \
--prefix=/usr/local \
--with-openssl=shared,/usr \
--with-config-file-scan-dir=/etc
...<snip>

then adding

extension=openssl.so

to /etc/php.ini

Restarted apache and everything now works as it should.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜