Apache Questions [was PHP Problems]
Folks, I got some great suggestions a while back about what may be wrong with my PHP5 port and why it wasn't running. However, I still can't make it work. I think the problem may be in Apache itself - my setup, not the port - because when I try to open an html file on my machine using: http://localhost it comes back with: ********************* Unable to connect Firefox can't establish a connection to the server at localhost. * The site could be temporarily unavailable or too busy. Try again in a few moments. * If you are unable to load any pages, check your computer's network connection. * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. ********************* Likewise, if I use my local network IP: http://10.0.0.2 it still can't connect. If I open the files directly (via Finder) with Firefox they work fine, but with: file::://opt/local/apache2/htdocs/index.html as the URL, so I know it isn't going through Apache for that. Running the port installed command searching for apache comes up with: Mac-The-Knife:/opt/local/apache2/htdocs Captain$ port installed | grep apache2 apache2 @2.2.8_0 (active) php5 @5.2.5_1+apache2+macosx+mysql5 (active) If I read this correctly it means that Apache2 should be running. I would appreciate any help I can get on this problem. In A Chord, Tom Condon Bass, Agate Passage Quartet Bass & Proud Member, Kitsap Chordsmen Dir. Music Education, Evergreen District, BHS
Did you check to see if apache was running/started? I am not an expert but here is what I would try... I'm not sure what version of OSX you are running but I have the latest version of Tiger, fyi. Here is what I see when I run the following commands from terminal: ps -aux | grep httpd I get results like: ... www 158 0.0 -0.3 46292 6036 ?? S Sat05PM 0:04.42/opt/local/apache2/bin/httpd -k start ... if you dont see any httpd daemons in your process list, then apache might not be running. You can start it by issuing the command /opt/local/apache2/bin/apachectl start Then check to see if localhost works in your browser. On Wed, Mar 12, 2008 at 11:23 AM, Thomas Condon <tomc@sounddsl.com> wrote:
Folks,
I got some great suggestions a while back about what may be wrong with my PHP5 port and why it wasn't running. However, I still can't make it work.
I think the problem may be in Apache itself - my setup, not the port - because when I try to open an html file on my machine using: http://localhost
it comes back with:
********************* Unable to connect
Firefox can't establish a connection to the server at localhost.
* The site could be temporarily unavailable or too busy. Try again in a few moments. * If you are unable to load any pages, check your computer's network connection. * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. *********************
Likewise, if I use my local network IP: http://10.0.0.2
it still can't connect.
If I open the files directly (via Finder) with Firefox they work fine, but with: file::://opt/local/apache2/htdocs/index.html as the URL, so I know it isn't going through Apache for that.
Running the port installed command searching for apache comes up with:
Mac-The-Knife:/opt/local/apache2/htdocs Captain$ port installed | grep apache2 apache2 @2.2.8_0 (active) php5 @5.2.5_1+apache2+macosx+mysql5 (active)
If I read this correctly it means that Apache2 should be running.
I would appreciate any help I can get on this problem.
In A Chord,
Tom Condon Bass, Agate Passage Quartet Bass & Proud Member, Kitsap Chordsmen Dir. Music Education, Evergreen District, BHS _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Just because its installed doesnt mean its running. Do you see any httpd processes running when you run "ps auxwww | grep http"? Is anything listening on port 80 when you run "netstat -an"? You probably need to load the launch daemon that got installed. Some help text about this should have popped up during "port install", but you might try: sudo launchctl load -w /Library/LaunchDaemon/org.macports.apache2.plist -Bill On Mar 12, 2008, at 10:23 AM, Thomas Condon wrote:
Folks,
I got some great suggestions a while back about what may be wrong with my PHP5 port and why it wasn't running. However, I still can't make it work.
I think the problem may be in Apache itself - my setup, not the port - because when I try to open an html file on my machine using: http://localhost
it comes back with:
********************* Unable to connect
Firefox can't establish a connection to the server at localhost.
* The site could be temporarily unavailable or too busy. Try again in a few moments. * If you are unable to load any pages, check your computer's network connection. * If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. *********************
Likewise, if I use my local network IP: http://10.0.0.2
it still can't connect.
If I open the files directly (via Finder) with Firefox they work fine, but with: file::://opt/local/apache2/htdocs/index.html as the URL, so I know it isn't going through Apache for that.
Running the port installed command searching for apache comes up with:
Mac-The-Knife:/opt/local/apache2/htdocs Captain$ port installed | grep apache2 apache2 @2.2.8_0 (active) php5 @5.2.5_1+apache2+macosx+mysql5 (active)
If I read this correctly it means that Apache2 should be running.
I would appreciate any help I can get on this problem.
In A Chord,
Tom Condon Bass, Agate Passage Quartet Bass & Proud Member, Kitsap Chordsmen Dir. Music Education, Evergreen District, BHS _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
---- William Siegrist Software Support Engineer Mac OS Forge http://macosforge.org/ wsiegrist@apple.com 408 862 7337
Matt Hippely wrote:
Did you check to see if apache was running/started? I am not an expert but here is what I would try... I'm not sure what version of OSX you are running but I have the latest version of Tiger, fyi. Here is what I see when I run the following commands from terminal: ps -aux | grep httpd I get results like: ... www 158 0.0 -0.3 46292 6036 ?? S Sat05PM 0:04.42/opt/local/apache2/bin/httpd -k start ...
if you dont see any httpd daemons in your process list, then apache might not be running. You can start it by issuing the command /opt/local/apache2/bin/apachectl start Then check to see if localhost works in your browser.
Thanks Matt & William. That did the trick. I think that the machine locked up after the port finished running, but before I got around to readying what was on the screen. So after re-boot I found it installed and active (according to the port command), but that apparently does not mean it is running. Curious difference, that. Anyway, after adding a symbolic link to my directory there is joy in Mudville! Thanks, again, to all who helped me along. In A Chord, Tom Condon Bass, Agate Passage Quartet Bass & Proud Member, Kitsap Chordsmen Dir. Music Education, Evergreen District, BHS
On Mar 12, 2008, at 14:31, Thomas Condon wrote:
I think that the machine locked up after the port finished running, but before I got around to readying what was on the screen. So after re-boot I found it installed and active (according to the port command), but that apparently does not mean it is running. Curious difference, that.
"active" means a port is installed and ready for you to use. Most ports don't have daemon processes that stay running. Those that do provide launchd plists, which you can use launchctl to start and stop as desired.
participants (4)
-
Matt Hippely
-
Ryan Schmidt
-
Thomas Condon
-
William Siegrist