开发者

PostgreSQL with wamp [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

Improve thi开发者_开发知识库s question

I have installed WAMP 2.1 on Windows 7 with PHP-5.3.4 and Apache-2.2.17 but instead of MySQL I'm using PostgreSQL version 8.4.

How can configure PostgreSQL on WAMP?


I have solved the problem by

  • adding php_pgsql and php_pdo_pgsql extensions
  • adding path-php in PATH environment variable of Windows


  1. Install PostgreSQL

  2. Edit php.ini, uncomment “extension=php_pgsql.dll”. Check both the php.ini in the PHP folder and Apache folder

  3. Edit environment variables, add PostgreSQL /bin and /lib directories to Path. This solves the issue of php_pgsql.dll not loading due to it not being able to resolve dependencies.

  4. Done. PHP should now be able to communicate with PostgreSQL.


Don't forget that WAMP has two php.ini files. One in Apache directory, one in php directory (bin\php\php5.X.X). Wampserver Tray manages the one in Apache directory.

To be able to run php cli tools (e.g php artisan), you need to uncomment the php_pgsql and php_pdo_pgsql in the php.ini in php directory.


What you are looking for is WAPP. It's a package similar to WAMP but with PostgreSQL instead of MySQL (and PhpPgAdmin instead of PhpMyAdmin)


The Best Way is add location of PHP Instalation to Environment Path of Windows

Control Panel -> System And Security -> System -> Advanced System Settings -> Environment Variables. Under "System Variables" add PHP Installation Dir for "Path" Variables.

Then Restart Apache Web Service This way is work for me (Windows 7 32 Bit, Apache 2.2, PHP 5.4)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