Jump to content


Photo

Can't start or restart Apache ("requested operation has failed")


  • Please log in to reply
10 replies to this topic

#1 whitetrash

whitetrash

    Newbie

  • New Members
  • Pip
  • 4 posts

Posted 06 March 2012 - 08:27 AM

I've recently installed Apache 2.2.22 but there seems to be a bug somewhere and I can't get it to do anything. The "Restart" button is grey i.e. I can't use it and when I click "Start" I get "the requested operation has failed".

Here is what it says in the error log:

Starting the Apache2.2 service
The Apache2.2 service is running.
rmine the server's fully qualified domain name, using 192.168.1.51 for ServerName
[Sun Mar 04 21:51:28 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
[Sun Mar 04 21:51:28 2012] [notice] Server built: Jan 28 2012 11:16:39
[Sun Mar 04 21:51:29 2012] [notice] Parent: Created child process 3056
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.51 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.51 for ServerName
[Sun Mar 04 21:51:32 2012] [notice] Child 3056: Child process is running
[Sun Mar 04 21:51:32 2012] [notice] Child 3056: Acquired the start mutex.
[Sun Mar 04 21:51:32 2012] [notice] Child 3056: Starting 64 worker threads.
[Sun Mar 04 21:51:32 2012] [notice] Child 3056: Starting thread to listen on port 80.
[Sun Mar 04 22:38:03 2012] [notice] Parent: Received restart signal -- Restarting the server.
[Sun Mar 04 22:38:05 2012] [notice] Child 3056: Exit event signaled. Child process is ending.
[Sun Mar 04 22:38:06 2012] [notice] Child 3056: Released the start mutex
[Sun Mar 04 22:38:08 2012] [notice] Child 3056: All worker threads have exited.
[Sun Mar 04 22:38:09 2012] [notice] Child 3056: Child process is exiting
httpd.exe: Syntax error on line 496 of C:/Apache2.2/conf/httpd.conf: Cannot load C:/Apache2.2/php5apache2_2.dll into server: The specified module could not be found. 

I tried moving php5apache2_2.dll and php.ini into the Apache2.2 directory as they was in the PHP one before but it hasn't changed anything.

I've also changed my servername to localhost.

Any ideas??

#2 ttocskcaj

ttocskcaj

    Advanced Member

  • Members
  • PipPipPip
  • 184 posts
  • LocationNew Zealand

Posted 06 March 2012 - 09:12 AM

Try reinstall php5?
Comment out the line in httpd.conf and see if it runs properly.?

#3 whitetrash

whitetrash

    Newbie

  • New Members
  • Pip
  • 4 posts

Posted 06 March 2012 - 03:56 PM

Just tried reinstalling apache and php and got the same problem.

Here is the error log:

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.51 for ServerName
[Tue Mar 06 14:55:24 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
[Tue Mar 06 14:55:24 2012] [notice] Server built: Jan 28 2012 11:16:39
[Tue Mar 06 14:55:24 2012] [notice] Parent: Created child process 2440
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.51 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.51 for ServerName
[Tue Mar 06 14:55:25 2012] [notice] Child 2440: Child process is running
[Tue Mar 06 14:55:25 2012] [notice] Child 2440: Acquired the start mutex.
[Tue Mar 06 14:55:25 2012] [notice] Child 2440: Starting 64 worker threads.
[Tue Mar 06 14:55:25 2012] [notice] Child 2440: Starting thread to listen on port 80.
[Tue Mar 06 15:41:23 2012] [notice] Parent: Received restart signal -- Restarting the server.
[Tue Mar 06 15:41:23 2012] [notice] Child 2440: Exit event signaled. Child process is ending.
httpd.exe: Syntax error on line 496 of C:/Apache2.2/conf/httpd.conf: Cannot load C:/Apache2.2/php5apache2_2.dll into server: The specified module could not be found. 
[Tue Mar 06 15:41:24 2012] [notice] Child 2440: Released the start mutex
[Tue Mar 06 15:41:25 2012] [notice] Child 2440: All worker threads have exited.
[Tue Mar 06 15:41:25 2012] [notice] Child 2440: Child process is exiting

How do I find Line 496? There are no line numbers in the script. And if I find it how do I comment it out???


#4 ttocskcaj

ttocskcaj

    Advanced Member

  • Members
  • PipPipPip
  • 184 posts
  • LocationNew Zealand

Posted 06 March 2012 - 07:35 PM

Searching (CTRL-F or whatever it is in windows) for "php5apache2_2.dll" would be a good start.
It should only be in the file 1 or 2 times.
Comment out the one that starts with LoadModule.
If the server starts, then you know that line is the problem, however, you probably won't have PHP anymore.

I'm not familiar with windows, but shouldn't php5apache2_2.dll be in a modules directory or something?
Confirm that php5apache2_2.dll is actually in C:/Apache2.2/php5apache2_2.dll

#5 whitetrash

whitetrash

    Newbie

  • New Members
  • Pip
  • 4 posts

Posted 06 March 2012 - 08:56 PM

These are all the lines that start with LoadModule, do I comment out all of them? Also how do I "Comment out"? Sorry, this is all pretty new to me    :-[

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule dumpio_module modules/mod_dumpio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so

Cheers for the help by the way!

#6 Adam

Adam

    Advanced Member

  • Gurus
  • 5,683 posts
  • LocationSheffield / UK

Posted 09 March 2012 - 12:18 PM

Shouldn't it be..?

C:\Apache2.2\php5apache2_2.dll

#7 ttocskcaj

ttocskcaj

    Advanced Member

  • Members
  • PipPipPip
  • 184 posts
  • LocationNew Zealand

Posted 09 March 2012 - 10:42 PM

I'm not 100% sure on your setup. I can't see any LoadModule for php5.
Don't comment all of those lines or bad things will happen.
Commenting them would just mean putting a "#" at the start of the the line.

Try put the contents of your apache2 log file on pastebin and post the link here. Somebody with more know how may be able to solve it.

#8 trq

trq

    Advanced Member

  • Administrators
  • 30,904 posts
  • LocationSydney, Australia.

Posted 09 March 2012 - 11:22 PM

The LoadModule lines you have shown us are for a *nix setup, note that they all end with .so instead of .dll.

That doesn't look like the correct httpd.conf file to me.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#9 Adam

Adam

    Advanced Member

  • Gurus
  • 5,683 posts
  • LocationSheffield / UK

Posted 10 March 2012 - 09:37 AM

The LoadModule lines you have shown us are for a *nix setup, note that they all end with .so instead of .dll.

That doesn't look like the correct httpd.conf file to me.


Sounds odd, but Windows does still have SO files, not DLL. Apache must have some kind of adapter for them..

Attached Files



#10 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 10 March 2012 - 09:50 AM

How do I find Line 496?


By using an actual programming editor to examine the file. Notepad++ is a popular programming editor.

Line 496 is also the line that contains C:/Apache2.2/php5apache2_2.dll, that is being mentioned in the syntax error for that line.
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#11 trq

trq

    Advanced Member

  • Administrators
  • 30,904 posts
  • LocationSydney, Australia.

Posted 10 March 2012 - 06:28 PM

How do I find Line 496?


By using an actual programming editor to examine the file. Notepad++ is a popular programming editor.

Line 496 is also the line that contains C:/Apache2.2/php5apache2_2.dll, that is being mentioned in the syntax error for that line.


That would be the error that Adam pointed out several replies ago.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com