405 Post Method not allowed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim yOUNG

    405 Post Method not allowed

    I've searched the web for a solution but to no avail. I have just setup and
    installed Apache 1.3.20 on windows, and php 4.0.5. Apache is up and
    running, (In directory F:\programs\apa che\apache\) and PHP has been copied
    to both c:\php and F:\programs\apa che\apache\php. I've put the php.ini file
    in c:\windows and made the following changes:
    doc_root = "f:\programs\ap ache\apache\htd ocs"
    extension_dir = "c:\php"

    While in httpd I have added:
    ScriptAlias /php/ "C:/php/"

    (uncommented) AddType application/x-httpd-php .php

    Action application/x-http-php "/php/php.exe"

    Anytime I try to load a php script I get a 405 error stating that:

    The requested method POST is not allowed for the URL /password.php.

    Any help would be much appreciated. I know it is something simple, because
    I've set it up on other computers. But on my home XP machine, I have never
    had any success.


  • Andy Hassall

    #2
    Re: 405 Post Method not allowed

    On Sun, 04 Apr 2004 19:30:43 GMT, "Tim yOUNG" <tim_steely@yah oo.com> wrote:
    [color=blue]
    >I've searched the web for a solution but to no avail. I have just setup and
    >installed Apache 1.3.20[/color]

    Old version...
    [color=blue]
    > on windows,[/color]

    1.3 isn't recommended on Windows...
    [color=blue]
    >and php 4.0.5.[/color]

    Very ancient version...
    [color=blue]
    >Apache is up and
    >running, (In directory F:\programs\apa che\apache\) and PHP has been copied
    >to both c:\php and F:\programs\apa che\apache\php. I've put the php.ini file
    >in c:\windows and made the following changes:
    >doc_root = "f:\programs\ap ache\apache\htd ocs"
    >extension_di r = "c:\php"[/color]

    Not c:\php\extensio ns?
    [color=blue]
    >While in httpd I have added:
    >ScriptAlias /php/ "C:/php/"[/color]

    You don't want to be making the PHP directory accessible, you should put your
    scripts somewhere else.
    [color=blue]
    >(uncommented ) AddType application/x-httpd-php .php
    >
    >Action application/x-http-php "/php/php.exe"[/color]

    No drive letter?

    You've got 'application/x-httpd-php' in the first line, but
    'application-x-http/php' in the second?
    [color=blue]
    >Anytime I try to load a php script I get a 405 error stating that:
    >
    >The requested method POST is not allowed for the URL /password.php.[/color]

    Do you have a <Directory> entry in httpd.conf for the directory?

    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

    Comment

    • Tim yOUNG

      #3
      Re: 405 Post Method not allowed

      Hey Andy, thanks for the tips.

      I've downloaded the latest Apache 2.0.49 and then tried the new php5 in
      module mode.

      Now it will run the php files, but wont read form data and will spit out any
      error message asociated with not filling in an input box properly.

      I've decided to try php 4.3.5 as it's supposed to be the most stable.

      I'll keep you updated. 0 ?
      \ __/

      "Andy Hassall" <andy@andyh.co. uk> wrote in message
      news:nvq07017ah 1guhmjjc63kiovf 2hdls5rhc@4ax.c om...[color=blue]
      > On Sun, 04 Apr 2004 19:30:43 GMT, "Tim yOUNG" <tim_steely@yah oo.com>[/color]
      wrote:[color=blue]
      >[color=green]
      > >I've searched the web for a solution but to no avail. I have just setup[/color][/color]
      and[color=blue][color=green]
      > >installed Apache 1.3.20[/color]
      >
      > Old version...
      >[color=green]
      > > on windows,[/color]
      >
      > 1.3 isn't recommended on Windows...
      >[color=green]
      > >and php 4.0.5.[/color]
      >
      > Very ancient version...
      >[color=green]
      > >Apache is up and
      > >running, (In directory F:\programs\apa che\apache\) and PHP has been[/color][/color]
      copied[color=blue][color=green]
      > >to both c:\php and F:\programs\apa che\apache\php. I've put the php.ini[/color][/color]
      file[color=blue][color=green]
      > >in c:\windows and made the following changes:
      > >doc_root = "f:\programs\ap ache\apache\htd ocs"
      > >extension_di r = "c:\php"[/color]
      >
      > Not c:\php\extensio ns?
      >[color=green]
      > >While in httpd I have added:
      > >ScriptAlias /php/ "C:/php/"[/color]
      >
      > You don't want to be making the PHP directory accessible, you should put[/color]
      your[color=blue]
      > scripts somewhere else.
      >[color=green]
      > >(uncommented ) AddType application/x-httpd-php .php
      > >
      > >Action application/x-http-php "/php/php.exe"[/color]
      >
      > No drive letter?
      >
      > You've got 'application/x-httpd-php' in the first line, but
      > 'application-x-http/php' in the second?
      >[color=green]
      > >Anytime I try to load a php script I get a 405 error stating that:
      > >
      > >The requested method POST is not allowed for the URL /password.php.[/color]
      >
      > Do you have a <Directory> entry in httpd.conf for the directory?
      >
      > --
      > Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
      > http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space[/color]


      Comment

      • Tim yOUNG

        #4
        Re: 405 Post Method not allowed

        OK, I've got it now.

        The newer versions of php default to having "register_globa ls = Off" and my
        php files had been written as if they were turned on.

        Simple solution, change globals back to on. Better solution, start writing
        and re-writing code allowing for globals to be off.

        Cheers!
        register_global s = Off


        Comment

        Working...