- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- libpq for hpws apache32 thread safe?
Operating System - HP-UX
1752785
Members
5996
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2004 01:11 AM
12-16-2004 01:11 AM
libpq for hpws apache32 thread safe?
We installed on HPUX 11.23 IPF machines following software:
HPWS Apache32 B.2.0.52.00
ixPostgresql A.03.00-7.4.2.001
The 'configure' options explained in the README.hp of the postgresql product indicates that the program was compiled without the --enable-thread-safety.
This means that the resulting libpq library is not thread safe. Yet it is used by the Apache32 PHP module when interfacing to a postgres database. But this apache is using
threads. Am I missing something here, or
did the HPUX engineers porting the postgresql
forget to think of these thread issues?
We do have a problem with this combination of
software products.
Sometimes PHP webpage accessing the database with pg_connect() and pg_query() fails with
following error:
Warning: pg_exec(): Query failed: could not receive data from server: Invalid argument
After refreshing the webpage (in the browser) several times, eventually we get a valid output. It appears to depend on the size of the result of the database request.
HPWS Apache32 B.2.0.52.00
ixPostgresql A.03.00-7.4.2.001
The 'configure' options explained in the README.hp of the postgresql product indicates that the program was compiled without the --enable-thread-safety.
This means that the resulting libpq library is not thread safe. Yet it is used by the Apache32 PHP module when interfacing to a postgres database. But this apache is using
threads. Am I missing something here, or
did the HPUX engineers porting the postgresql
forget to think of these thread issues?
We do have a problem with this combination of
software products.
Sometimes PHP webpage accessing the database with pg_connect() and pg_query() fails with
following error:
Warning: pg_exec(): Query failed: could not receive data from server: Invalid argument
After refreshing the webpage (in the browser) several times, eventually we get a valid output. It appears to depend on the size of the result of the database request.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2004 11:27 PM
12-16-2004 11:27 PM
Re: libpq for hpws apache32 thread safe?
We found a workaround for our problem.
Instead of using the synchronous pg_exec() (or pg_query()) we now use the asynchronous calls:
$conn = pg_connect(".....");
pg_send_query($conn, "SELECT ....");
while (pg_connection_busy($conn))
{
usleep(100000);
}
$res = pg_get_result($conn);
This seems to work in all tested cases.
Instead of using the synchronous pg_exec() (or pg_query()) we now use the asynchronous calls:
$conn = pg_connect(".....");
pg_send_query($conn, "SELECT ....");
while (pg_connection_busy($conn))
{
usleep(100000);
}
$res = pg_get_result($conn);
This seems to work in all tested cases.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP