Compiling PHP 5.1.6 with PDO MySQL

后端 未结 2 1487
迷失自我
迷失自我 2021-01-06 16:30

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 clien

相关标签:
2条回答
  • 2021-01-06 16:47

    No need to recompile whole PHP. Just compile PDO_MYSQL module alone. Use pecl to install it:

    pecl install PDO_MYSQL
    

    For that you will need phpize installed. On Debian machines it is provided by package called php5-dev. Afterwards just add it to your php.ini and restart Apache.

    If you are on Debian/Ubuntu system PDO_MYSQL is provided in package called php5-mysql

    0 讨论(0)
  • 2021-01-06 17:02

    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 ?

    0 讨论(0)
提交回复
热议问题