gpt4 book ai didi

php - 使用 PDO MySQL 编译 PHP 5.1.6

转载 作者:可可西里 更新时间:2023-11-01 08:38:26 25 4
gpt4 key购买 nike

我原来asked this question on ServerFault并且没有得到任何回应,我认为它与编程相关,所以,这里......


不久前,我们的一个大客户转向单一托管服务提供商,该服务提供商指定了一个在所有实时服务器上保持一致的软件环境。

其中包括 Apache 2.2.8 和 PHP 5.1.6。

我们有一个用于开发的 ubuntu 8.04 服务器,这些版本的 Apache 和 PHP 不是默认安装的。所以我不得不从源代码编译它们。这些版本现已愉快地运行了一年多。

我们正在开始一个新的站点构建,我们想使用需要 PDO_MySQL 的 ZendFrameword。

我已经尝试使用以下内容重新编译...(下划线表示行的延续)

./configure --with-apxs2=/usr/local/apache2/bin/apxs _
--with-config-file-path=/user/local/apache2/conf/php.ini _
--with-curl=/usr/lib/ --with-mysql=shared --with-mysqli=shared _
--with-zlib --with-gd --with-jpeg-dir=/usr/local/lib/ _
--with-freetype-dir=/usr/lib/ --enable-soap --enable-pdo=shared _
--with-pdo-mysql=shared --with-sqlite=shared
...
make
...
make install
...
libtool --finish /sources/php-5.1.6/libs

一切正常,当我重新启动 apache 时,它​​向我显示了 phpinfo() 中的新 ./configure。

执行此操作后 MySQL 停止工作,MYSQL 部分消失,msyql 停止工作。

make、make install、libtool...将*.so 文件放入

/usr/local/lib/php/extensions/no-debug-non-zts-20050922

我之前使用的启用 MySQL 但不启用 PDO 的配置是

./configure --with-apxs2=/usr/local/apache2/bin/apxs _
--with-config-file-path=/user/local/apache2/conf/php.ini _
--with-curl=/usr/lib/ --with-mysql --with-mysqli _
--with-zlib --with-gd --with-jpeg-dir=/usr/local/lib/ _
--with-freetype-dir=/usr/lib/ --enable-soap

我不是一个大块头的 *nix 人,任何人都可以告诉我哪里出错了。

谢谢

最佳答案

我不确定它是否真的有用,但是如果您在配置行中删除所有“=shared”实例会怎样?

例如,这是我前段时间使用过的一个配置命令 *(由 phpinfo 给出)*:

$ /usr/local/php-5.1.6/bin/php -i | grep 'configure'
Configure Command => './configure' '--prefix=/usr/local/php-5.1.6' '--with-config-file-path=/etc/php-5.1.6'
'--with-apxs2=/usr/bin/apxs2' '--disable-ipv6' '--with-openssl' '--with-zlib' '--enable-bcmath'
'--with-bz2' '--with-curl' '--enable-exif' '--enable-ftp' '--with-gd' '--with-ttf'
'--enable-gd-native-ttf' '--with-imap-ssl' '--with-ldap' '--enable-mbstring' '--with-mcrypt'
'--with-mhash' '--with-mysql' '--with-mysqli' '--enable-pcntl' '--with-pdo-mysql' '--with-pdo-sqlite'
'--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--with-xmlrpc'
'--with-xsl' '--with-pear'

(为便于阅读而添加的换行符)

有帮助吗?

关于php - 使用 PDO MySQL 编译 PHP 5.1.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1164345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com