This is a discussion on method POST is not allowed within the Apache Web Server forums, part of the Web Server and Related Forums category; Bonjour à tous, J'utilise easyPHP1.7 sur window xp. Avec ce script --- $dir = "C:/Program Files/EasyPHP1-7/www/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Bonjour à tous,
J'utilise easyPHP1.7 sur window xp. Avec ce script --- $dir = "C:/Program Files/EasyPHP1-7/www/upload/"; if($dir.is_writable()){ echo "<P> Writable.<P>"}else echo "<P> Not writable.<P>" if (isset($_FILES['file']) && !$_FILES['file']['error']) { list($name,,$tmp_name) = array_values($_FILES['file']); move_uploaded_file($tmp_name, "$dir/$name"); } ?> <html> <head> <title> New Document </title> </head> <body> <form method="POST" enctype="multipart/form-data"> <input type="file" name="file" /> <input type="submit" /> </form> --- et j'obtiens: Method Not Allowed The requested method POST is not allowed for the URL /upload/upload2.html. Probablement trivial mais moi, comme un bon débutant. et après plusieurs recherches sur Apache.org, les post passés sur votre newsgroup(Google), ------ snip----- max_execution_time = 10800 memory_limit = 314572800 upload_max_filesize= 262144000 et aussi cette directive, qu'un message sur php.net demandais de changer. je ne l'ai pas trouvée, et aucune documentation nulle part, donc je l'ai ajoutée post_max_size = 262144000 Et dans le httpd.conf : Timeout 10800 mais rien n'y fait. ------ snip----- je déprime. Je viens de le réinstaller à neuf avec les modifications précédentes. Jean |
|
|||
|
On 2004-12-17, Québec <Once@WasEno.ugh> wrote:
> J'utilise easyPHP1.7 sur window xp. Post this on some French PHP group. You'll have more luck. Davide -- "Windows for Dummies" is much more than a book title, it's a Microsoft way of life! |
|
|||
|
"Québec" <Once@WasEno.ugh> schreef in bericht
news:u1Fwd.41660$3d2.1183781@weber.videotron.net.. . > J'utilise easyPHP1.7 sur window xp. > Avec ce script > --- > $dir = "C:/Program Files/EasyPHP1-7/www/upload/"; > if($dir.is_writable()){ echo "<P> Writable.<P>"}else > echo "<P> Not writable.<P>" > if (isset($_FILES['file']) && !$_FILES['file']['error']) { > list($name,,$tmp_name) = array_values($_FILES['file']); > move_uploaded_file($tmp_name, "$dir/$name"); > } > ?> > <html> > <head> > <title> New Document </title> > </head> > <body> > <form method="POST" enctype="multipart/form-data"> > <input type="file" name="file" /> > <input type="submit" /> > </form> > --- > et j'obtiens: > Method Not Allowed > The requested method POST is not allowed for the URL /upload/upload2.html. Blessed by a _good_ configuration, you are not allowed to _overwrite_ a document. Most probably your form tag lacks an action, specifying the script to handle your upload: the given snippet only handles the presentation of a form after some server-side checks. > Probablement trivial mais moi, comme un bon débutant. et après plusieurs > recherches sur Apache.org, les post passés sur votre newsgroup(Google), Well, a debutant may post to this group in non-english only once ;-) HansH |
|
|||
|
"HansH" <hans@niet.op.het.net> schreef in bericht
news:cpvggr$4gn$1@news.cistron.nl... > "Québec" <Once@WasEno.ugh> schreef in bericht > news:u1Fwd.41660$3d2.1183781@weber.videotron.net.. . > > J'utilise easyPHP1.7 sur window xp. > > Avec ce script > > --- > > $dir = "C:/Program Files/EasyPHP1-7/www/upload/"; > > if($dir.is_writable()){ echo "<P> Writable.<P>"}else > > echo "<P> Not writable.<P>" > > if (isset($_FILES['file']) && !$_FILES['file']['error']) { > > list($name,,$tmp_name) = array_values($_FILES['file']); > > move_uploaded_file($tmp_name, "$dir/$name"); > > } > > ?> > > <html> > > <head> > > <title> New Document </title> > > </head> > > <body> > > <form method="POST" enctype="multipart/form-data"> > > <input type="file" name="file" /> > > <input type="submit" /> > > </form> > > --- > > et j'obtiens: > > Method Not Allowed > > The requested method POST is not allowed for the URL /upload/upload2.html. > Blessed by a _good_ configuration, you are not allowed to _overwrite_ a > document. Oops, I've mixed up POST and PUT, just ignore the above. HansH |
|
|||
|
Thank you and forgive my poor english!
I searched on Apache.org, and found informations on Google newsgroups I have reinstalled easyphp1.7 on window xp with the following modifications. ------ snip----- max_execution_time = 10800 memory_limit = 314572800 upload_max_filesize= 262144000 post_max_size = 262144000 In httpd.conf : Timeout 10800 ------ snip----- with this script --- $dir = "C:/Program Files/EasyPHP1-7/www/upload/"; if($dir.is_writable()){ echo "<P> Writable.<P>"}else echo "<P> Not writable.<P>" if (isset($_FILES['file']) && !$_FILES['file']['error']) { list($name,,$tmp_name) = array_values($_FILES['file']); move_uploaded_file($tmp_name, "$dir/$name"); } ?> <html> <head> <title> New Document </title> </head> <body> <form method="POST" enctype="multipart/form-data"> <input type="file" name="file" /> <input type="submit" /> </form> --- the server load a page with this: Method Not Allowed The requested method POST is not allowed for the URL /upload/upload2.html. Nothing works and I am depressing.. Jean |
|
|||
|
I found it it must be a php page not an html
"Québec" <Once@WasEno.ugh> a écrit dans le message de news:l%Jwd.21126$CK4.1263374@wagner.videotron.net. .. > Thank you and forgive my poor english! > > I searched on Apache.org, and found informations on Google newsgroups > I have reinstalled easyphp1.7 on window xp with the following > modifications. > > ------ snip----- > max_execution_time = 10800 > memory_limit = 314572800 > upload_max_filesize= 262144000 > > post_max_size = 262144000 > > In httpd.conf : > Timeout 10800 > > ------ snip----- > > with this script > --- > $dir = "C:/Program Files/EasyPHP1-7/www/upload/"; > if($dir.is_writable()){ echo "<P> Writable.<P>"}else > echo "<P> Not writable.<P>" > > if (isset($_FILES['file']) && !$_FILES['file']['error']) { > list($name,,$tmp_name) = array_values($_FILES['file']); > move_uploaded_file($tmp_name, "$dir/$name"); > } > > ?> > <html> > <head> > <title> New Document </title> > </head> > > <body> > <form method="POST" enctype="multipart/form-data"> > <input type="file" name="file" /> > <input type="submit" /> > </form> > --- > > the server load a page with this: > Method Not Allowed > The requested method POST is not allowed for the URL /upload/upload2.html. > > Nothing works and I am depressing.. > > > > Jean > > > > |