Bug #18323 Updated: Bug in DB module
| From: | cox@php.net | Date: | Sat, 13 Jul 2002 16:43:11 +0000 |
| Subject: | Bug #18323 Updated: Bug in DB module | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7704@lists.php.net to get a copy of this message | ||
ID: 18323
Updated by: cox@php.net
Reported By: utirpan@hotmail.com
-Status: Feedback
+Status: Bogus
Bug Type: PEAR related
Operating System: Windows NT 4
PHP Version: 4.2.1
New Comment:
This is not a bug in PHP or DB. PEAR DB provides a way to escape chars
that can be confused with other parts of the DSN.
In this case, you should use:
$pass = urlencode($pass);
$dsn = mysql://foo:$pass@bar
In the lastest version of the parseDSN() function, perhaps there is no
more need to do that, I'll look to see if we can remove that
requirement in the future.
Tomas V.V.Cox
Previous Comments:
------------------------------------------------------------------------
[2002-07-13 09:32:17] floripa@php.net
That's not true (at least on UNIX).
See an example at:
http://www.organiKa.com.br/floripa/PEAR/urldecode.php
I think this maybe not a PEAR related issue but a problem with
urlencode()/urldecode() on Windows.
Can you please try to execute that code on your system to see if you
get the same result as on UNIX?
------------------------------------------------------------------------
[2002-07-12 23:12:48] utirpan@hotmail.com
PEAR/DB.php:line 482
$parsed['password'] = urldecode(substr $str, $pos + 1));
urldecode changes password values:
password="abc+d" -> bcomes -> password="abc d"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18323&edit=1