I select an image, I click upload.

The image doesn't upload and gives

Upload Error: 403

What could be wrong? Thanks.

CommentFileSizeAuthor
#9 addsource.txt51.22 KBrussew
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grandcat’s picture

Version: 6.x-1.x-dev » 6.x-1.1-beta3

You should use 6.x-1.1-beta3 version. Are there the same problems?

grandcat’s picture

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

Important

You also have to give the user the permissions to "mass upload images", otherwise 403 is sent. But it could also be a session problem. Try to log off and login again.

Flying Drupalist’s picture

My mistake, I am on beta3.

I'm also on User1. I tried to log out and in, I'm getting the same error.

grandcat’s picture

Please let me more know about your used browser, Flash version, OS (operating system) and the server configuration. Otherwise, it's difficult to give a concrete response.

Flying Drupalist’s picture

I am using Opera, Firefox, latest 9... flash, Windows XP. I am on PHP5 and MYSQL4 and apache. Is there anything specific you want to know?

grandcat’s picture

This should work fine, have you enabled "clean urls"? If not, try to configure it so that it works. It's possible that Flash Player has problems with a construct of "?q=fupload/flash". But I'm not sure.

russew’s picture

Version: 6.x-1.1-beta3 » 6.x-3.x-dev

I get the same error. Clean URLS enabled. I am using Firefox, latest 9... flash, MAC OS X. I am on PHP5 and MYSQL4 and apache. It shows the progress bar on the first upload and give the 403 error. Then I add other files to upload and it doesn't show the upload bar again.

grandcat’s picture

Mac OS X now? Why not Win XP with Clean URLs, Firefox, latest Flash 9, PHP5, MySQL 4/5? Does this work? It should.

But try to create a new user, give him the permission to "mass upload images" & to "edit captions" and then, login, try to upload images.

P.S.: Please give me the source code of the page "node/add/image". So it's easier to find the problem.

russew’s picture

FileSize
51.22 KB

It didn't work, here is the file you requested. It is on a sandbox site if you want to take a closer look.

grandcat’s picture

Version: 6.x-3.x-dev » 6.x-1.1-rc1

Ah, I suspected the problem, but you should not use devel version yet:

post_params: {"PHPSESSID" : "" , "nodetype" : "image", "fieldname" : "images"},

PHP Session ID keeps empty, that's the problem. But nobody else has this problem.
Normally, $user->sid should contain the sessionid.

Try to create a block which allows to execute PHP and insert the following lines:

<?php
global $user;
print_r($user);
?>

What is returned?

If you use dev, you should now clear the whole cache and disable & enable again image_fupload module that it works.

true-pal’s picture

same problem here,

after installation of 6.x.1.1-rc1 the module worked fine.
Then I had installed the Photos Module (http://drupal.org/project/photos) which uses the swfupload module too....
Maybe there is the reason for the 403 Error? (Clash of two different swfupload installations)
Someone else with the same history?

@grantcat
O.T. How can I enable the PHP filter in blocks? There are only the filters TEXT and HTML but I miss the PHP filter (which I always had in Drupal 5.x) ??? :-(

grandcat’s picture

Yes, you're right, my module conflicts with album module at the moment. I will have to work out why this happens. You got the reason for the problem, thanks. I will work on it =)

grandcat’s picture

Status: Postponed (maintainer needs more info) » Active

Oh god, album modules has a very "nice" PHP coding style which overwrites the $user variable and voilà, session id will be deleted => 403 error. I will create an issue for album module ;-)

true-pal’s picture

Viel Glück :-)

Gruss aus Munich
Jürgen

grandcat’s picture

Component: Miscellaneous » Code
Status: Active » Fixed

OK, I wrote now a little workaround for that, so that it will work, not depending on photo module (or also other modules) being enabled or not.
Fixed in CVS HEAD. Should be in devel version tomorrow ;)

grandcat’s picture

Ich werde es schaffen =)

Gruss zurück,
Stefan

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

tevih’s picture

Version: 6.x-1.1-rc1 » 6.x-3.0-rc2
Status: Closed (fixed) » Active

Has this fixed the problem for others? I see this is an old ticket, but I am having the same issue trying to use it with Album.

grandcat’s picture

Status: Active » Closed (fixed)

Don't reopen such old issues. Your problem doesn't affect this issue exactly.

naim shaikh’s picture

I just faced the same problem with SWFupload module where it was working properly on one server and doing exactly opposite on other one. I was getting 403 error as 'server error'.
I searched on google and I found this code to put in .HTACCESS file.
Here is the code:

########## Attempt to solve 'Global Configuration' save issue, FTP layer issue, Media Upload issue
SecFilterEngine Off
SecFilterScanPOST Off
########## End - Attempt to solve 'Global Configuration' save issue, FTP layer issue, Media Upload issue

I got this code from this url:
http://forum.joomla.org/viewtopic.php?f=431&t=265427&p=1216787

After updating my .HTACCESS file with the above code , My problem resolved.

castawaybcn’s picture

#20 worked for me too, thanks a lot!

castawaybcn’s picture

well, this is surprising. I found my .htaccess modified today:

########## Attempt to solve 'Global Configuration' save issue, FTP layer issue, Media Upload issue
# File modified on Mon Feb 15 14:04:37 2010 by server
# SecFilterEngine is not a supported htaccess directive
# SecFilterEngine Off
# File modified on Mon Feb 15 14:04:45 2010 by server
# SecFilterScanPOST is not a supported htaccess directive
# SecFilterScanPOST Off
########## End - Attempt to solve 'Global Configuration' save issue, FTP layer issue, Media Upload issue

Any help will be most welcome, I just don't know what to do

grandcat’s picture

Please contact your provider. It seems that either mod_sec isn't installed or they don't like that it will be deactivated.

castawaybcn’s picture

thanks grandcat,
it seems mod_sec is not installed on my shared host, do I have any chance of succeeding without it?

grandcat’s picture

It's better if it isn't installed. Nevertheless, you should contact your hoster. Probably, there's another thing which blocks the connection.
You should also check your Drupal settings and set your site online.

soyarma’s picture

If you are unable to turn off mod_security, download the 'persistent login' module and then when logging in, check off the 'remember me' button. This will drop a cookie and then instead of getting a 403 (access denied) persistent login's cookie keeps you logged in and the images upload.

manoloka’s picture

#20 worked for me too :)

Many Thanks

munyiva’s picture

#20 worked for me with a small modification


SecFilterEngine Off
SecFilterScanPOST Off