johnnc Posted March 16, 2009 Share Posted March 16, 2009 Hi All, I am fairly new to Apache. I have it installed and currently running on my Vista Ultimate Laptop. When I am connected to my home network, the Apache service starts and everything works just fine. If I take my laptop to another location, the Apache service will not start. The second issue I have is regarding the way I access my Apache server via the laptop. Since installation and configuration I have been able to hit my server using http://localhost/site. I haven't made any changes and I can no longer hit localhost. I have to specifically call the IP address of the laptop. I appreciate any help with these two issues. thanks in advance, John Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/ Share on other sites More sharing options...
wildteen88 Posted March 16, 2009 Share Posted March 16, 2009 As for your second issue, Go to Start > Programs > Accessories. Right click on Notepad and select Run as Administrator (this is required in vista to edit the hosts file), Now go to File > Open. In the Filename box type in C:\Windows\System32\drivers\etc\hosts See if you have the following line in there 127.0.0.1 localhost If you can find it, add it. Save the file and try http://localhost/ again. When I am connected to my home network, the Apache service starts and everything works just fine. If I take my laptop to another location, the Apache service will not start. When this happens. Have a look at your Apache error log. Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786059 Share on other sites More sharing options...
johnnc Posted March 16, 2009 Author Share Posted March 16, 2009 Thanks Wildteen, problem #2 has been solved. I will post the error log when I restart the computer disconnected from my network. Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786144 Share on other sites More sharing options...
johnnc Posted March 16, 2009 Author Share Posted March 16, 2009 I restarted my laptop with the network cable unplugged. Apache runs as a service and starts automatically on startup. The service did not start. I looked at the error log and there isn't an entry. I then tried to start the process manually. When that failed I looked at the error log again, and still, no entry. I plugged the network cable in and hit Start and the service started immediately. Here is the resulting entries in my error log: PHP Warning: Module 'mysql' already loaded in Unknown on line 0 [Mon Mar 16 13:35:47 2009] [notice] Child 6004: Child process is running [Mon Mar 16 13:35:47 2009] [notice] Child 6004: Acquired the start mutex. [Mon Mar 16 13:35:47 2009] [notice] Child 6004: Starting 64 worker threads. [Mon Mar 16 13:35:47 2009] [notice] Child 6004: Starting thread to listen on port 80. [Mon Mar 16 13:35:47 2009] [notice] Child 6004: Starting thread to listen on port 80. Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786155 Share on other sites More sharing options...
corbin Posted March 16, 2009 Share Posted March 16, 2009 You have an extra extension=mysql.dll line in your PHP.ini judging from teh Module already loaded error. The rest of the notices mean that Apache started lol. What is Listen set to in httpd.conf? Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786228 Share on other sites More sharing options...
johnnc Posted March 16, 2009 Author Share Posted March 16, 2009 Thanks corbin, I will check the php.ini file. Here are the 2 Listen entries Listen localhost:80 Listen 192.168.1.68:80 Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786258 Share on other sites More sharing options...
wildteen88 Posted March 16, 2009 Share Posted March 16, 2009 Remove/Comment out this line Listen 192.168.1.68:80 Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786276 Share on other sites More sharing options...
johnnc Posted March 17, 2009 Author Share Posted March 17, 2009 That did it. Thank you very much, I really appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/149678-apache-wont-start-when-not-connected-to-home-network/#findComment-786330 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.