#19952 [Opn->Bgs]: PEAR DB plus "+" sign in password field
| From: | iliaa@php.net | Date: | Tue, 29 Oct 2002 05:08:19 +0000 |
| Subject: | #19952 [Opn->Bgs]: PEAR DB plus "+" sign in password field | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10315@lists.php.net to get a copy of this message | ||
ID: 19952
Updated by: iliaa@php.net
Reported By: miki_fossati@libero.it
-Status: Open
+Status: Bogus
Bug Type: PEAR related
Operating System: linux SUSE 7.1
PHP Version: 4.2.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
If your password contains non-alphanumeric characters do a urlencode()
on the value before passing it if you are using the
"mysql://foo:bar+@localhost/foo" format to pass data to DB::connect();
Previous Comments:
------------------------------------------------------------------------
[2002-10-17 09:18:08] miki_fossati@libero.it
Here's a little test:
<?php
$failDsn = "mysql://foo:bar+@localhost/foo";
$succDsn = array(
"phptype" => "mysql",
"hostspec" => "localhost",
"database" => "foo",
"username" => "foo",
"password" => "bar+"
);
$failDb = DB::connect($failDsn, true);
$succDb = DB::connect($succDsn, true);
if (DB::isError($failDb)) {
echo "failDsn incorrect?\n";
}
if (DB::isError($succDb)) {
echo "Hey! are you kidding?\n";
}
?>
It seems that the plus "+" sign in the password field causes a bad
parsing on the DSN string.
./configure --with-apxs=../apache/bin/apxs --with-mcrypt --with-mhash
--with-xml --with-mysql=../mysql/ --enable-cli --enable-pcntl
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19952&edit=1