|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-30 14:01 UTC] cox@php.net
[2002-06-30 18:12 UTC] tim-phpbug at bitgems dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
I'm using a DSN of the format: mysql://database:password@localhost:/path/to/port/mysql.sock/squirrel Which seemed like it should work, but it fails because of the way PEAR parses the DSN: Instead of looking for the last / to deliniate the database, it looks for the first. I changed the following lines in DB.php, in the function parseDSN, at line 502: ... if (strpos($dsn, '/') !== false) { // **THM** $offset = strrpos($dsn,'/') ; $proto_opts = substr($dsn,0,$offset) ; $dsn = substr($dsn,$offset+1); // old: list($proto_opts, $dsn) = explode('/', $dsn, 2); } else { ... This fixes the problem and should remain compatible with numeric ports as well. A quick scan of the web site didn't reveal how to submit patches, so I hope this is Kosher.