Forbidden / OK popup when uploading an image

Posted over 7 years ago by Tom Ron

Post a topic
Answered
T
Tom Ron

Hey,


when trying to upload an image sometimes it's working great, sometimes it says forbidden and sometimes it shows OK but do nothing.


we have tried to maximize the file upload and all this but nothing.



Any help please?


Thanks!

0 Votes

rady kal

rady kal posted over 6 years ago Admin Best Answer

In most cases this is caused by your server configuration - a missing php class or function which is necessary for the upload process. But its only possible to tell you when you share your WP site url in a support ticket.

0 Votes


18 Comments

Sorted by
T

Tyler Keever posted about 5 years ago

I was able to resolve this issue without having to put Wordfence into learning mode. (Learning mode can expose your site to vulnerabilities because Wordfence will whitelist and possibly not block a number of complex attacks. See the section at the bottom titled "What to Do If a Page Is Blocked After Learning Mode Is Complete" https://www.wordfence.com/help/firewall/learning-mode/ )


I did this by going into the Live Traffic view of Wordfence. I located the entry that showed my image upload being blocked ( [PAGE URL] was blocked by firewall for LFI: Local File Inclusion in POST body) and clicked the "Whitelist Param From Firewall" button. I was then able to verify that it just whitelisted the image-handler.php file of Fancy Product Designer by going to the firewall whitelist section of All Options.

Image uploads now seem to work just fine.

0 Votes

D

Dale Rogers Training Center posted over 5 years ago

Same thing happened to our website. Johnny explained some options in a support ticket, but it ultimately was a conflict with the Wordfence plugin.


Here's what resolved our "Forbidden" messages: Wordfence > Firewall > All Firewall Options > Web Application Firewall Status and change that from Enabled and Protecting to Learning Mode. (This should allow the Wordfence Firewall to whitelist the action.) Then go in as a customer and try to upload images as they normally would.

0 Votes

T

Testing Demo posted almost 6 years ago

Hi,

Every time i want to upload image on custom-shirts occurs a error "Forbidden",

please assist how to solve this problem.?

please check the screenshot and link for more details,

Thank You

https://www.redrooaustralia.com.au/product/black-tee-2/

0 Votes

T

Testing Demo posted almost 6 years ago

Hi,

Every time i want to upload image on custom-shirts occurs a error "Forbidden",

please check the screenshot and link for more details,


https://www.redrooaustralia.com.au/product/black-tee-2/

0 Votes

K

Knight posted over 6 years ago

Deactivating Wordfence solved this problem for us as the plugin was causing this issue.

0 Votes

rady kal

rady kal posted over 6 years ago Admin Answer

In most cases this is caused by your server configuration - a missing php class or function which is necessary for the upload process. But its only possible to tell you when you share your WP site url in a support ticket.

0 Votes

B

Bob posted over 6 years ago

Any new feedback or update on this? If Wordfence is interfering, did you remove it or just have some settings adjusted on wordfence end?

0 Votes

N

Natalie Savage posted about 7 years ago

I have the same problem here. Gives me OK error. Has anybody fixed this issue?

0 Votes

G

Giack posted over 7 years ago

I have the same problem but only on certain image. It says OK on white popup. Any other solution? 

GwC_lcSDmVU_9UwF7SDWeurb8agsf08oqw.JPG

0 Votes

T

Tom Ron posted over 7 years ago

Hi Stanley, first of all thank you so much for the quick reply and the help!


i've just found what it was! it's WORDFENCE

the plugin for security.


nevermind:) got it solved thanks to you!



0 Votes

S

Stanley Bucasas posted over 7 years ago

Ah sorry to hear that.  I don't know.  The only other thing I can think of is make sure your images are being uploaded to a server.


I've had to work out so many kinks and produce so many work arounds that I dont remember everything I did.  But I can't think of anything else to solve that, If I do I will let you know.


Good Luck

0 Votes

T

Tom Ron posted over 7 years ago

Yeah man, thanks for the help but it's still happaning.


when i try to change my server php to 5.2 (the website doesn't load at all saying something is missing...) so i've tried to change it to 5.6 (newer version..)

but still no luck.


btw, i notice something weird that when i'm administrator it's working fine but when i'm using incognito / other user not admin it's not working, saying FORBIDDEN.


any other suggestion please??


Thanks

0 Votes

S

Stanley Bucasas posted over 7 years ago

give it a try. you can always just change it back

0 Votes

T

Tom Ron posted over 7 years ago

So, i've checked and my php version is 5.4

should i edit it to be 5.2?! in order for it to work.... it sounds weird, no?


maybe update it to 5.6?! 

0 Votes

S

Stanley Bucasas posted over 7 years ago

My problem was because I had the wrong PHP version set.


I was using PHP 5.2.  Then I thought I read somewhere in the FPD changelog that I could use PHP 7.0.  But then I started getting that error so I changed it back to 5.2 and it worked.


0 Votes

T

Tom Ron posted over 7 years ago

actually we did nothing to the php version / cpanel..


how did you solve it? :)

0 Votes

S

Stanley Bucasas posted over 7 years ago

I've had this problem, but it was because I messed with my PHP version in the cpanel.


I also think it was only giving me problems with facebook and instagram uploads.

0 Votes

T

Tom Ron posted over 7 years ago

also notice, it depends on the user roles. as administrator i can upload, but someone else (buyer..) can't upload.


Maybe there is an option to disable? or even something with the host?


Thanks again

0 Votes

Login or Sign up to post a comment