note 14820 added to function.pg-connect.php

From: Date: Thu, 16 Aug 2001 07:29:09 +0000
Subject: note 14820 added to function.pg-connect.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16789@lists.php.net to get a copy of this message
Hi ! There are some confusion for me. Could you help me ? Suppose I write a program by php and connect the postgresql database through web page. If I use the providing API from PHP connect to postgresql database, like that pg_connect(); ==> $connection = pg_connect("$constr user='$USER' password='$PW'"); Actually It should be closed the connection after access finished, like that pg_close(); ==> pg_close($connection); But if the user force to close the web page that means have not close the connection. I want to ask the connection will be closed by Apache Server automatic ? or when user closed the web page the connection will be closed at the same time ? If the connection have not been closed automatic. So the Apache Server will keep the connect port forever ? Actually the connection port handle by Apache Server or PHP ? Details: ================= PHP 4.0.3pl1 PostgresSQL 7.0.3 Apache Server 1.3.14 Linux Redhat 6.2 http://www.php.net/manual/en/function.pg-connect.php

« previous php.notes (#16789) next »