AJ.
AJ.

Reputation: 2569

Alternative to pg_connect() for PostgreSQL database in PHP running as Apache Module

This is a peculiar requirement

I am doing this on a vendor router so I do not have much control over things. I can not load my own PHP or modify php.ini etc.

Addition:

Actually PHP is running just as a Apache Module. What options do i have to connect to PostgreSQL database. Though PHP version is PHP Version 5.3.2 - Its is extremely stripped down version of it.

Requirement:

There is a PostgreSQL database on this router and I need to access it using the barebones PHP that is available on the router.

Is there a way I can add the PostgreSQL libraries along with my own files and connect to the PostgreSQL database ??

Thanks in advance!

Upvotes: 0

Views: 898

Answers (2)

ajreal
ajreal

Reputation: 47321

You can use PDO if your PHP has compiled and enabled with this module.
By default is included since PHP 5.1

Upvotes: 3

Michael Krelin - hacker
Michael Krelin - hacker

Reputation: 143081

Theoretically, if you can get the postgres module (.so) for this version of php and if php.ini would allow you to do so (not likely) you can dynamically load it.

Upvotes: 0

Related Questions