include PDO.php fails

Hello,

I know there are more than one question with similar problem but i cannot find solution. My problem is that on my production server (shared host), my site runs fine with no errors. but the server has register_globals turned on. I need to get them off, so i have uploaded a php.ini file with only these two lines

register_globals = Off

variables_order = "GPCS"

When i upload this php.ini, i start getting the following error.

include(PDO.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

Can any one help me fix this issue?

It’s because of your “short” php.ini the PDO drivers are not enabled…

I would suggest you to take the old php.ini with all other settings… and only change the directives you need (set register_globals to OFF)… do not delete all other settings…

And always when making such "big" changes… check the Yii requirements if all is OK…

Thanks for the reply mdomba.

I don’t have the access to original php.ini file. I uploaded my php.ini (2 liner) to public_html of my account. Is there any way to fix this?

I’m not sure how your host is configured, but it seems that if you put a php.ini then it uses only that one… so you need to put there a complete php.ini file not only the two liner… you need to check this with your hosting company…

Anyway you can check the Yii requirements - http://www.yiiframework.com/doc/guide/1.1/en/quickstart.installation#requirements

Just to be sure…

I was able to solve this issue by using ini_set in my index.php file instead of uploading php.ini file.

Thanks mdomba.