tags:

views:

38

answers:

3

Hi all,

I have used "DB.php" package to do the database operation . In my file I have connected the database and access the table values. It is working fine. when I am running in command line interface .
But When I am running that php file in web browser it telling me following error

Note :I am Using pgsql database

Can't connect: DB Error: extension not found

What I am doing wrong here......? Please help me out of this problem.....

Thanks.

A: 

You'll have to check the script DB.php, but it most likely means an extension that's required to communicate with the database such as the mysqli or postgres extensions, is not loaded.

See the manual on how to load extensions.

Artefacto
A: 

Is your php.ini configured for the database that you are trying to connect to? Are you using MySQL, SQLite ...

http://www.bicubica.com/apache-php-mysql/index.php There is a section on "Configuring PHP" that would be helpful it sounds like.

Boushley
A: 

Check that its using the same php.ini file for webserver and cli (look at output of phpinfo()).

Once you've established that the php.ini file is correct, if you're still getting the error check the permissions on the extension on the relevant .dll/.so files

If the files and dirs are readable bu the webserver uid, then restart your webserver and check for startup errors.

HTH

C.

symcbean