Re: Waiting for localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




------------ Original Message ------------
> Date: Wednesday, April 01, 2015 00:05:29 -0400
> From: Ethan Rosenberg <erosenberg@xxxxxxxxxxxxxxxxxxxx>
> To: php-db@xxxxxxxxxxxxx
> 
> Richard -
> 
> As we saw in the Apache list, the problem lies in PHP/MySQL
> 
> To quote --
> 
> "
> Date: Tuesday, March 31, 2015 02:18:13 -0400
> From: "Ethan Rosenberg, PhD" <erosenberg@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: [users@httpd] Apache is Slow
> 
> Some more info....
> 
> Changed the host in the connect
> 
> $cxn = mysqli_connect($host,$user,$password);
> 
> $host="127.0.1.1";
> 
> Now get an error...
> 
> Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL
> server on '127.0.1.1' (111) in /var/www/HandleWeight.php on line 56
> Connect Error (2003) Can't connect to MySQL server on '127.0.1.1'
> (111)
> 
> The correct IPnumber for "localhost" is "127.0.0.1". I wouldn't
> generally expect anything to answer on "127.0.1.1".
> 
> Separately, I think that this likely proves that this isn't an
> apache issue. You're getting to the mysql reference in the php
> script that  you're calling (from the js reference) and it's
> failing there because of the incorrect IPnumber.
> 
> -->> So, apache is responding fine and it's seemingly your script
> that has problems.
> "
> 
> All this having been said, I have attached HandleWeight.php
> Hopefully this will assist us in finding the error.
> 
> TIA
> 
> Ethan
> 


I, at least, am not here to do your work for you.

  > Hopefully this will assist us in finding the error.

[if you want private consulting, contact me (or likely many others
on this list), off-list for our rates.]

As has been said previously, you need to do very basic debugging.
You may need to take your script apart and test it piece by piece,
including db, includes, whatever calls/references. Check your
variables going in and out to make certain they hold the values you
expect. Check your typing to make certain that things are properly
named/referenced (e.g., that you're using the correct IPnumber for
"localhost").

If/when you have a specific issue that you are having a problem
with, feel free to post it to the list. Dumping a whole php script,
context-free, and hoping that we will do your work for you is really
not the way to get any assistance.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux