<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: libpq for hpws apache32 thread safe? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/libpq-for-hpws-apache32-thread-safe/m-p/3444987#M851725</link>
    <description>We found a workaround for our problem.&lt;BR /&gt;Instead of using the synchronous pg_exec() (or pg_query()) we now use the asynchronous calls:&lt;BR /&gt;&lt;BR /&gt;$conn = pg_connect(".....");&lt;BR /&gt;pg_send_query($conn, "SELECT ....");&lt;BR /&gt;while (pg_connection_busy($conn))&lt;BR /&gt;{&lt;BR /&gt;      usleep(100000);&lt;BR /&gt;}&lt;BR /&gt;$res = pg_get_result($conn);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This seems to work in all tested cases.&lt;BR /&gt;</description>
    <pubDate>Fri, 17 Dec 2004 07:27:27 GMT</pubDate>
    <dc:creator>Stefan Beelen</dc:creator>
    <dc:date>2004-12-17T07:27:27Z</dc:date>
    <item>
      <title>libpq for hpws apache32 thread safe?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/libpq-for-hpws-apache32-thread-safe/m-p/3444986#M851724</link>
      <description>We installed on HPUX 11.23 IPF machines following software:&lt;BR /&gt;HPWS Apache32 B.2.0.52.00&lt;BR /&gt;ixPostgresql A.03.00-7.4.2.001&lt;BR /&gt;&lt;BR /&gt;The 'configure' options explained in the  README.hp of the postgresql product indicates that the program was compiled without the --enable-thread-safety.&lt;BR /&gt;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&lt;BR /&gt;threads. Am I missing something here, or&lt;BR /&gt;did the HPUX engineers porting the postgresql&lt;BR /&gt;forget to think of these thread issues?&lt;BR /&gt;&lt;BR /&gt;We do have a problem with this combination of&lt;BR /&gt;software products.&lt;BR /&gt;Sometimes PHP webpage accessing the database with pg_connect() and pg_query() fails with&lt;BR /&gt;following error:&lt;BR /&gt;Warning: pg_exec(): Query failed: could not receive data from server: Invalid argument &lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Dec 2004 09:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/libpq-for-hpws-apache32-thread-safe/m-p/3444986#M851724</guid>
      <dc:creator>Stefan Beelen</dc:creator>
      <dc:date>2004-12-16T09:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: libpq for hpws apache32 thread safe?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/libpq-for-hpws-apache32-thread-safe/m-p/3444987#M851725</link>
      <description>We found a workaround for our problem.&lt;BR /&gt;Instead of using the synchronous pg_exec() (or pg_query()) we now use the asynchronous calls:&lt;BR /&gt;&lt;BR /&gt;$conn = pg_connect(".....");&lt;BR /&gt;pg_send_query($conn, "SELECT ....");&lt;BR /&gt;while (pg_connection_busy($conn))&lt;BR /&gt;{&lt;BR /&gt;      usleep(100000);&lt;BR /&gt;}&lt;BR /&gt;$res = pg_get_result($conn);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This seems to work in all tested cases.&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Dec 2004 07:27:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/libpq-for-hpws-apache32-thread-safe/m-p/3444987#M851725</guid>
      <dc:creator>Stefan Beelen</dc:creator>
      <dc:date>2004-12-17T07:27:27Z</dc:date>
    </item>
  </channel>
</rss>

