Operating System - HP-UX
1842087 Members
2679 Online
110186 Solutions
New Discussion

Is it possible to use PHP with APACHE 2 and PostGRES DB on HP-UX IA64 Platform as a Shared Object ?

 
Ansuman Tripathy
New Member

Is it possible to use PHP with APACHE 2 and PostGRES DB on HP-UX IA64 Platform as a Shared Object ?

Hello,

I am new to this community. One of our projects require PHP to be installed as a shared object in Apache 2. HP Unix comes bundled with a Apache Server (2.0.55) and it includes modules like libphp5, libperl etc...
In our case we need to use PHP with Postgresql. So we can't use the existing modules that are shipped with HP-UX. I searched on the web and it was pretty clear that I have to compile php with postgres and Apache.
I have tried to compile PHP with Existing Apache and PostGRES and finally I was able to do a successfuly build.

No if I execute the .php file (e.g. # php pgsql.php ) on the command prompt it gives me the desired result, but when I a mdeploying the same file into the htdocs folder and trying to browse it on my browser I am getting an error as the following.

#!/usr/bin/php -q
Fatal error: Call to undefined function pg_Connect() in /opt/hpws/apache/htdocs/pgsql.php on line 6

The same file gets successfully executed on Command prompt.
Any help/suggestion on this issue. In fact I was browsing through some of the sites where it is mentioned that PHP can't be compiled as a Shared Object with multithreaded web servers. Is this the same problem what I am facing now???

Please reply asap.

Thanks in Advance.
From
Ansuman
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: Is it possible to use PHP with APACHE 2 and PostGRES DB on HP-UX IA64 Platform as a Shared Object ?

Shalom Ansuman,

The PHP that ships compiled with the HP web suite most definitely can be used to access sqlserver, mysql and postgres sql databases.

As far as compile it yourself goes with special options, that may present a problem.

I suggest you not compile php and use the version HP compiled. If long term you need special options compiled in HP may be able to accomodate you with an enhancement request for the next version.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com