问题描述
我最初上提出这个问题和haven我得到任何回应,我认为它的编程相关所以,这里...
我们移动到一个托管提供商,它规定一个软件环境,这将是一致的,所有的现场服务器。
其他的东西,包括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
这些都工作正常, ,它显示我在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人,任何人都可以告诉我我错了。
感谢
我不知道它会真的帮助,但如果你删除 code> = shared ?
例如,这里有一个configure命令*(由 phpinfo 提供)*:
$ /usr/local/php-5.1。 6 / bin / php -i | grep'configure'
pre>
配置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'
(为了便于阅读,添加了换行符)
它有帮助吗?
I originally asked this question on ServerFault and haven't got any response and I figure it's programming related so, here goes...
A while ago a large client of ours moved to a single hosting provider who spec'd out a software environment which would be consistent accross all the live servers.
Amongs other things this includes Apache 2.2.8 and PHP 5.1.6.
We had an ubuntu 8.04 server for development and these versions of Apache and PHP are not the default installed. So I had to compile them from source. These versions have happily been running for over a year now.
We're starting a new site build and we want to use ZendFrameword which requires PDO_MySQL.
I've tried recompiling with the following... (underscore shows continuation of line)
./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
Which all works fine, and when I bring apache back up, it shows me the new ./configure in the phpinfo().
After doing this MySQL stops working, the MYSQL section disappears and msyql stops working.
The make, make install, libtool... puts the *.so files in
/usr/local/lib/php/extensions/no-debug-non-zts-20050922
The configure I have used previously which enabled MySQL but not PDO is
./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
I'm not a massive *nix person, can anyone tell me where I'm going wrong.
Thanks
解决方案I am not sure it will really help, but what if you remove every instance of "
=shared
" in your configure line ?For example, here is an configure command I've used some time ago *(as given by 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'
(newlines added for the sake of readability)
Does it help ?
这篇关于使用PDO MySQL编译PHP 5.1.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!