dpn4073 2010-04-03 04:33
浏览 94

OpenSSL未在PHP模块下列出,但在configure命令中显示

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.

  • 写回答

1条回答 默认 最新

  • doulipi3742 2010-04-03 06:06
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决