"Alex D." <[EMAIL PROTECTED]> writes:
>
> <b>Warning</b>: pg_connect() [<a
> href='function.pg-connect'>function.pg-connect</a>]: Unable to connect to
> PostgreSQL server: FATAL: database "test" does not exist
> in <b>C:\.............php</b> on line <b>267</b><br />
> {"error":{"origin":2,"code":5,"message":"Kann keine Verbindung mit der DB
> herstellen."},"id":11}
Hi Alex,
It's that FATAL error you're receiving that I've not been able to catch. Any
time the PHP script outputs anything (including this error message), it gets
sent back to the browser. We don't want that. The part of the message that
we want is the last line beginning with : {"error":{"origin"... That's the
JSON message. When qooxdoo receives the error message, it finds that it's not
a valid JSON message and complains bitterly.
Hmmm... I wonder if I catching and ignoring all output in the methods would
work? I don't know if it'd catch error messages, but it might be worth a
try.
Hmmm... I wonder if I should make an attempt to determine if the response is
not JSON and generate a JSON error event due to that? That'd probably be
better than just showing the error in the debug console, but it's putting code
into the client that doesn't belong there. The server shouldn't be sending
the garbage... Hmmm...
In the mean time, please try making one simple change: add an '@' before
pg_connect. Instead of this:
> $db = pg_connect("host=$dburl port=$dbport dbname=$dbname
> user=$dbuser password=$dbpwd");
do this:
$db = @pg_connect("host=$dburl port=$dbport dbname=$dbname
user=$dbuser password=$dbpwd");
That "should" cause the error to be ignored internally, and just have it
returned to your $db variable. Let me know how that works.
Cheers,
Derrell
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel