Forum Moderators: phranque
I installed Apache2.0.59 and PHP5.1.6 on my pc (pc using windowXP home edition)
Apache location: C:/Program Files/Apache Group/Apache2/
PHP location: C:/Program Files/php
I have two issues
A - <os 1048> 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
I first used defalut port: port 80 I got this message, then I changed port to 8080 I still have the same
message when i click start icon on window menu.
a) I did some online research results indicates that cause of this error message is that there are other application(s) also listen to
the same port.
result from dos-prompt:
C:\Documents and Settings\jeff shu>netstat -a -n -o
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1036
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1920
b) Apache server informatin set up:
Network Domain: localhost
Server Name: localhost
Admin Email: (your any email)
my computer name is Lutus006 I hope this won't cause any problem
-- modification I have done to the httpd.conf file
a) Listen 8080
b) NameVirtualHost *:8080
c) DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs
d) I add these lines at the end of the conf file:
<VirtualHost *:8080>
NameVirtualHost *:8080
</VirtualHost>
e) I inserted the following lines at the beginning of httpd.conf file in order for Apache server to recognize php
LoadModule php5_module php5apache2.dll
AddType application/x-httpd-php .php
PHPIniDir "c:/program files/php"
**I noticed this line in conf file: "ServerName localhost:80" it still point to port 80 should I change this to 8080 as well?
UseCanonicalName Off
Please give me some suggestion on which variable(s) I need to modify once I changed port number to 8080
B - My second issue is the test.php file won't work
I installed PHP 5.1.6 at C:\Program Files\php. I used a test.php script saved in C:/Program Files/Apache Group/Apache2/htdocs folder.
script content:
<?php
echo 'PHP is working.<br>';
echo phpinfo();
?>
I checked in IE browser the results says it couldn't find [localhost...] or couldn't find [localhost...]
same result in Firfox browser: can't connect to server local host
Rename c:\php\php.ini-dist to php.ini
I did following modification to php .ini file
a) Changed doc_root = "C:\Program Files\Apache Group\Apache2\htdocs"
b) extension_dir = "C:\Program Files\php\ext"
c) I copied the follwing files to Apache2 folder
C:\php\php5ts.dll
C:\php\sapi\php5apache2.dll
C:\php\php.ini
d) I add php path C:\Program Files\php to system path list
Please help me to troubleshoot my issues, I appreciate your suggestions and I hope I can learn from this trial and error process:)
Jeff
10-2-06
I would suggest reinstalling your Apache Server. Also, make sure to follow the steps outlined here [webmasterworld.com] to installing everything else properly. Keep everything default once you reinstall.
Good luck!