Author |
|
Rain
Joined: 22 Feb 2007 Posts: 4
|
Posted: Thu 22 Feb '07 22:13 Post subject: Socket Issues |
|
|
Hello,
I am fairly new to the whole Apache Server / PHP language. I picked up a book on it, but I cannot seem to get Apache to install. I downloaded a binary and executed it, but I get this:
Code: | <os 10048> Only one usage of each socket address <protocol/network address/port> is normally permitted. : make_sock could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
Unable to open logs
Note the errors or messages, above, and press the <esc> key to exit. |
I tried doing a netstat, but to my surprise the system told me that netstat is not recognized as an internal or external command . So now I have no idea what to do. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 22 Feb '07 23:18 Post subject: |
|
|
That error message means that another programm listen on Port 80 (like skype). Or a firewall blocks port 80.
A list with programs that may causes that issue
http://www.apachelounge.com/viewtopic.php?t=1265 |
|
Back to top |
|
Rain
Joined: 22 Feb 2007 Posts: 4
|
Posted: Thu 22 Feb '07 23:43 Post subject: |
|
|
I tried restarting my computer and now the Apache server seems to run fine. However, when I go to run this script:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>
I get a blank page, with no title. And if I go to view source, nothing shows up..which tells me Apache isn't serving my page like it should. I added all these lines to the apache config file such as:
LoadModule php5_module c:/php5/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir "C:\php5"
Is there anything else I should add in there? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 23 Feb '07 10:04 Post subject: |
|
|
The config is ok.
Please check our error.log |
|
Back to top |
|
Rain
Joined: 22 Feb 2007 Posts: 4
|
Posted: Fri 23 Feb '07 16:15 Post subject: |
|
|
I looked and got these two errors:
Code: | [Fri Feb 23 09:09:59 2007] [error] [client 127.0.0.1] PHP Warning: require_once(SAM/php_sam.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in sam_factory on line 1
[Fri Feb 23 09:09:59 2007] [error] [client 127.0.0.1] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'SAM/php_sam.php' (include_path='.;C:\\php5\\pear') in sam_factory on line 1 |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 23 Feb '07 17:01 Post subject: |
|
|
For testing your pages you should turn on errormessages from PHP.
in php.ini
Code: |
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
|
|
|
Back to top |
|
Rain
Joined: 22 Feb 2007 Posts: 4
|
Posted: Fri 23 Feb '07 17:50 Post subject: |
|
|
I turned them on and still get a blank page . Would an error in PHP really stop the HTML from showing up also? Because as I mentioned before, I don't even get a page title.
Another curious thing that happens is when I modified the php.ini file and restarted the server I get one of those boxes that says "Apache has encountered an error and needs to close". If I hit ok, the box goes away but apache doesn't close and says it's still running. |
|
Back to top |
|