405 Method Not Allowed, when using PHP Script

All others add-ons (Secure FTP, SCP, Flickr, scripts ...).
georgebaker
Posts: 6
Joined: Mon Jul 21, 2008 9:40 pm

405 Method Not Allowed, when using PHP Script

Post 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.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: 405 Method Not Allowed, when using PHP Script

Post 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.

georgebaker
Posts: 6
Joined: Mon Jul 21, 2008 9:40 pm

Re: 405 Method Not Allowed, when using PHP Script

Post 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 ?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: 405 Method Not Allowed, when using PHP Script

Post by support »

Could you post here the beginning of your process.php file ?

georgebaker
Posts: 6
Joined: Mon Jul 21, 2008 9:40 pm

Re: 405 Method Not Allowed, when using PHP Script

Post 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.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: 405 Method Not Allowed, when using PHP Script

Post by support »

In $upload_dir, try to replace all "\" by "/" and try again.
Also, are you able to run some others PHP files ?

georgebaker
Posts: 6
Joined: Mon Jul 21, 2008 9:40 pm

Re: 405 Method Not Allowed, when using PHP Script

Post 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.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: 405 Method Not Allowed, when using PHP Script

Post 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

georgebaker
Posts: 6
Joined: Mon Jul 21, 2008 9:40 pm

Re: 405 Method Not Allowed, when using PHP Script

Post by georgebaker »

No i'm trying to run applet_http.html with the applet_http.js file.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: 405 Method Not Allowed, when using PHP Script

Post 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

Post Reply