I know that there are several examples of this question in stackoverflow, but I can not find a solution.
I am running CentOS with Apache and PHP 5.3
A.PHP script gives me this error:
Fatal error: Class 'PDO' not found in ...
I ran phpinfo(); , and the only place where "pdo" is located is in the line "Configure Command" '--disable-pdo' .
I tried #yum install php-pdo , but no packages exist.
I also tried #pecl install pdo and I will get these errors at the end:
/root/tmp/pear/PDO/pdo_dbh.c: In function 'pdo_stmt_instantiate': /root/tmp/pear/PDO/pdo_dbh.c:410: error: 'zval' has no member named 'refcount' /root/tmp/pear/PDO/pdo_dbh.c:411: error: 'zval' has no member named 'is_ref' /root/tmp/pear/PDO/pdo_dbh.c: In function 'pdo_stmt_construct': /root/tmp/pear/PDO/pdo_dbh.c:435: error: 'zend_fcall_info' has no member named 'object_pp' /root/tmp/pear/PDO/pdo_dbh.c:458: error: 'zend_fcall_info_cache' has no member named 'object_pp' /root/tmp/pear/PDO/pdo_dbh.c: In function 'zim_PDO_setAttribute': /root/tmp/pear/PDO/pdo_dbh.c:752: error: 'zval' has no member named 'refcount' /root/tmp/pear/PDO/pdo_dbh.c: In function 'zim_PDO_getAttribute': /root/tmp/pear/PDO/pdo_dbh.c:818: error: 'zval' has no member named 'refcount' /root/tmp/pear/PDO/pdo_dbh.c: In function 'pdo_hash_methods': /root/tmp/pear/PDO/pdo_dbh.c:1122: warning: assignment discards qualifiers from pointer target type /root/tmp/pear/PDO/pdo_dbh.c:1126: warning: assignment discards qualifiers from pointer target type make: *** [pdo_dbh.lo] Error 1 ERROR: `make' failed
Then the php.net document basically says that the package is included in the standard php installation with PHP 5.1.
I added the extension=pdo.so to php.ini and restarted Apache and the problem did not disappear. Any suggestions?
source share