Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Problems installing apache 2.2.6 and configuring Php 5.2.4 |
|
Author |
|
Pete
Joined: 26 Sep 2007 Posts: 4
|
Posted: Wed 26 Sep '07 15:29 Post subject: Problems installing apache 2.2.6 and configuring Php 5.2.4 |
|
|
Hi everyone!
I'm trying to install Apache 2.2.6 and configure it to PHP 5.2.4 on win xp home.
I would like to have Apache, PHP and MySQL on my computer so as to learn how to use them locally. I must admit that one of my problems here is being overwhelmed by the amount of information available on even some simple installation tutorials and it would appear my configuration is not going so well!
Firstly, whenever I try and 'start' Apache through the windows start menu, I get the seemingly common 'cannot bind to 0.0.0.0:80 port' error message. (Test configuration says 'syntax ok').
'cntrl,alt,del' says httpd.exe is running and netstat -abn suggests httpd.exe is listening on 0.0.0.0:80 is that the local host and therefore not relevant?
This is what I can tell you about Apache:
Code: | Saved in - "C:\Program Files\Apache Software Foundation\Apache2.2" |
httpd.conf information:
Code: | ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2" |
Code: | DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" |
In the document root, should these be back or forward slashes to correlate with the folder it is saved in i.e C:\Program Files\Apache Software...etc?
I have also added this to httpd.conf as instructed by a tutorial in regards to configuring it for php 5.2.4 -
Code: | LoadModule php5_module "c:\Program Files\PHP\php5apache2_2.dll"
PHPIniDir "c:\Program Files\PHP\php.ini" |
I then tried putting this at the end of httpd.conf to see if it solved anything, but Im not sure it did! -
Code: | Win32DisableAcceptEx |
When I look at the error logs I have a lot of information -
Code: | [Wed Sep 26 16:03:59 2007] [notice] Apache/2.2.6 (Win32) configured -- resuming normal operations
[Wed Sep 26 16:03:59 2007] [notice] Server built: Sep 5 2007 08:58:56
[Wed Sep 26 16:03:59 2007] [notice] Parent: Created child process 4004
[Wed Sep 26 16:03:59 2007] [notice] Child 4004: Child process is running
[Wed Sep 26 16:03:59 2007] [notice] Child 4004: Acquired the start mutex.
[Wed Sep 26 16:03:59 2007] [notice] Child 4004: Starting 250 worker threads.
[Wed Sep 26 16:03:59 2007] [notice] Child 4004: Starting thread to listen on port 80.
[Wed Sep 26 16:03:59 2007] [error] (OS 10038)An operation was attempted on something that is not a socket. : Child 4004: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive. |
The last entry repeats itself for quite a while until...
Code: | PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_msql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_msqli.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Wed Sep 26 19:48:51 2007] [notice] Apache/2.2.6 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Wed Sep 26 19:48:51 2007] [notice] Server built: Sep 5 2007 08:58:56
[Wed Sep 26 19:48:51 2007] [notice] Parent: Created child process 1360
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_msql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_msqli.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Wed Sep 26 19:48:51 2007] [notice] Child 1360: Child process is running
[Wed Sep 26 19:48:51 2007] [notice] Child 1360: Acquired the start mutex.
[Wed Sep 26 19:48:51 2007] [notice] Child 1360: Starting 250 worker threads.
[Wed Sep 26 19:48:51 2007] [notice] Child 1360: Starting thread to listen on port 80. |
which also repeats until the last few entries...
Code: | [Wed Sep 26 21:50:46 2007] [notice] Child 1008: Child process is running
[Wed Sep 26 21:50:46 2007] [notice] Child 1756: Released the start mutex
[Wed Sep 26 21:50:46 2007] [notice] Child 1756: Waiting for 250 worker threads to exit.
[Wed Sep 26 21:50:46 2007] [notice] Child 1008: Acquired the start mutex.
[Wed Sep 26 21:50:46 2007] [notice] Child 1008: Starting 250 worker threads.
[Wed Sep 26 21:50:46 2007] [notice] Child 1756: All worker threads have exited.
[Wed Sep 26 21:50:46 2007] [notice] Child 1756: Child process is exiting
[Wed Sep 26 21:50:47 2007] [notice] Child 1008: Listening on port 80. |
Sorry for all that but I want to try and provide the info you might need to help?!
I have tried shutting my firewalls completely, rebooting etc but I dont know what a 'vpn' is. Should I not be using a dynamic IP? I'm sure I'm doing something blindingly obviously wrong, but at the moment I can't see the wood for the trees!
In regards to configuring to PHP, some of the information regarding the .dll files is included in the apache error logs, but here is the information I have changed in the php.ini file -
Code: | display_errors = On |
Code: | doc_root = C:/Program Files/Apache Software Foundation/Apache2.2/htdocs
|
Code: |
extension=php_msql.dll
extension=php_msqli.dll |
Again, these changes were made as instructed by a tutorial but I'm not sure if they are correct?
PHP files are saved in -
Code: | C:\Program Files\PHP |
According to another tutorial when installing PHP I was instructed to copy this - Code: | <?php phpinfo(); ?> | into notepad and save it into Code: | C:\Program Files\Apache Software Foundation\Apache2.2\htdocs |
which when viewed on the local host would return a table of information. It didnt! All that appeared in the browser was an exact replica of what was written in the notepad.
Needless to say, this is all very frustrating and has kept me amused for hours. Long enough, in fact, that writing this behemoth of a plea for help was nothing in comparison. I only hope it isnt a complete waste of your collective times and you are able to shed *any* light on my situation. I would be very grateful...
Pete[/code] |
|
Back to top |
|
Pete
Joined: 26 Sep 2007 Posts: 4
|
Posted: Wed 26 Sep '07 18:02 Post subject: |
|
|
Edited httpd.conf to listen on port 8080 instead of 80. Seems to be working now but wondering if there is any reason why I shouldnt be doing this.
Would still really appreciate any advice on the former, however, if anything seems to be outstanding and I'm still stuck on configuring PHP 5.2.4 to work with apache 2.2.6 on xp home.
Forgot to mention previously that although info.php and mysqli.php don't open excitingly in my browser using 'http://localhost/info.php' or 'http://localhost/mysqli.php', the simpler 'http://localhost/' DOES give me a reassuring "IT WORKS!" message. I'm just not entirely sure *what* is working.. |
|
Back to top |
|
Pete
Joined: 26 Sep 2007 Posts: 4
|
Posted: Wed 26 Sep '07 18:25 Post subject: |
|
|
Wondered if it was useful, or just annoying, to give you the httpd.conf and php.ini file for reference. Probably both.
ADMIN NOTE: seldom useful, a bit annoying; but most important - prohibited by the Forum Rules
full httpd.conf and php.ini listings removed |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Wed 26 Sep '07 18:59 Post subject: |
|
|
One apparent problem - it is necessary to use forward-slashes (/), not backslashes (\), in httpd.conf. Code: | LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
PHPIniDir "C:/Program Files/PHP/php.ini" |
-tom- |
|
Back to top |
|
Pete
Joined: 26 Sep 2007 Posts: 4
|
Posted: Thu 27 Sep '07 6:08 Post subject: |
|
|
Thanks tdonovan. Sorry for posting those files I didn't realise it was against forum policy. I have ammended httpd.conf to contain all forward slashes in the parts I have added but it doesnt seem to have made any difference! |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Thu 27 Sep '07 14:17 Post subject: |
|
|
Your PHP database initialization is for Msql, a relatively obscure database from Hughes Technologies.
Perhaps you meant the more common MySQL (with a 'y') from MySQL AB? This is the database that most people use with PHP.
If you meant MySQL, your PHP.ini file should have: Code: | extension=php_mysql.dll
extension=php_mysqli.dll |
The Apache process must be able to locate the MySQL file libmysql.dll in order to work with MySQL. A good practice is to load this file in httpd.conf just before you load the PHP5 module. For example, if your libmysql.dll is in C:\Program Files\MySQL\lib\opt - you could put this in your httpd.conf: Code: | LoadFile "C:/Program Files/MySQL/lib/opt/libmysql.dll"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
PHPIniDir "C:/Program Files/PHP/php.ini" | Note that you use LoadFile for arbitrary 3rd-party libraries like the MySQL file libmysql.dll, but you must use LoadModule for Apache modules like php5apache2_2.dll.
Hope this helps,
-tom- |
|
Back to top |
|
|
|
|
|
|