dtrb96410 2011-12-06 20:58
浏览 173
已采纳

PHP模块编译API不正确(无法初始化)

I'm trying to install freetds and php-mssql on a RHEL5 box. I've successfully done (what appears to be) everything. However, I get the following error when PHP attempts to load the module:

PHP Warning:  PHP Startup: mssql: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20050922, debug=0, thread-safety=0
These options need to match

I've been pulling my brain out trying to figure out why they are different values, but having no success.

In the latest attempt, I downloaded the php source for the version I am running (php-5.3.8), went into the ext/mssql folder and ran phpize, configure, make, make install.

I verified the mssql.so file is in the appropriate folder, and that php is trying to load it.

phpize -v
Configuring for:
PHP Api Version:         20050922
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
  • 写回答

2条回答 默认 最新

  • dsfdsfds521521 2011-12-06 22:35
    关注

    RHEL had an older version of php (5.1.x), and the installation of newer php versions (such as 5.3.x) means several changes. If you install from unofficial repos, you will see packages named php-* and php5-* . Having both versions can be the origin of the problems.

    It looks like your system is accessing some configuration files from previous php installations.

    Have a look at: - /etc/php.d Be sure you do not have elements from old versions - Have a look at /usr/bin/php-config* , If you have both php-config and php-config5, remove (rename) of /usr/bin/php-config and make a symlink to the new one:

    # mv /usr/bin/php-config /usr/bin/php-config_old
    # ln -s /usr/bin/php-config5 /usr/bin/php-config
    

    Hope this helps

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?