Hi,

I select a picture and click on Upload and I get:

Upload Error 503

Does any idea?

PS: thanks for the module. From long drupal needs a "multiple image upload" module

Comments

grandcat’s picture

Status: Active » Postponed (maintainer needs more info)

This error message (503 => Service Temporarily Unavailable) is not sent by image fupload, it's a server related (configuration) problem.
Possible meanings:

=> Server is too busy to serve your request
=> Server is slashdotted or dugg to death
=> another configuration problem on server side

I need detailed information about your server, otherwise it's hard to help you. But you could try to use devel version (DON'T FORGET TO CLEAR CACHES AFTER INSTALLATION). Perhaps there's a problem with status codes.

rowzee’s picture

i'm having the same problem. everything was fine until i upgraded to 6.4 and upgraded the image and image fupload modules. this is on a hostgator virtual server but it's also happened on another server on a new install. i gave up on the image module on the new install since there were no images -- but i want to try to fix the one on hostgator since there are images. i've cleared cache, reinstalled, etc., but i still get a 503 error when i try to upload. when attempting to upload the "next" button becomes active, but when it's clicked there's yet another 503 error. i was wondering if it might be a permissions issue or something to that effect, but i'm stumped.

any suggestions? if i need to post more info, i'm happy to do it -- please let me know. i'm somewhat of a drupal noob, so please be patient with me. =)

thanks in advance!

grandcat’s picture

