BlinkSumGreen Posted September 27, 2007 Share Posted September 27, 2007 I'm trying to learn PHP and am trying to set up Apache and I changed the httpd.conf file and added: LoadModule php5_module c:/php5/php5apache2_2.dll I tried putting a practice file in my htdocs folder and tried to open in a browser, but it won't recognize it... Ok... when I try to start Apache now, it says: 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 Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/ Share on other sites More sharing options...
wildteen88 Posted September 27, 2007 Share Posted September 27, 2007 That error basically means something else is running on port 80 and so Apache cannot listen on that port. Without a port Apache cannot run. Apache uses port 80 by default for TCP/IP requests. Either stop the application/service that is using port 80 or configure Apache to use a different port such as port 8080 by changing the Listen directive in the httpd.conf from: Listen 80 to Listen 8080 Save httpd.conf and restart Apache. Open your web browser and go to http://localhost:8080/ Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-356557 Share on other sites More sharing options...
BlinkSumGreen Posted September 28, 2007 Author Share Posted September 28, 2007 Ok, I did that, and when I clicked on that link I got the "It Works" message. But I still get the "Problem loading page" page when I try to open the php file. Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-356867 Share on other sites More sharing options...
wildteen88 Posted September 28, 2007 Share Posted September 28, 2007 What is your DocumentRoot set to? By default it'll be set to something like C:/Program Files/Apache Foundation/Apache2/htdocs (If you used the default installation path when installing Apache) you must place all your web related files in that folder. This is where Apache serves the files from when you got to localhost. Also remove all existing files in the htdocs folder. That way when you go to localhost you'll see a list of files and folders currently located in your DocumentRoot rather than a "It Works" page. If you are creating your php files in Notepad or similar editor make sure you set the File Type dropdown box to All Files. Otherwise the editor may add on .txt to the end of the file name. Which will result in your php file being named filename.php.txt and not filename.php. Windows has habit of hiding file extensions from filenames when viewing files in a folder in Windows Explorer. I always disable the option called "Hide extensions for known file types" in Tools > Folder Options > General Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-357343 Share on other sites More sharing options...
BlinkSumGreen Posted September 28, 2007 Author Share Posted September 28, 2007 Ok, I checked and it was named phpinfo.php.txt, so I changed it and changed the "hide extensions" option. But I'm still getting the "Problem Loading Page". DocumentRoot "D:/apache2/htdocs" And that's where I have the file. Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-357389 Share on other sites More sharing options...
BlinkSumGreen Posted October 2, 2007 Author Share Posted October 2, 2007 Still need help... Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-359821 Share on other sites More sharing options...
wildteen88 Posted October 2, 2007 Share Posted October 2, 2007 Can you attach Apaches httpd.conf file here. Maybe you have a stray mis-configuration setting. I'm not sure what else to suggest. Make sure you are going http://localhost:8080/ and not just http://localhost/ when viewing phpinfo.php. ALso did you remove all files in D:/apache2/htdocs ? What is displayed when you go to localhost? You should see all files and folders stored in your htdocs folder. Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-360203 Share on other sites More sharing options...
BlinkSumGreen Posted October 3, 2007 Author Share Posted October 3, 2007 That was it! I had been using just localhost instead of localhost8080:... Thank you very much! Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-360540 Share on other sites More sharing options...
wildteen88 Posted October 3, 2007 Share Posted October 3, 2007 Remember earlier I got you you to change the port Apache listens too for TCP/IP requests, you changed it to 8080 instead of using the default which was 80. Anytime you go to localhost now you must state the port number too. Glad everything is working now. Quote Link to comment https://forums.phpfreaks.com/topic/70842-php-installation-help/#findComment-361016 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.