Install Extension Separately?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm working with a web hosting company that offers PHP and MySQL, but my
existing databases are in Postgres.  The hosting company has installed a
Postgres extension for Python, but not for PHP.

Of course, one alternative is for me to just move my data to MySQL and
convert the code.  It wouldn't kill me.  However, it brought up a question
in my mind.  Is it possible for me, as an unprivileged user, to build just
the Postgres extension for PHP, and install it locally so that it can be
used in my site?  I know how to do this for Python, but I have not done a
lot of PHP administration.

They do PHP via CGI, not via mod_php, if that makes a difference.
Apparently, that's required for suexec.
Tim Roberts,
Providenza & Boekelheide, Inc.

Re: Install Extension Separately?

Quoted text here. Click to load it

PHP doesn't have a modular extension architecture like Apache.  You'll
have to compile your own version of php with postgres support enabled
and use that via CGI.  Most likely, mod_php that's part of Apache won't
know how to deal with postgres.

Ultimately, you've got a business decision to make--stay with the
current hosting environment and switch to MySQL or leave and find a web
host that supports Apache, php, and postgres.

Postgres is a full-featured DBMS.  MySQL is less so, depending on the
version.  V4 doesn't have support for transactions, rollbacks, and
triggers AFAIK (I'm sure a MySQL person will jump right in if I have
this wrong).  Some of those features are in MySQL V5.  You do the
research and determine if you really need Postgres or might in the near
future.  Finding a web host that offers postgres with php and Apache is
going to be much harder than one with MySQL, php, and Apache.

DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically by ignored]

Site Timeline