• Win32 apache 2.2.31 not accepting the -k option

    From Kees Nuyt@21:1/5 to timstreater@greenbee.net on Mon Sep 28 01:00:31 2015
    On Sat, 26 Sep 2015 18:05:58 +0100, Tim Streater
    <timstreater@greenbee.net> wrote:

    I'm running 2.2.31 under Win7, quite satisfactorily. I obtained this
    Win32 version from Apache Haus. However, I seem unable to use the -k
    option. I want to use it to have the server restart gracefully when I
    have rotated the log files.

    My attempts to use it fail. What I see in the error log is the Usage: >information, followed by:

    httpd.exe: illegal option -- k

    Suggestions appreciated. I'm supposing this can't be a config file
    matter, as I would assume the startup options are processed first. The >failing command looks like:

    httpd.exe -k restart -f "e:\path\to\httpd.conf"


    The -k option has a different meaning in MSWindows, it handles
    (un)installing Apache as a windows service.

    http://httpd.apache.org/docs/2.2/platform/windows.html

    Stopping/restarting can be done with the MSWindows service
    commands (net.exe, sc.exe) or the management GUI.
    I'm not sure whether "graceful" is an option in MSWindows.

    Hope this helps.
    --
    Regards,
    Kees Nuyt
    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Streater@21:1/5 to Nuyt on Mon Sep 28 10:57:34 2015
    In article <ltsg0b95gg1pa8so8urn6abeepvu0i5vtp@dim53.demon.nl>, Kees
    Nuyt <k.nuyt@nospam.demon.nl> wrote:

    On Sat, 26 Sep 2015 18:05:58 +0100, Tim Streater
    <timstreater@greenbee.net> wrote:

    I'm running 2.2.31 under Win7, quite satisfactorily. I obtained this
    Win32 version from Apache Haus. However, I seem unable to use the -k >>option. I want to use it to have the server restart gracefully when I
    have rotated the log files.

    My attempts to use it fail. What I see in the error log is the Usage: >>information, followed by:

    httpd.exe: illegal option -- k

    Suggestions appreciated. I'm supposing this can't be a config file
    matter, as I would assume the startup options are processed first. The >>failing command looks like:

    httpd.exe -k restart -f "e:\path\to\httpd.conf"

    The -k option has a different meaning in MSWindows, it handles
    (un)installing Apache as a windows service.

    http://httpd.apache.org/docs/2.2/platform/windows.html

    Stopping/restarting can be done with the MSWindows service
    commands (net.exe, sc.exe) or the management GUI.
    I'm not sure whether "graceful" is an option in MSWindows.

    Yes, I saw those docs before, although perhaps at the time I read them
    I perhaps didn't quite appreciate what a "service" is in Windows. The
    commands I am giving, to start/restart are being sent from a PHP
    script, using popen. I can start it OK, it's the restart that's giving
    the problem (I think restart implies graceful).

    Since posting I've tried such as:

    httpd.exe -k install -n "myservicename" -f "e:\path\to\httpd.conf"

    followed by:

    httpd.exe -k start -n "myservicename"

    which at least don't (seem) to be giving me "illegal option -- k" any
    longer so that might be progress but they are failing silently. I might
    do better than to simplify my test setup and try again so I can get at
    the fail error messages.

    Thanks for the response.

    --
    "People don't buy Microsoft for quality, they buy it for compatibility
    with what Bob in accounting bought last year. Trace it back - they buy Microsoft because the IBM Selectric didn't suck much" - P Seebach, afc
    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kees Nuyt@21:1/5 to timstreater@greenbee.net on Mon Sep 28 14:42:34 2015
    On Mon, 28 Sep 2015 10:57:34 +0100, Tim Streater
    <timstreater@greenbee.net> wrote:

    In article <ltsg0b95gg1pa8so8urn6abeepvu0i5vtp@dim53.demon.nl>, Kees
    Nuyt <k.nuyt@nospam.demon.nl> wrote:

    On Sat, 26 Sep 2015 18:05:58 +0100, Tim Streater
    <timstreater@greenbee.net> wrote:

    I'm running 2.2.31 under Win7, quite satisfactorily. I obtained this >>>Win32 version from Apache Haus. However, I seem unable to use the -k >>>option. I want to use it to have the server restart gracefully when I >>>have rotated the log files.

    My attempts to use it fail. What I see in the error log is the Usage: >>>information, followed by:

    httpd.exe: illegal option -- k

    Suggestions appreciated. I'm supposing this can't be a config file >>>matter, as I would assume the startup options are processed first. The >>>failing command looks like:

    httpd.exe -k restart -f "e:\path\to\httpd.conf"

    The -k option has a different meaning in MSWindows, it handles >>(un)installing Apache as a windows service.

    http://httpd.apache.org/docs/2.2/platform/windows.html

    Stopping/restarting can be done with the MSWindows service
    commands (net.exe, sc.exe) or the management GUI.
    I'm not sure whether "graceful" is an option in MSWindows.

    Yes, I saw those docs before, although perhaps at the time I
    read them I perhaps didn't quite appreciate what a "service" is
    in Windows. The commands I am giving, to start/restart are being
    sent from a PHP script, using popen. I can start it OK, it's the
    restart that's giving the problem (I think restart implies
    graceful).

    Since posting I've tried such as:

    httpd.exe -k install -n "myservicename" -f "e:\path\to\httpd.conf"

    followed by:

    httpd.exe -k start -n "myservicename"

    which at least don't (seem) to be giving me "illegal option --
    k" any longer so that might be progress but they are failing
    silently. I might do better than to simplify my test setup and
    try again so I can get at the fail error messages.

    Thanks for the response.

    You're welcome.
    Last time I used Apache on Windows is about 8 years ago.
    I remember having similar problems. My solution at the time
    was to run it from a CMD.EXE box, and not install it as a service.
    That solution obviously has other limitations.

    --
    Regards,
    Kees Nuyt
    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Streater@21:1/5 to All on Sat Sep 26 18:05:58 2015
    I'm running 2.2.31 under Win7, quite satisfactorily. I obtained this
    Win32 version from Apache Haus. However, I seem unable to use the -k
    option. I want to use it to have the server restart gracefully when I
    have rotated the log files.

    My attempts to use it fail. What I see in the error log is the Usage: information, followed by:

    httpd.exe: illegal option -- k

    Suggestions appreciated. I'm supposing this can't be a config file
    matter, as I would assume the startup options are processed first. The
    failing command looks like:

    httpd.exe -k restart -f "e:\path\to\httpd.conf"

    --
    "The idea that Bill Gates has appeared like a knight in shining armour to
    lead all customers out of a mire of technological chaos neatly ignores
    the fact that it was he who, by peddling second-rate technology, led them
    into it in the first place." - Douglas Adams
    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)