Welcome Guest, Not a member yet? Register   Sign In
Error FORBIDDEN when inserting HTML Syntax [SOLVED: Upgrade CI Version]
#1

(This post was last modified: 06-29-2016, 10:53 PM by andoyoandoyo.)

Dear my friends...

I have a website using Codeigniter 3. There are some form inputs that can contain HTML syntax input to be saved in MySQL Database.
I tested in localhost and it worked fine.

The problems happened when I uploaded to live hosting. Error FORBIDDEN 403 always happen when I try inserting an input contain HTML syntax like iframe, <div> etc.

Please help me to solve this problem.
Reply
#2

Are you escaping the input data? Just a guess
TastyIgniter - Open Source Restaurant Ordering and Management System
Reply
#3

Also check if you have any .htaccess files doing stuff. I remember tearing my hair out as to why my form wasn't submitting properly on my server and in the end found a rouge line inside my .htaccess file on my live server.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply
#4

(This post was last modified: 10-08-2015, 03:06 AM by phplaw.)

Have you ever tried to turn xss filtering config off , if not you can try to turn It off
open config.php, then find this line of config:
Code:
$config['global_xss_filtering'] = TRUE;
Then update the line to this
Code:
$config['global_xss_filtering'] = FALSE;

Hope that can help you resolve the issue.
Reply
#5

This is not Codeigniter configuration related.
It is related to hosting server configuration.

You can overide using .htaccess :
Code:
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>

If still error, you should report to your webhosting service.
Good luck.
Reply
#6

Hi!

I've the same, and there are 2 solutions.-

1 - for some people works to add this code to the .htaccess file:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>


2 - in MY case, the issue occurs in the production server because of a security module of Apache (the same before, but the cpanel don't allow the user to mess with that config. So in Namecheap.com servers, thech support enable the feature for us in a pair of minutes, and solved.

I paste here two articles explaining that:

[https://www.namecheap.com/support/knowle...e-need-it/][1]

[https://www.namecheap.com/support/knowle...ty-plugin/][2]


[1]: https://www.namecheap.com/support/knowle...e-need-it/
[2]: https://www.namecheap.com/support/knowle...ty-plugin/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB