PDA

View Full Version : getting httperror 403 with fileupload


villamark
02-08-2006, 09:27 PM
hi guys, my website used the fileupload from flash 8 to update the image galery, news, etc. everything was working fine until a few days ago i 'm getting a httperror #403.
i tried different things and can't get this to work againg

i put the domain name, and the ip server in the crossdomain.xml and nothing

i used a simple html form to upload image and its working fine, the problem its only in the flash upload

i checked the folder has permissions 777

i tried the same flash-php code in a diferent hosting and its work fine so the problem its in the hosting.

i talk to the hosting company (ipowerweb) and they said the can'f found anything wrong.

i also tried the ini_set() function and .htaccess to change the "upload_tmp_dir" value of the php.ini to see if this is part of the problem but nothing happen.

at last i tried to used diferent port instead of 80 i used the 443 to se what happens and i'm not getting the error but i don't know where is the image uploaded.

so i'm out of options, i think that is hosting but i don't know what else can i do...

i tried for about 1 week , any ideas o sugestions

thanks in advance for the help.

villamark
02-09-2006, 05:36 PM
i still can't figure out , any ideas.. i had to many days working on this and no results..

thanks

Flash Gordon
02-09-2006, 05:40 PM
just for kicks, can you try it through html(php) instead of flash?

goliatone
02-09-2006, 05:43 PM
maybe this (http://www.checkupdown.com/status/E403.html)can give you an idea

villamark
02-09-2006, 06:49 PM
yes i tried with html/php and it works fine, the files are uploaded to the folder, but in flash i can't im getting httperror

so what's the different between html and flash, they used the same method rigth? they send via http the information

i also check and i don't have any protected folder, and a have access to the upload.php directly on the url.

i also used a http sniffer and didn't found to much information only a 403 page response from the server.

this is a simple php code i used to check:
<?php

if ($_FILES['Filedata']['name']) {
$uploadDir = "images/";
$uploadFile = $uploadDir . basename($_FILES['Filedata']['name']);
move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadFile);
}
?>

thanks guys for your time

Flash Gordon
02-09-2006, 06:59 PM
so what's the different between html and flash, they used the same method rigth?

Yeah, it uses the same PHP and as html does. Very weird?

I guess the different here would be the crossdomain issue. I've never had luck with Flassh and crossdomain.xm. Can you try the method in the sig (either one).?

villamark
02-09-2006, 07:44 PM
i just discovered this error in the log.file of the server:
[Wed Feb 8 15:03:23 2006] [error] [client x.x.x.x] mod_security: Access denied with code 403. Error processing request body: Multipart: invalid part header (missing colon): Submit Query\\x0d\\x0a [hostname "www.mydomain.com"] [uri "/upload/uploadjpgsx.php?Categoria=Paisajes"]

i found the "part header (missing colon)" may be thats the key of the problem, i will search on the net how can i see the information the flash is sending to the server.

and yes i tried the crossdomain but if i change anything it giveme a security sandbox message, i thinks its working fine.

gabeauchamp
02-14-2006, 02:54 PM
Yeah, I have the same hosting company (ipowerweb) and my flash upload was working.

It doesn't work anymore just like you:mad:

straight uploading through php works with a 777 folder.

I've been looking around for 5 days now, and still no answer to the problem!

Gabriel

Ralgoth
10-02-2006, 07:25 PM
I also use ipowerweb. This is the solution off of the Macromedia website. You'll just need to make a txt file, add these lines, and then rename it to .htaccess after uploading it. Pretty simple...

Any http errors such as 403, 406 or where a file upload goes to a 100% but doesn't show up on the server is a result of the mod_security. Mod_sercurity blocks the post request of flash because it is missing a ":". To correct this problem create or find the .htaccess file in your root directory then type in:

SecFilterEngine Off
SecFilterScanPOST Off

that should correct your problem

Flash Gordon
10-02-2006, 09:57 PM
that's gonna rock my socks if Iit actually works!

Thanks for sharing :)