POST method problems

Discussion in 'Install/Configuration' started by gerhard, Sep 24, 2006.

  1. gerhard

    gerhard New Member

    Hi there,
    I've just installed LS 2.2.2 locally on OS X 10.4.7 and I keep getting this error when clicking form submit buttons that use the POST method: 405 Method Not Allowed. This is what I get in the debug log:

    PHP:
    2006-09-24 15:45:18.965    DEBUG    [*:80] New connection from 127.0.0.1:59136.
    2006
    -09-24 15:45:18.965    DEBUG    [*:801 connections accepted!
    2006-09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0HttpIOLink::handleEvents() events=1!
    2006-09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0HttpConnection::onReadEx(), state0!
    2006-09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0readToHeaderBuf().
    2006-09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0Read from client510
    2006
    -09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0read 510 bytes to header buffer
    2006
    -09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0processHeader() return 0header state3.
    2006
    -09-24 15:45:18.965    DEBUG    [127.0.0.1:59136-0readToHeaderBuf() return 0.
    2006
    -09-24 15:45:18.966    DEBUG    [127.0.0.1:59136-0#my_domain] New request:
    Method=[GET], URI=[/annual_1.html],
    QueryString=[]
    Content Length=0
    2006
    -09-24 15:45:18.966    DEBUG    [127.0.0.1:59136-0#my_domain] Find context with URI: [/], location: [/usr/local/lsws/www/virtual_host/public/]
    2006-09-24 15:45:18.966    DEBUG    [127.0.0.1:59136-0#my_domain] processContextPath() return 0
    2006-09-24 15:45:18.966    DEBUG    [127.0.0.1:59136-0#my_domain] readyCacheData() return 0
    2006-09-24 15:45:18.966    DEBUG    [127.0.0.1:59136-0#my_domain] HttpConnection::flush()!
    2006-09-24 15:45:18.993    DEBUG    [127.0.0.1:59136-0#my_domain] Written to client: 137
    2006-09-24 15:45:18.994    DEBUG    [127.0.0.1:59136-0#my_domain] HttpConnection::nextRequest()!
    2006-09-24 15:45:18.994    DEBUG    [127.0.0.1:59136-1processNewReq() return 0.
    2006
    -09-24 15:45:20.531    DEBUG    [127.0.0.1:59136-1HttpIOLink::handleEvents() events=1!
    2006-09-24 15:45:20.531    DEBUG    [127.0.0.1:59136-1HttpConnection::onReadEx(), state0!
    2006-09-24 15:45:20.531    DEBUG    [127.0.0.1:59136-1readToHeaderBuf().
    2006-09-24 15:45:20.531    DEBUG    [127.0.0.1:59136-1Read from client544
    2006
    -09-24 15:45:20.531    DEBUG    [127.0.0.1:59136-1read 544 bytes to header buffer
    2006
    -09-24 15:45:20.531    DEBUG    [127.0.0.1:59136-1processHeader() return 0header state3.
    2006
    -09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1readToHeaderBuf() return 0.
    2006
    -09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] New request:
    Method=[POST], URI=[/annual_2.html],
    QueryString=[]
    Content Length=12
    2006
    -09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] Read Request Body!
    2006-09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] Finished request body 12 bytes!
    2006-09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] Find context with URI: [/], location: [/usr/local/lsws/www/my_domain/public/]
    2006-09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] processContextPath() return 0
    2006-09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] processNewReq() return 26.
    2006-09-24 15:45:20.532    DEBUG    [127.0.0.1:59136-1#my_domain] HttpConnection::sendHttpError(),code=405 Method Not Allowed
    2006-09-24 15:45:20.533    DEBUG    [127.0.0.1:59136-1#my_domain] HttpConnection::flush()!
    2006-09-24 15:45:20.587    DEBUG    [127.0.0.1:59136-1#my_domain] Written to client: 584
    2006-09-24 15:45:20.587    DEBUG    [127.0.0.1:59136-1#my_domain] HttpConnection::nextRequest()!
    2006-09-24 15:45:23.334    DEBUG    [*:81] New connection from 127.0.0.1:59137.
    2006
    -09-24 15:45:23.345    DEBUG    [UDS://tmp/lshttpd/admin_php.sock] connection available!
    2006-09-24 15:45:23.345    DEBUG    [UDS://tmp/lshttpd/admin_php.sock] request [127.0.0.1:59137-0#_AdminVHost:lsapi] is assigned with connection!
  2. mistwang

    mistwang LiteSpeed Staff

    POST method is not allowed for a static file, if annual_2.html is really a CGI script, you need to change server configuration to make it being handled as a CGI script, either use a CGI context or script handler configuration.

Share This Page