0
votes

i have a code(writen in codeigniter) running on sub-domain inside cakephp webroot directory, code is written in codeigniter, When a post request is sent with some input values it works fine, but when values change to some other, it return 403 error. In case of 403 error, server do not hand over the request to main index.php of codeigniter. Try to debug alot, but nothing seems to work. It seems that apache sending 403, But i am unable to figure it out what is causing it.

i have make chnages to .htaccess and using phpinfo() verify the changes, but nothing work. Can any one guide me. Thanks in advance

What i have tried:

  1. i tried checking error log files, it just says "File not found [/home2/maindomain/subdomain/app/webroot/403.shtml]"

  2. also tried to print request in main index.php, do not got any thing when it throws 403, in success case it shows stack trace or what ever i print or echo. this shows in case of 403, request is not handed over to index.php

  3. AS you can see in .htaccess i have changed memory and time limits, but still no effect Php version : 5.6

  4. From browser console, request is same, no change, just variable values changes, cookie and every other thing is same

  5. I have also checked CSRF, its off. so checked config.php things as well.

  6. i have also tried log error to my location and in my error log file nothing comes up.

.htaccess filde code


    AllowOverride Options
    AllowOverride All
    php_flag display_errors On
    php_flag display_errors Off
    php_value post_max_size 512M
    php_value memory_limit 512M
    php_value max_execution_time 300
    php_value max_input_vars 10000
    php_Value display_errors on
    php_value display_startup_errors on
    php_value upload_max_filesize 128M

    DirectoryIndex index.php
    RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]

in case of error server response is "Forbidden

Access to this resource on the server is denied!"

In success its a valid json.

1

1 Answers

0
votes

Could you please add more details about your input value and then change it then doesn't work? by the way, you've mentioned you have a subdomain probably there is some configuration to check inside your vhost, did you check it in the folder /etc/apache2/sites-available/default?