Bug #62479 [NEW]: PDO-psql cannot connect if password contains spaces
From: brice at bmaron dot net
Operating system: Linux- Debian Stable
PHP version: 5.3.14
Package: PDO related
Bug Type: Bug
Bug description:PDO-psql cannot connect if password contains spaces
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 bug report at https://bugs.php.net/bug.php?id=62479&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62479&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62479&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62479&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62479&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62479&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62479&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62479&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62479&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62479&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62479&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62479&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62479&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62479&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62479&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62479&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62479&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62479&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62479&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62479&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62479&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62479&r=mysqlcfg
Thread (16 messages)
- brice at bmaron dot net
- brice at bmaron dot netBug #62479 [Opn]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Opn->Ver]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Com]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Ver]: PDO-psql cannot connect if password contains spaces
- iliaa@php.netBug #62479 [PATCH]: PDO-psql cannot connect if password contains spaces
- iliaa@php.netBug #62479 [Ver]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Com]: PDO-psql cannot connect if password contains spaces
- stas@php.netBug #62479 [Ver]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Com]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Com]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Com]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Ver]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Ver->Csd]: PDO-psql cannot connect if password contains spaces
- ab@php.netBug #62479 [Csd]: PDO-psql cannot connect if password contains spaces
- willfitch@php.netBug #62479 [Csd]: PDO-psql cannot connect if password contains spaces