Re: Newbie Question - SOLVED

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

 



On Sun, Jun 15, 2014 at 11:53:47PM -0400, Ethan Rosenberg, PhD wrote:

> On 06/15/2014 09:19 PM, Paul M Foster wrote:
> >On Sun, Jun 15, 2014 at 07:49:48PM -0400, Ethan Rosenberg, PhD wrote:
> >
> >>On 06/15/2014 06:38 PM, Ethan Rosenberg wrote:
> >>>Dear List -
> >>>
> >>>I  always ran my php files as /localhost/myfile.php. Now the system
> >>>cannot find the files.  It says "waiting for local host" and stays in an
> >>>infinite loop.  All the files are in /var/www.
> >>>
> >>>TIA
> >>>
> >>>Ethan
> >>>
> >>I thought it was Microsoft .....
> >>
> >>Rebooted and it worked.
> >>
> >>Using Debian 7 Testing
> >
> >Don't get in the habit of rebooting when things like this happen. While
> >it's often necessary in Windows, as we all know Windows is a defect
> >disguised as an operating system. In Linux, most things can be fixed
> >without a reboot, simply by starting and restarting services.
> >
> >Paul
> >
> Paul -
> 
> Thanks.
> 
> Please give me ideas as to what you would have done.
> 
> I restarted Apache, used /localhost in the browser, and got a
> response, and then punted.
> 
> TIA
> 
> Ethan
> --
> 
> Paul -
> 
> I hope this time I have it....
> 
> I had an active Netbeans debug session open.
> 
> Closed the debug session and all was fine.
> 

First, I'm assuming that you're doing this in a browser, and that you
have Apache set up so that it runs on your local machine, and that the
files you're trying to access are also on your local machine.

Ensure that what you're surfing to is http://localhost/myfile.php (note
the http:// prefix). Ensure that apache is running, like this:

ps ax | grep apache

If not, start it like this:

/etc/init.d/apache2 start

(To REstart apache, use /etc/init.d/apache2 restart. To stop it,
/etc/init.d/apache2 stop.)

To check that your network is properly configured (at least as far as
localhost is concerned), you can try:

ping -c 3 localhost

If it doesn't answer up, then you have network issues.

As root, you can try ifconfig with no parameters to see what interfaces
are "up". But normally, a machine with have a localhost response even if
the rest of the network is down.

You can telnet into your own box on port 80 (the www port where your
browser lives) with

telnet localhost 80

It should respond immediately and positively. This is like pinging, but
with TCP instead of just IP (like ping).

All of this is just diagnostic stuff to narrow down the actual issue, if
things don't work as they should or as expected, and really have nothing
to do with PHP.

Now, I know virtually nothing about Netbeans. If you're trying to do
this through Netbeans, all bets are off. I don't enough about it to help
you.

Because localhost is so fundamental to all linux distros, I'm inclined
to believe that there's some hidden factor we're not aware of here, like
a misspelling or incorrect punctuation (http://). Likewise with Apache.
Unless you installed some other server and not apache, apache2 should be
in your process list and should be hard to bring down. Apache just isn't
prone to crashing that way. You can always try simply (in a browser)
http://localhost and see the default "It works!" page from apache. If
that works, then you know apache is working, and localhost is answering
up as it should. If all that works and myfile.php doesn't, then you need
to dig deeper into what's in your myfile.php, where it is, etc.

That's probably as far as I can go. You haven't isolated this as a PHP
problem, and non-PHP problems on this list are considered static (as in
signal-to-noise ratio).

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux