Author |
|
Millennium
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Mon 28 Jan '08 0:26 Post subject: PDO extension is not working |
|
|
Hi
Recently I tried to enable the PDO (PDO_MYSQL) extension. There are no faults in the Apache Error log, but the PDO extension doesn't display in phpindfo(). Creation of the PDO class in a php script results in: "Fatal Error: Class 'PDO' not found.
My webserver config:
Apache 2.2.6 (ApacheLounge build)
php 5.2.5
Windows 2003 (WE)
PHP is installed as CGI module, with mod_fcgid (also Apachelounge build)
(installing PHP as module, doesn't make a differnce)
I'm for 100% sure I edit the right php.ini (identified with phpinfo())
I enabled the following extensions in php ini:
php_pdo.dll
php_pdo_mysql.dll
The extension-path is directing to the right directory and the pdp dll's are in that directory.
php_mysqli is working perfectly (enableing php_mysql didn't help either)
What am I missing ? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 29 Jan '08 18:33 Post subject: |
|
|
Are you sure that you load the right php.ini?
Inside the fcgi block you can set where PHP should search for the ini file
Code: |
SetEnv PHPRC D:/server2/php
|
|
|
Back to top |
|
Millennium
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Tue 29 Jan '08 23:12 Post subject: |
|
|
Yes I'm sure (it's the same location as displayed in phpinfo "Loaded Configuration File") Also enabling another Extension does work, only PDO fails, altough there are no visible error in the log files... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 30 Jan '08 11:16 Post subject: |
|
|
I disabled all extension in php.ini, but pdo and pdo_mysql.
You should log error
display_errors = On
display_startup_errors = On
log_errors = On
error_log = C:/server2/logs/phperror.log
One last thing I get in my mind is that libmysql.dll is required. It should be in System32 path or apache\bin |
|
Back to top |
|
Millennium
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Tue 05 Feb '08 21:56 Post subject: |
|
|
Even with all extesnions disabled, except pdo and pdo_mysql still No errors and no PDO
it freaks me out... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 05 Feb '08 23:28 Post subject: |
|
|
Maybe you should download php again and try once more. On my Win2k3 Standart it works fine. |
|
Back to top |
|