Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
public-topic
File Uploader Plugin - Http Error when upload files.
Avatar
Steve_2
Rookie
Free Members
Offline
Nov 5, 2016 - 2:56 pm
Quote

Hi there,

I recently purchased the File Uploader Plugin but am struggling to get it working.  I have set the forum permissions, configured the plugin to allow zip files (in Other File Types) and it seems to work fine up until the moment I upload files.

When I try and upload a zip file to my server I am getting:

HTTP Error.
Upload URL might be wrong or doesn't exist.

In my "storage locations" the file uploads folder is:  wp-content/sp-resources/forum-file-uploads and I FTP'd onto my account and this folder exists (and permissions set to rwxr-xr-x). I haven't touched anything here so am using the default locations and permissions. I assume it's not related to my forum permissions (otherwise I wouldn't have the "upload attachments" button).

When I try and access my forum-file-uploads folder from my brower I am getting a 403 (when logged on as Admin).  Is this normal?  I checked my error logs in ControlPanel and I saw the below error, so not sure if this is related.

No matching DirectoryIndex (index.html,Index.html,index.shtml,index.php,Index.php,index.phtml,Index.phtml,index.htm,Index.htm,default.htm,Default.htm,default.html,Default.html,home.htm,Home.htm) found, and server-generated directory index forbidden by Options directive

So, I tried adding a .htaccess file in this folder.  This allowed me to view the 'empty' contents,  but I still get the Http Error when trying to upload files.   Am a bit stuck on this now so any pointers or help appreciated

Thanks

Steve

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Nov 5, 2016 - 3:15 pm
Quote

the uploads (you specifically mention file uploads here) directories do not need to be web accessible, in fact, should not be...  403 seems like a different error though - would expect a 404 since wp wont find the directory if its blocked by indexes... maybe you have other server directives in place since 403 does mean not authorized...

what kind of server is this?  ie linux, IIS, etc...

can you verify that your php has properly set up the tmp directory for file uploads?  the uploader would first upload to the php tmp dir then transfer it to the final location...

when you select a file, does it show up in the file uploader window as a thumbnail?  then after starting upload, does it show up in the tinymce editor window?  if latter is yes, before saving the post, please check your file uploads location and see if you see it there...

Avatar
Steve_2
Rookie
Free Members
Offline
Nov 6, 2016 - 4:51 am
Quote

Thanks for the quick reply, appreciated.

The page giving me the 403 is:

http://www.grafixator.com/wp-c.....e-uploads/

If this is not normal (and should be 404) I will check the Apache settings later today.  I am using a shared hosting (siteground), so I haven't touched anything here,  but there may be something in place messing this up.

I don't have SSH access so not 100% sure that the OS is, but it is Linux based (as I see shell scripts in the root).

In which directory should the tmp folder be created?  There is no 'tmp' directory in sp-resources/forum-file-uploads (there is the usual linux one under the root directory though)

 

Yes, the file shows up as a thumbnail, but as soon as press the "Start Upload" button I get the http error (and it does not show up in the editor window).  I have attached a few screenshots of the error and my settings in the below page.

http://www.grafixator.com/tmpf.....loaderror/

I assume files configured in the "other file types" section go into the forum-file-uploads folder?  Anyway,  I take another look at this later today.  Worst case scenario,  I will try and install everything in a local (windows) server to see if I can get it working locally.

Thanks

Steve

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Nov 6, 2016 - 12:35 pm
Quote

would not get hung up on 403 vs 404...  either could be construed as correct...  404 is what wp would give because the page wouldnt exist if indexing was disabled... but a no auth status would be right too, just would be server config vice wp...  I wouldnt change anything there.. not related to your local issue...

if you know you have apache, that is enough info there - its not IIS which was the real question..

the php tmp directory normally be /tmp on your server... nothing to do with wordpress or simple press... its a php thing...

yes, which is why I mentioned file uploads, the default location would be wp-content/sp-resources/forum-file-uploads... all fine... and you indicated on forum - integration - page and permalink that you got two good marks for the location...

so error when you hit start... so something in the plupload library..  see several similar issues, but most seem related to silverlight... what runtime do you get with plupload? what browser did you try with?  have you tried another?  silverlight would not be the default one we use...

how big is the file you are trying to upload?  does  it fit within the  max filesize settings you have configured on forum - components - file uploads?  and how does the file size compare to the php setting on your server for post_max_size and upload_max_filesize???

and what is your php memory setting?

Avatar
Steve_2
Rookie
Free Members
Offline
Nov 7, 2016 - 4:08 pm
Quote

Thanks again for the reply.  Ok, so I have never heard of plupload before, but checking their website and github issues then the error is definitely coming from there.  I was using firefox but I have just tried with Chrome and same error.  I also tried with a 1Kb file and same error, so not related to filesize am sure.  Am not sure how to check which runtime is being used.  I will look into this during the week.

I turned on my Web Developer tools while starting the upload, and this does give a 404 Http Error during the POST.  It is posting to the below forum URL which looks a bit suspicious.

/forum/upload-your-game/SPAJAXURLplupload&type&fid=6&_wpnonce=f69abb9d5b

I will take another look during the week,  not sure what my php memory setting is either,  am a java dev and never touch any php files.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Nov 7, 2016 - 5:57 pm
Quote

Definitely suspicious. let me see if I can find it and see if we can work out why it is suspicious...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Nov 7, 2016 - 9:40 pm
Quote

well, its plupload but its our error message based on data coming from plupload...

incidentally, if you ever upload media in the wp admin (say in a post), you are using plupload there too... its the media uploader used by wp as well as us...

hmmm.. good question on runtime - used to just come up as tooltip if you hovered over the plupload icon in upper left corner, but they seem to have abandoned that... will check myself...

when you say 404 error during post, do you mean the xmlhttprequest response?

odd as SPAJAXURL is clearly a constant we define... just not sure how its ever echoed vice replaced...  and why it wouldnt be occurring all the time for everyone... but does give us more data to look at...

Avatar
Steve_2
Rookie
Free Members
Offline
Nov 12, 2016 - 1:04 pm
Quote

Yes, the 404 is coming from the HTTP Response of the POST (from when you hit the STARTUPLOAD button),  debugging further the Response is my pages standard 404 'page not found' page.

Can I ask what is the expected URL of the POST.  For me it is my site/forum/<forum name>/SPAJAXURL . . Is this correct?  Unfortunately as mentioned I am not a PHP developer so I can't really help by looking at the code and am now at a bit of a loss with this. 

Let me know if there is anything else you would like me to check.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Nov 12, 2016 - 6:20 pm
Quote

Its defined like this:

if (!defined('SPAJAXURL'))    define('SPAJAXURL', admin_url('admin-ajax.php?action='));

which means it will be of the forum:  

http://yoursite.com/wp-admin/admin-ajax.php?action=

and the code that generates what you see is:

    $url = htmlspecialchars_decode(wp_nonce_url(SPAJAXURL.'plupload&type='.$plup['type'].'&fid='.$plup['fid'], 'plupload'));

which is equally odd because the message you posted had it in them middle of a url which is really quite confusing and not making a lot of sense to us...

Avatar
critterGuide.ca
Canada
Member
Offline
May 17, 2019 - 11:50 am
Quote

so is there any solution to this?rnseems like i have the same issue...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17348
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10120
Posts: 79607