Edit report at https://bugs.php.net/bug.php?id=62479&edit=1
ID: 62479
Comment by: willfitch@php.net
Reported by: brice at bmaron dot net
Summary: PDO-psql cannot connect if password contains spaces
Status: Verified
Type: Bug
Package: PDO related
Operating System: Linux- Debian Stable
PHP Version: 5.3.14
Assigned To: willfitch
Block user comment: N
Private report: N
New Comment:
I have confirmed your findings. Let me do a little sniffing around and see what I
can come up with.
Previous Comments:
------------------------------------------------------------------------
[2012-07-04 12:29:56] brice at bmaron dot net
It seems to be a pdo-psql only ... not affecting other drivers like mysql
------------------------------------------------------------------------
[2012-07-04 08:56:06] brice at bmaron dot net
Description:
------------
When you try to connect to a Postgresql database with a password containing 1 or more spaces, pdo
will fail to connect.
You must escape yourself the user & password and put it into the dsn to make it work.
It may also be true for other databases ... it's not tested
Test script:
---------------
https://gist.github.com/3046155
Expected result:
----------------
See a connection and no error for both tries
Actual result:
--------------
See an error for the first one and a correct result for the second one
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62479&edit=1