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

(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.

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

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

(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:
$config['global_xss_filtering'] = TRUE;
Then update the line to this
$config['global_xss_filtering'] = FALSE;

Hope that can help you resolve the issue.

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

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

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


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

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:



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

Theme © iAndrew 2016 - Forum software by © MyBB