ID: 25963 User updated by: edechaux at irci dot fr Reported By: edechaux at irci dot fr -Status: Feedback +Status: Open Bug Type: PostgreSQL related Operating System: Linux 2.4.21 PHP Version: 4.3.3 New Comment:
I tried with the lastest CVS and there is no changes. Here is a sample code : ----file toto.php---- <? if (! pg_connect ('blablabla')) { echo '{' . $php_errormsg . '}'; } ?> -------- I execute 'php toto.php'. It displays : {Unable to connect to PostgreSQL server: missing "=" after "blablabla" in connection info string .} As you can see there is a newline character between 'string' and '.'. This newline character mess up the html code if you d'ont remove it... It still works, but it break your html code format :p Previous Comments: ------------------------------------------------------------------------ [2003-10-23 14:02:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip If that doesn\'t help please send a short example. ------------------------------------------------------------------------ [2003-10-23 05:50:09] edechaux at irci dot fr Description: ------------ When a connection to a Postgres database fails, the error message which is in the $php_errormsg variable ends with the following string : '\n\n.' The final '.' is quite anoying because you just can't 'trim' the $php_errormsg, you must 'trim ($php_errormsg, "\n.")' to remove the dot and the newline characters. Could it be possible to remove the final dot, or even the final '\n\n.' string ? Thanks. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25963&edit=1