I have a script which uses __autoload() to load classes (stupid, I know, this is old code I used to use for fun / testing), and it seems to be trying to autoload PDO. This leads me to believe that it’s not finding the PDO class it should be. I have checked php.ini and php_pdo.dll is enabled, along with php_pdo_mysql.dll, etc. The .dll files exist in “ext/” and I’ve restarted the web server numerous times.
I don’t have much experience with IIS, but I’ve never had this issue on Linux, so I’m not sure what the issue is.
Any help would be greatly appreciated.
EDIT: PDO is not in phpinfo()
. I know it’s not loaded correctly, I’m trying to figure out why. Here is my php.ini file: php.ini on Pasebin
C:Program Files (x86)PHPext is the extension directory, and listed as such in php.ini and phpinfo()
.
Advertisement
Answer
One thing I find odd is that you are specifying the extension in the [PDO]
section. I’m not aware of this kind of notation – my Windows php.ini doesn’t do that. It could be that the line gets ignored because it gets interpreted as PDO.extension
which doesn’t make sense.
What happens if you move the extension=php_pdo.dll
bit into the main body of the INI file (outside any []
section)?
If that doesn’t change anything: Are you 100000% sure you are editing the correct php.ini?
With the extension specified in the file, PHP should either crash when you restart the server, or give you the PDO class.
Check phpinfo()
to see which ini file is being used exactly.