php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16897 PHP connecting with localhost.localdomain overiding every host in mysql_connect
Submitted: 2002-04-29 04:37 UTC Modified: 2002-04-29 04:46 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:0 (0.0%)
From: gijs at spill dot nl Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.2.0 OS: Redhat 7.2
Private report: No CVE-ID: None
 [2002-04-29 04:37 UTC] gijs at spill dot nl
OS: Redhat 7.1 and 7.2 


When using php 2.0 php is overiding vars.

When I do:

mysql_connect("localhost",user,pass);

PHP changes "localhost"(and all other input) in to "localhost.localdomain". 

This way nobody can connect to mysql(standard "localhost") or any other remote mysql service. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-29 04:44 UTC] gijs at spill dot nl
php 2.0 is of course PHP 4.2.0
 [2002-04-29 04:46 UTC] mfischer@php.net
This will be fixed in 4.2.1

In the meantime you can fix it for 4.2.0 by rebuilding the ./conifgure script in php4/ with autoconf 2.13 (NOT 2.52) and run configure again.

 [2002-05-04 11:18 UTC] jason at jasonnelms dot com
I am new to linux and not sure how to do the whole rebuild thing required here.  Is there an ETA on 4.2.1's release?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 13:01:33 2025 UTC