2011-09-15 95 views
1

即使我安装了PDO并包含在我的php.ini中,我仍然收到以下错误。为什么我会在这种情况下收到错误“Class PDO not found”?

我可能错过了什么?我使用的原则和笨

<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我有以下2行:

extension=pdo.so 
extension=pdo_mysql.so 
+1

您确定运行php的代码实际上是使用您向我们展示的php.ini吗? –

+1

做一个'phpinfo();'看看输出说什么关于你当前设置使用的配置文件。 –

+2

最安全的方法来检查将是'if(!extension_loaded('pdo'))die('Oops!');' – Jon

回答

0

您是否收到此错误一个网页?或从cli跑?

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

0

重新启动apache服务器。如果你还没有这样做。

相关问题