Author |
|
ademus
Joined: 11 Jan 2009 Posts: 5
|
Posted: Sun 11 Jan '09 19:24 Post subject: force apache start in spite of errors shutdown |
|
|
I m working on a kiosk
This kiosk will be started or shutdowned by simply puting/pulling alimentation cable from sector.
When such a brutal shutdown occuring, Apache considers sometimes, it s a wrong shutdown of the server.
Then, it refuses to start the next time considering there has been a wrong shut down.
Then I m constrain to manually re-start Apache.
Is it possible de bypass this error and force Apache to start anyways?
Thank
(I m on XP sp2) |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 12 Jan '09 16:43 Post subject: |
|
|
Is apache running as service? What is in your error.log about that? |
|
Back to top |
|
ademus
Joined: 11 Jan 2009 Posts: 5
|
Posted: Mon 12 Jan '09 16:57 Post subject: |
|
|
Could not start the Apache2 service on \\COMPUTER
Error 1067; The process terminated unexpectedly.
this happens both I use Apache as service or not
i would like Apache start in spite of this error
This Apache came with the easyphp pack I installed |
|
Back to top |
|
ademus
Joined: 11 Jan 2009 Posts: 5
|
Posted: Mon 12 Jan '09 19:51 Post subject: |
|
|
no sorry, untill now I was only working with Apache as a service.
I just begin to try to launch it in console mode hoping this will be the solution. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 13 Jan '09 14:22 Post subject: |
|
|
is that error message realy from your apache\logs\error.log ??
Which version of apache do you use?
From the apache docs
Quote: |
Code: |
Error 1067; The process terminated unexpectedly.
|
You will get this generic error if there is any problem with starting the Apache service. In order to see what is really causing the problem you should follow the instructions for Running Apache for Windows from the Command Prompt.
There is some support for Apache on Windows 9x to behave in a similar manner as a service on Windows NT. It is highly experimental. It is not of production-class reliability, and its future is not guaranteed. It can be mostly regarded as a risky thing to play with - proceed with caution!
There are some differences between the two kinds of services you should be aware of:
*
Apache will attempt to start and if successful it will run in the background. If you run the command
httpd.exe -n "MyServiceName" -k start
via a shortcut on your desktop, for example, then if the service starts successfully, a console window will flash up but it immediately disappears. If Apache detects any errors on startup such as incorrect entries in the httpd.conf configuration file, the console window will remain visible. This will display an error message which will be useful in tracking down the cause of the problem.
|
http://httpd.apache.org/docs/2.2/en/platform/windows.html#winsvc |
|
Back to top |
|
ademus
Joined: 11 Jan 2009 Posts: 5
|
Posted: Tue 13 Jan '09 15:13 Post subject: |
|
|
As I explained it above, it s what I m trying to do: starting apache from the command prompt:
httpd.exe -k start
Final test next week |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 13 Jan '09 19:59 Post subject: |
|
|
Just remove (e.g. delete) /apache2/logs/httpd.pid file before starting up Apache again. Apache is finding that file which is what causes the error. When you simply pull the power cord Apache does not have time to clean-up. |
|
Back to top |
|
ademus
Joined: 11 Jan 2009 Posts: 5
|
Posted: Tue 13 Jan '09 23:57 Post subject: |
|
|
I found no httpd.pid in apache/log directory, neither in any other apache directory.
this problem occured while I was using easyphp package and apache as a windows service.
I installed manually apache, php and mysql and wrote a batch to launch apache (httpd.exe) and mysql server (mysqld.exe).
Hope it 'll resolve the problem. |
|
Back to top |
|