为什么我在这种情况下收到错误“Class PDO not found”?

时间:2011-09-15 00:16:22

标签: php apache doctrine pdo

即使我安装了PDO并包含在我的php.ini中,我也收到以下错误。

我可能会错过什么?我正在使用doctrine和codeigniter

<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Warning</p>
<p>Message:  Doctrine\ORM\Query\ParameterTypeInferer::inferType() [<a href='doctrine\orm\query\parametertypeinferer.infertype'>doctrine\orm\query\parametertypeinferer.infertype</a>]: It is not safe to rely on the system's 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 'America/Chicago' for 'CDT/-5.0/DST' instead</p>
<p>Filename: Query/ParameterTypeInferer.php</p>
<p>Line Number: 70</p>

</div><br />
<b>Fatal error</b>:  Class 'PDO' not found in <b>/home/mrwongs/public_html/engine/application/third_party/Doctrine/ORM/Query/ParameterTypeInferer.php</b> on line <b>70</b><br />

我的phpinfo可以在http://173.203.85.196/test.php

看到

在我的php.ini中,我有以下两行:

extension=pdo.so
extension=pdo_mysql.so

2 个答案:

答案 0 :(得分:0)

您是否在网页上收到此错误?或者从cli运行?

php-cli可能正在使用不同的php.ini

答案 1 :(得分:0)

重启Apache服务器。如果你还没有这样做。