title: PHP connection to H2DB H2 database
body: <p>How can I connect PHP to an H2 database, so far I tried starting the embedded server with a</p>
  
  <pre><code>$ java -cp h2-1.3.172.jar org.h2.tools.Server
    Web Console server running at http://127.0.1.1:8082 (others can connect)
    TCP server running at tcp://127.0.1.1:9092 (only local connections)
    PG server running at pg://127.0.1.1:5435 (only local connections)
  </code></pre>
  
  <p>installing the pg-sql module under ubuntu</p>
  
  <pre><code> sudo apt-get install php5-pgsql
  </code></pre>
  
  <p>then in my php I have the following</p>
  
  <pre><code>$conn = pg_connect("host=127.0.1.1 port=5435 dbname=/home/frank/testdb user=sa password=");
  </code></pre>
  
  <p>Also tried different ports: 5435, 9092, different host: localhost, 127.0.0.1 but nothing, the returned connection is null or the script hangs.</p>
  
  <p>Any suggestion? </p>