Ok I need to connect to a DB2 database and execute a prepared statment with input/output parameters. To do this I upgraded to php5.1.
I altered the php.ini file as documentation dicated for setting up 5.1 and PDO. There are no errors in my ini file since my webserver (apache 2), works fine.
I'm trying to run a test connection to my database using the following,
I'm getting the following error: Fatal error: Class 'PDO' not found at line 5
I've tried to figure out why i'm getting this problem, but keep coming up at dead ends. Is it a configuration problem. Suggestions on this would be greatly appreciated.
check in phpinfo() what extensions are loaded, if it's not listed, you may have changed the php.ini incorrectly. Alternately, you can post your extension section so we can judge for ourselves..
Did you install PHP as a module in Apache? If so, were there any popups during Apache's launch? Have you checked the Apache error logs for ones related to PDO?
I have included php as a load module in Apache.
There are no popups during start and or restart of the webserver.
I've checked the apache error log there are no errors pertaining to php or PDO. The error occurs when rendering the test connection page.
What does this mean?
Were there any problems in my extension block submitted?
How do I check to see PDO is enabled, where in the phpinfo file will i see this? On obersvation there are no referecnes to PDO anywhere on the page the spits php information.
lisamarie_tt wrote:I have included php as a load module in Apache.
There are no popups during start and or restart of the webserver.
I've checked the apache error log there are no errors pertaining to php or PDO. The error occurs when rendering the test connection page.
What does this mean?It would seem it didn't have any issues loading, but....
lisamarie_tt wrote:Were there any problems in my extension block submitted?
I'm not seeing anything..
lisamarie_tt wrote:How do I check to see PDO is enabled, where in the phpinfo file will i see this? On obersvation there are no referecnes to PDO anywhere on the page the spits php information.
I haven't used PDO, but is should get listed in phpinfo() if and when loaded like any other extension.
lisamarie_tt wrote:How should I proceed?
I have no idea. The following is a list of DLL's php_pdo.dll (the version you are using) links to. It may have silently found that one or more of them couldn't be loaded, and decided to not continue loading when php starts. Check to make sure you have the startup errors directive turned on in php.ini.
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On
; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = On
; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On
Howerer in phphinfo display they are off.
display_startup_errors Off Off
I made the chages, saved the file and I restatred the web-sever.
And still the flags show off.
Could it be that the php.ini is not being read properly?
I'm pulling at straws now. I'm a bit at a loss, I've been at it for the greater part of three days !!!!
I had similar issue. I would check phpinfo(), under php_core extension_dir ./ ; then I corrected to extension_dir c:/php5/ext . And it did work.
If you want to test, pleae try this
<?php
foreach(PDO::getAvailableDrivers() as $driver)
{
echo $driver.'<br />';
}
?>
---
regards
Manas
Frontiersoft.net