Wednesday 15 June 2011

Using postgresql with php under windows/xampp -


I am trying to use postgres with PHP, but load up to Apache extension can not do.

I am using:

Windows 7 (64bit) with xampp, and I have PHP version 5.4.7, I have already set up postgrad, And other applications can access the database. / P>

When I reject the following lines in my php.ini

  extension = php_pdo_mysql.dll extension = php_pdo_pgsql.dll = php_pdo_sqlite.dll extension  / Pre> 

I get some errors in php-error-log:

[22-Jun-2013 13:15:22 UTC] PHP Warning: PHP startup: dynamic library Unable to load 'C: \ xampp \ php \ ext \ php_pdo_pgsql.dll' - Das Enggebin Modul Vertext Gotfunden.

But the path is correct, and the files are.

After some research, I added this line to my http.conf:

  loadfile "C: / program files / postgresql / 9.2 / bin / libpac DLL "  

But the way I put this line, the service is not able to start anymore, so I removed the line.

I also tried to add these 2 paths to my path-variable:

  C: \ Program Files \ PostgreSQL \ 9.2 \ bin C: \ Xampp \ php \ Ext   

The error has now been changed to

unknown line <0>

on the same Running, local machine

My phpinfo () does not show things related to a postgrad.

I hope someone knows how to solve the problem, Google did not help me at all.

OK, anyhow I resolve the problem at the end:

I have xampp And postgres were restored but postgrass 32 bit-version (64-bit-version should also work, but I have to make sure)

Then I have the extension php.ini Again:

  extension = php_pdo_pgsql.dll extension = php_pdo_sqlite.dll extension = php_pgsql.dll   

The error I got is that the file does not repeat (Php_error_log).

After reading it:

I downloaded libpq.dll from Postgradage 8.4 and it's Apache / Bin and Postgrass / Copy in Lib (from there to DLL).

My path-variable should still be in C: \ xampp \ php \ ext \ , but without that part it should also work.

I worked on this problem for 3 days and I hope that it will help others lift it up and running faster.

No comments:

Post a Comment