I just saw that other modules (which depend on swfUpload) which also use this hoster, have similar problems (http://drupal.org/node/191289). I could be that a special filter (for example mod_security for Apache) or something else does not want to receive these packages because sometimes, data which is sent by flash, is not completely perfect (a lot of bugs, especially on other OSs than Win XP and higher, which could be misinterpreted by the server).
BUT you said (rowzee), image fupload is served by a VPS (Virtual Private Server), so not by webhosting.

- That means you have full control of your server, did you change anything in relation to configuration or similar things?

- What browser and which operating system are you using?

To be able to track down this behaviour, a test account on your server would be very advantageous. Additionally, an extract of your log messages which were generated during upload try, are very desired.

Otherwise, it's very hard to find the problem because I can't reproduce this error. Especially the click on the "Next step" button what leads to a 503 error, sounds very strange to me =/

grandcat’s picture

Yes, it really seems to be a problem with mod_security (of Apache) which filters the POST Requests and lead to 503 error. See http://wordpress.org/support/topic/162198 which uses swfUpload, too.
You have to disable mod_security in .htaccess file for url "fupload/flash".

If someone is using devel version (3.x), you also have to disable mod_security (or shut down buffering) for url "fupload/flash".

UPDATE

I found out that Hostgator uses mod_security (http://wordpress.org/support/topic/162198/page/4), so this absolutely seems to be the problem ;)

rowzee’s picture

hey grandcat, thanks for the quick (and detailed) response! i appreciate it a lot.

if i am understanding correctly, i just need to add some code to an .htaccess file and place it in the fupload/flash directory, correct?

i'm using firefox 3.01 and receiving the 503 error. on ie7 i am getting an exception error:

line: 357
char: 4
error: exception thrown and not caught
code: 0
url: http://mydomain.com/?q=node/add/image

again, it was all working fine until i upgraded drupal, so i'm wondering how it's an apache issue when it was working fine before. not a criticism/complaint, i'm just trying to learn and understand.

if you'd like a domain on my virtual hostgator server to experiment with, i can do that for you. i love drupal and hope to use it on many more projects and perhaps what you do there may be helpful to the drupal community at large. i have several domains i sandbox. if you're interested, please let me know how to contact you.

thanks again!

grandcat’s picture

Hey rowzee,

I'm not really wondering why after the upgrade to Drupal 6.4, it stopped working: Probably, you had a customized .htaccess file in docroot, but with upgrading Drupal, it has been overwritten.
You have to customize .htaccess file in docroot ("fupload/flash" is not a directory, it's a virtual path provided by Drupals menu system) a second time.

Try to use these lines, but I can't guarantee that they work because I'm not using Apache:

SetEnvIfNoCase Request_URI ^/fupload/flash$ MODSEC_ENABLE=Off
SetEnvIfNoCase Request_URI ^/index.php?q=fupload/flash$ MODSEC_ENABLE=Off

The problem with IE7 is an existing, sporadic problem (especially on WinXP, not on Vista in the most cases). But it could be that the 503 error causes this behaviour of IE.

I really would like to have a testing domain, so it's much easier to find a solution. Also the last log messages (also error messages) of Apache should be very interesting to locate the problem (if not mod_security). Also a full php_info() is very helpful =)
Please contact me by using the contact form provided by drupal.org (http://drupal.org/user/117692/contact).
Thank you very much for your help ;)

disparil’s picture

I am following the steps to solve the problem (disable mod_security, adding the two lines to the file. Htaccess) without luck.

I get the error 503. Does any another idea?

Within the drupal 6.4 list of changes (http://drupal.org/node/295065)
Can be the reason http://drupal.org/node/283806 ?

Thanks in advance and excuse me for the English.

grandcat’s picture

OK, so my 2 code lines don't work, I hadn't really expected that it works, but the the problem is still "mod_security" of your hoster. I think you installed your first Drupal Installation over the webinterface or something similar. So, your hoster could do some modifications to your Drupal Installation such as .htaacess. But with upgrading Drupal, all these changes were lost (this are my thoughts).

Within the drupal 6.4 list of changes (http://drupal.org/node/295065)
Can be the reason http://drupal.org/node/283806 ?

No, it cannot. It has nothing to do with image fupload, it's not a problem, I'm really sure.

Nevertheless, we have to find the right modification for .htaccess file so that "mod_security" will be disabled for /fupload/flash. That's all I think. I will try to find a solution.

TEST: mod_security enabled?

If you want to check if mod security is enabled,
put this in a php file (for example, phpinfo.php) and upload it to your site with them:

<?php
phpinfo();
?>

Just open the file from your browser and you will see all the functions enabled,
just do a search with your browser on that page for "mod_security" and if it gives you results, then yes, they have it enabled.
I need this info.

rowzee’s picture

hey grandcat -- sorry i didn't get back to you sooner. i have been crazy busy. i'll contact you via the link you provided and give you an account you can test with.

check this out:
http://www.jeffgerard.com/test.php

mod_security is off and i'm still getting the 503 error. the htaccess didn't work for me either, but maybe that's moot and it's something else.

are you tired of us yet? ;)

grandcat’s picture

Puhhh... ok,
I took a look at your php_info, this seems to be ok, but mod_security doesn't have to be shown there, because it can be hidden, surely.
So, I'm waiting for an sub-account right now.
It's also very, very important to have an excerpt of apache's logfiles after trying to upload some images over image_fupload. This files should be accessible by using (S)FTP or something else your provider supports (for example SSH). They are usually located in a directory called "logs" or "logfiles".

Hopefully, I get a response soon ;)

disparil’s picture

Hi,

besides disable mod_security also cleaned the cache and restart the server and it seems that the 503 error has disappeared. Now no longer gives me a 503 error, but I get a 407 error.

According to http://www.checkupdown.com/status/E407.html, it seems that has something to do with the proxy of the network.

@rowzee: Have you cleaned cache or restarted php to see the changes?

@grandcat: thanks for the advice

grandcat’s picture

Well, let's see. 407 is always better than 503. Try to use devel version. Does this one fix the problem or not?

Perhaps you could mention how you managed to get rid of 503 error message for other users, exactly what you did ;) thx

P.S.: I will be in vacation during the next week, so I won't be able to help out ;) thank you

rowzee’s picture

it only took me two days to respond this time -- i think i'm improving! ;)

the testing site has been set up for you. please check your email. if you didn't receive the info please get back to me when you can.

and thanks yet again -- hope you have a great vacation!

rowzee’s picture

hey dispa -- i've cleaned the cache but i have a virtual server so i don't think i can restart php. if anyone knows differently i'd appreciate hearing about it. i use webhost manager (whm) that i use to set up accounts that use cpanel. i'm on hostgator.

thanks in advance.

grandcat’s picture

I checked my mails, but I didn't find your mail, I also checked spam directory. Perhaps, Drupal's mailserver aren't online or another problem. Please send it again to: grandcat [at] web [dot] de
Thank you ;)
This is my last activity before vacation, so you have much time to send it again to the given email address ^^
I'll see you =) Hopefully, we can fix all problems.

@rowzee: special thanks =D

rp7’s picture

Any news on this matter? I'm currently having the exact same problem. :/

rowzee’s picture

i've set up an account for grandcat to test with but he's on vacation -- so please be patient. thanks!

grandcat’s picture

Component: Code » Miscellaneous
Status: Postponed (maintainer needs more info) » Needs work

OK, rowzee, I tested it on your installation, it is mod_security. Try http://linkstodeals.com/drupaltest/ , I uploaded the image by using image fupload.
You have to add this on top of .htaccess file of your installation:

#
# Apache/PHP/Drupal settings:
#

# Disable mod_security
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
# ...

You should know that this is no real solution because mod_security is quite useful to prevent attacks, but we should deactivate it for image_fupload. Please let me test some more things on my new cPanel account (so don't delete it yet =)

rowzee’s picture

hey grandcat,

thanks a bunch for the fix -- i'll implement it in a bit.

you may use that account to test all you want. i won't delete it because perhaps somewhere down the road you might want to test out something else. i'm cool with that. :)

hope your vacation was good -- welcome back!!

rowzee’s picture

ok, i added that bit to the .htaccess file and i am still getting the exception error that i mentioned in post #5 in this thread.

wonder if another module is causing some sort of conflict?

grandcat’s picture

Internet Explorer 6/7 does not work with swfUpload on Windows XP, sometimes. But it should work on Firefox now with your server if you added this piece of code.

rowzee’s picture

ok. in firefox: i click on "create content," then "image," then "select images," and the button doesn't do anything (this is where the exception error occurs in ie). i tested this with the .htaccess bit in place and without it in place. i even removed .htaccess altogether. i cleared the cache each time. doesn't work.

grandcat’s picture

This behaviour has nothing to do with the actual case (not depending on .htaccess), this happens if JavaScript is disabled or some files could not be loaded, perhaps you changed the theme. Try to use devel version. But I can't believe that rc1 is broken in any way.

rowzee’s picture

this happens with zen and garland themes. don't know about any others.

i'll try the devel version.

also, when i click on the images button in firefox and nothing happens: i checked the error console. it's an exception error same as ie.

again grandcat, thanks for all your patience and assistance with such a noob like me! :)

