Web Hosting Talk







View Full Version : PHP + PgSQL Question


JamesUS
09-07-2001, 02:44 PM
Hi everyone,

A couple of months back I got a server with cpanel at Pegasus (shared with a friend). So far it's been perfect - I've been very pleased.

I recently decided that I needed Postgre SQL for one of my sites; I've managed to get this installed with no problems. However, I'm nervous about recompiling PHP. Last time I tried to recompile PHP on a Cpanel server, it mucked it up in a pretty big way.

Is there a way to add PgSQL support to PHP without recompiling, or if not, is there a reliable set of instructions for recompiling php with cpanel that even I could follow :)

Thank you very much for any help you can give - I really do appreciate it :)

Jm4n
09-08-2001, 02:22 AM
If your PHP wasn't compiled with PostgreSQL support, you will need to recompile it *and* Apache (assuming mod_php) to enable it. You can check this by looking at the output of a phpinfo() page.

Compiling PHP is pretty straight-forward. Just follow the directions in the INSTALL file that comes with the distribution.

Apache, OTOH, is a little bit more complicated, but obviously it's been compiled already -- all you have to do is recompile with the same options you used before.

I personally go into the src directory, edit the template, and run Configure. Then make, cd up a level, and make install. The other method doesn't work as smoothly, and you have to remember all of yoru configure options...

Also make sure to check the php.ini file for postgresql specific options.

JamesUS
09-08-2001, 04:37 AM
Thanks for your help :)

Wouldn't that cause problems with cpanel though? If I understand correctly it doesn't like having PHP or Apache recompiled...

Jm4n
09-08-2001, 06:04 AM
I reall can't be much help there, I've never seen/used CPanel... I can't imagine why it would hurt it, though -- but I would recommend contacting the vendors for advice on that.

Or, don't use a control panel to administrate a server...