OpenSSL 未在 PHP 模块下列出,但显示在配置命令中
PHP 5.2.12
OS X 10.5.8
如果我使用以下配置命令从源代码编译 PHP,
./configure --disable-all --with-openssl=shared,/opt/local
它会成功。但是,在 make
和 make install
之后,
php -m
不会列出 openssl 模块。
根据我所读到的内容,我认为这可能是由于多次安装 openssl 库造成的。从源代码安装最新版本的 openssl 并尝试在配置命令 --with-openssl=/usr/local
中指定路径,总是会导致以下错误:
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
我尝试了一些路径上有不同的变化,但没有运气。
基于 http://blog.yimingliu .com/2009/02/24/missing-library-symbols-while-compiling-php-528/,我还尝试编辑 Makefile,以便 MH_BUNDLE_FLAGS 稍后出现在编译行中。
在这个问题上花了一天的大部分时间后,我感到不知所措。
有什么建议吗?
理想情况下,我希望使用已编译的最新版本的 OpenSSL。但在这一点上,我愿意接受任何有效的方法。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
呃。当然
php -m
不会列出该模块。它被指定为“共享”。是的,我不太熟悉从源代码编译。我的解决方案包括
添加
到
/etc/php.ini
重新启动 apache,现在一切都正常工作。
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
then adding
to
/etc/php.ini
Restarted apache and everything now works as it should.