grandcat’s picture

OK, very strange, I will take a look at rc1 candiate again =)

Update

Did you have a look at status report? Are there any error messages being shown?

disparil’s picture

rowzee, when update this module, don't forget to upload the SWFUpload files in GoogleCode each time.

I forget this and when i click on the images button in firefox nothing happens. :P

I uploaded the dev version (6.x-3.x-dev) and aplied changes in .htacces (post #18) with no luck. I'm still getting a 503 error.

I'm on WinXP x64 & Firefox 2.0.0.16.

Otherwise it may be related:

When I install the image_fupload module, drupal always warns me that I can not pass variables by reference, that this deprecated. Then change the file image_fupload_image.module on the line 141 (or 142, depend on version) and remove the "&" in the function call form_get_cache. It may be related to the 503 error?

thanks for the effort.

grandcat’s picture

@dispa:

Thanks for the bug with the "&", but it doesn't have any relation to 503 behaviour, unfortunately. But I think you are hosting your side by a big provider which use proxy servers in front of their client servers. With proxy servers being protected by mod_security, you can't get rid of this problem, but you could contact your provider to disable mod_security for your domain. This is the only solution I can give you.

Additionally, you could test it locally, then you will see that it works (with WinXP + FF) =)

grandcat’s picture

Status: Needs work » Fixed

I think, it should be clear now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

sp_key’s picture

So how is it fixed?

I get the same problem and reading the entire thread I get that it's a mod_security issue but disabling it is considered unwise and NOT a real solution.

Let me know please.

juliavdw’s picture

Hello,
Just wanted to mention that I happened across this thread because I had the same problem. Image Fupload used to work and now I get 503 error.

I didn't want to mess with mod_security and htaccess, since it worked before, so on a hunch I took my site out of maintenance mode. There, it worked.

So although it is not ideal to make changes on a live site like that it solved my problem quickly!

mikeejt’s picture

Just wanted to echo juliavdw's comment...I also have to do the same workaround in order to upload my images.

I have to set the site on-line, save the new node I created (which will trigger the upload) then turn the site back off-line.

I don't know if this has bug has been logged already...

k_and_j’s picture

Ditto - 503 error until I took my site out of maintenance mode.

grandcat’s picture

Maintenance mode isn't supported yet.

grasmash’s picture

maybe you should at least display a message on the image fupload screen when a site is in maintenance mode? something like "Note, Image FUpload will not work while your site is in maintenance mode."

daviesap’s picture

Same for me. Maintenance mode had me stumped until I came across this issue. Thanks for posting.

Andrew

Summit’s picture

Hi, Is this really fixed if the site is outside maintenance mode? I disagree.. Can I set this again to active please?
greetings, Martijn