php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19609 mysql_pconnect not verifing host,user and pass
Submitted: 2002-09-26 05:37 UTC Modified: 2002-09-26 08:37 UTC
Votes:5
Avg. Score:4.6 ± 0.5
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:1 (20.0%)
From: gijs at spill dot nl Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.2.2 OS: Redhat 7.X
Private report: No CVE-ID: None
 [2002-09-26 05:37 UTC] gijs at spill dot nl
I have replicated this error op different servers. 

mysql_pconnect does not look at the host,user or password but just assumes the (persistent) link is okee and uses it.

This way once there is a perssistant link and I want to change to a other DB server with a new script mysql_pconnect just takes the old link en does not check if the host,user or password are the same.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-26 06:25 UTC] mfischer@php.net
Are you sure you are not reusing the old link and changing the databse? This of course changes all other scripts database which happen to use the same persistent resource link in their scripts.
 [2002-09-26 08:10 UTC] gijs at spill dot nl
No, let met scetch the situation:

=== action 1 ====
mysql_pconnect(host1,user1,pass1);

than after changing the script

=== action 2 ====
mysql_pconnect(host2,user2,pass2);

PHP then should check if the host,user and pass are the same, these are not. But it still uses the old link. 

If it would work PHP should see there is a difference en start a new link, wouldn't it?
 [2002-09-26 08:24 UTC] georg@php.net
Hmm it works fine here...

Do you use php as module?

Which (mysql)server parameters are specfied for timeouts?

Georg
 [2002-09-26 08:35 UTC] gijs at spill dot nl
Full of shame........



(In place of giving a error a symbolic link was moved up one directory.)
 [2002-09-26 08:37 UTC] georg@php.net
changed status -> bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 08:01:30 2024 UTC