开发者

php: Database accessing Error

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 p开发者_运维技巧hp file in web browser it telling me following error

Note :I am Using pgsql database

Can't connect: DB Error: extension not found


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