The defaults for missing optional parameters are taken from the PBMS configuration settings in the PHP configuration file.
When a call is made to pbms_connect() a new connection will always be opened unless pool connections are being used and there is an unused connection in the connection pool for the given set of arguments.
The connection to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling pbms_close(). The exception being pool connections which when closed are released back to the pool so that they can be used again by a future call to pbms_connect() or pbms_pconnect().
It is recommended that you always call pbms_close() after you are through using a connection so that it's resources can be freed immediately and in the case of pool connections the connection can be released back t the pool where it will be available for the next pbms_connect() or pbms_pconnect() call.
The first time a new connection is opened the PBMS BLOB streaming server will be pinged to verify that all the connection parameters, with the exception of $database, are good.
On success A PBMS connection resource is returned.
On failure FALSE is returned and an error message is displayed.
<?php // In the event that pbms_connect() fails // allow error messages to be displayed. $val = ini_set("display_errors", "1"); $pbms = pbms_connect("localhost", 8080, "A_database") or die("Could not connect"); ini_set("display_errors", $val); pbms_close($pbms); ?>