Page 1 of 2
405 Method Not Allowed, when using PHP Script
Posted: Mon Jul 21, 2008 9:45 pm
by georgebaker
Hey,
I've get this error message when i'm trying to run the PHP Script.
Error : Upload started ...Server error HTTP/1.1 405 Method Not Allowed.
Any idea why i get this message?
Thanks for your help in advance.
Re: 405 Method Not Allowed, when using PHP Script
Posted: Tue Jul 22, 2008 7:46 pm
by support
You have this error in the following case:
- File size is over ".$max_size." bytes"
- PHP upload failed because file cannot be written (check folder write permission).
Are you able to upload a single file directly in browser with:
http://yourserver.com/something/process.php
You can also, try to use process_debug.php, it will generate a log file into the upload directory.
Re: 405 Method Not Allowed, when using PHP Script
Posted: Tue Jul 22, 2008 9:43 pm
by georgebaker
The file size is below 0.5 MB
Tried to changed the upload folder to accept to a file to written - page cannot be displayed.
No i cannot upload a single file through process.php - Page cannot be displayed
Page cannot be displayed when i'm trying to run process_debug.php
What have I done wrong ?
Re: 405 Method Not Allowed, when using PHP Script
Posted: Wed Jul 23, 2008 6:27 am
by support
Could you post here the beginning of your process.php file ?
Re: 405 Method Not Allowed, when using PHP Script
Posted: Wed Jul 23, 2008 6:57 am
by georgebaker
The beginning of the process.php look like this.
<?php
$upload_dir = "C:\Inetpub\wwwroot\_website-eks\fileupload\upload"; *
$max_size = 1500000;
$createsubfolders = "true";
$keepalive = "false";
* Have tried to change it to
http://www.gjonline.dk/fileupload/process.php, but page cannot be displayed.
Re: 405 Method Not Allowed, when using PHP Script
Posted: Wed Jul 23, 2008 6:13 pm
by support
In $upload_dir, try to replace all "\" by "/" and try again.
Also, are you able to run some others PHP files ?
Re: 405 Method Not Allowed, when using PHP Script
Posted: Thu Jul 24, 2008 7:27 pm
by georgebaker
No i'm not and that's the reason it doesn't work. I'm only allowed to run ASP. So let's forget the PHP sample.
I was actually trying from the begining to run JFileUpload(applet_http.html), but i got this error message :
Uploading : SHLF00TW.INI
(222 bytes)
Upload started ...Upload failed : java.net.ConnectException: Connection refused: connect
Please note that the filesize is only 222 bytes.
Re: 405 Method Not Allowed, when using PHP Script
Posted: Thu Jul 24, 2008 8:21 pm
by support
So, now you're trying to run JFileUpload with our ASP.NET sample, correct ?
Try it in browser first:
http://yourserver.com/something/process.aspx
Re: 405 Method Not Allowed, when using PHP Script
Posted: Thu Jul 24, 2008 8:43 pm
by georgebaker
No i'm trying to run applet_http.html with the applet_http.js file.
Re: 405 Method Not Allowed, when using PHP Script
Posted: Thu Jul 24, 2008 9:30 pm
by support
But you need to setup "url" parameters into applet_http.js with the server-side script that will handle upload HTTP request. Default is "url"="
http://localhost:8080/upload/process.jsp". Server-side script is mandatory for HTTP upload. We provide free ones for PHP, JSP, ASP.NET, CFM and PERL at:
http://www.jfileupload.com/products/tools/index.html