1
我有麻煩的Apache2編譯php5.4與postgre PDO驅動程序之後開始,我的錯誤是:PostgreSQL的PDO驅動程序安裝php5.4
httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: pdo_pgsql_module_entry
我的配置選項分別爲: PHP配置選項:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pdo-pgsql=/usr/bin/pg_config --with-pgsql=/usr/bin/pg_configure
Apache2的配置選項
./configure --enable-so --enable-mods-shared=/usr/local/apache2/modules/libphp5.so
一切W¯¯因爲在我將pgsql標誌添加到php配置文件之前,先運行良好,然後重新構建。有任何想法嗎?
編輯: PHP似乎已經正確安裝,它只是讓apache的開始:
$>php -i | grep -i pdo
Configure Command => './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-pdo-pgsql=/usr/bin/pg_config' '--with-pgsql=/usr/bin/pg_configure'
PHP Warning: Unknown: It is not safe to rely on the systems timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
PDO
PDO support => enabled
PDO drivers => pgsql, sqlite
pdo_pgsql
PDO Driver for PostgreSQL => enabled
Revision => $Id: pdo_pgsql.c 314376 2011-08-06 14:47:44Z felipe $
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
編輯2: 這裏的線53 +對方的我在httpd.conf
LoadModule php5_module modules/libphp5.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
編輯
/usr/local/apache2/conf/httpd.conf的第53行看起來像什麼? – deceze
任何理由爲什麼它是pg_config和pg_configure?當你重新構建PHP時,你做了「乾淨」嗎?根據我的經驗,有時需要這樣做,具體取決於哪些選項已更改。 – Matthew
@decese:我在我的文章中添加了相關的行,第53行是LoadModule行。 –