關於php外掛程式pdo_mysql的安裝

來源:互聯網
上載者:User

標籤:

今天在做一個商城的串連的時候,需要MpDO驗證。需要安裝pdo_mysql模組,剛開始按照php擴充模組的安裝按照這個安裝ZIP,curl都成功了但是安裝pdo_mysql卻不行,在./configure --with-php-config=/usr/local/php/bin/php-config是出現錯誤。如下

checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for MySQL support for PDO... yes, shared checking for the location of libz... no checking for mysql_config... not found configure: error: Unable to find your mysql installation 找不到mysql

最後終於找到瞭解決辦法:

這樣來編譯:./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql 就可以了,之後按照這php擴充模組安裝個來做即可

php編譯安裝轉自:http://www.apelearn.com/bbs/forum.php?mod=viewthread&tid=11526&highlight=php%C0%A9%D5%B9%C4%A3%BF%E9

擴充模組編譯安裝
/usr/local/php/bin/php -m
進入php源碼包目錄 /usr/local/src/php-5.4.36
cd  ext/
以curl為例
/usr/local/php/bin/php -m |grep -i curl
cd /curl/
ls
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/curl.so
/usr/local/php/bin/php -i |grep extension_dir
vim /usr/local/php/etc/php.ini
extension=php_shmop.dll(該行下面添加如下資訊)
extension=curl.so
儲存退出
:nohl取消高亮(vim介面)
grep ‘extension=‘ /usr/local/php/etc/php.ini (查看安裝動態模組)

關於php外掛程式pdo_mysql的安裝

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.