1

I know there are other questions about problems with PGSQL not loading, but I haven't found a solution that works for me and directly addresses an IIS setup under Windows (obviously). Using PostgreSQL 8.4.

Since I am a complete novice in PHP (only trying to get MantisBT to run) I find this extremely hard to debug/research.

I've set the path to both PostgreSQL bin folder and the PHP folders (v5.3 subfolder first and the PHP root after that). I've checked that libpq.dll is present in all three of these folders and I've tried copying the libpq.dll from the PostgreSQL folder to both PHP folders. I've made sure php.ini contains

extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

in both PHP folders (root as well as v5.3).

What more to check/try/examine?

9
  • (1) Why have you chosen an old version of PostgreSQL? (2) Is it installed successfully and running - can you connect from psql/pg_admin(?) Commented Oct 2, 2013 at 14:31
  • Anything in the (event) logs? stackoverflow.com/questions/551734/… Commented Oct 2, 2013 at 17:35
  • @Richard: I installed PostgreSQL over a year ago and I think I grabbed whatever was current at that time. Then I got swamped with other work and never got around to having a look at it until now. PostgreSQL seems to be working - I can connect with pgadmin, both to the server and to the MantisBT database, using the username and password I configured for MantisBT. But it's apparent that it fails in the call to init the DB connection in core.php (or whatever). Commented Oct 2, 2013 at 19:17
  • @Milen: Seems like the log file isn't flushed (C:\Windows\Temp\php53_errors.log). How do I flush it? Commented Oct 2, 2013 at 19:18
  • @Milan: OK, now I can at least see log entries that are dated after my trials earlier today. The log only contains a warning about zlib: ini_set(): Cannot change zlib.output_compression - headers already sent in C:\DataDIA\wwwroot\MantisBT\core\compress_api.php on line 68. Nothing about pgsql. Commented Oct 2, 2013 at 20:07

1 Answer 1

1

Tried phpinfo() again, and it reports

Loaded Configuration File = C:\Program Files (x86)\PHP\v5.3\php.ini

which is correct and contains extension=php_pdo_pgsql.dll and extension=php_pgsql.dll. As for "the dll's are in the right place" (@Richard), I have problems making sure exactly what dll:s are needed and where they should be located, but I have in C:\Program Files (x86)\PHP\v5.3\ext\ both php_pdo_pgsql.dll (version 5.3.12.0) and php_pgsql.dll (version 5.3.12.0).

I read about a dependency on libpq.dll and this is present in C:\Program Files (x86)\PHP\v5.3\. Early in my "debugging" I copied the new libpq.dll (version 8.4.4.10133) from PostgreSQL to that folder, having read somewhere that it might solve the problem. I now tried reverting to the old version (8.3.6.9034) that shipped with PHP, and VOILA!!!! Suddenly phpinfo() says it has loaded both pdo and non-pdo pgsql modules.

MantisBT now loads the login screen at least. Whew!

Sign up to request clarification or add additional context in comments.

1 Comment

I'm not quite certain why it din't work to begin with, but I suspect that it was in essence a path issue. I upgraded libpq.dll before adding path to PostgreSQL folder and v5.3 subfolder of PHP, and I think that's really the only change I made, that I haven't undone now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.