Welcome Guest, Not a member yet? Register   Sign In
SOLVED: Disallowed Key Characters: Problem On Ubuntu 8.04
#1

[eluser]Onur Özgür ÖZKAN[/eluser]
Hi CI Users,

Last week, i finished to use WAMP Technology and started to use LAMP Technology. I choiced Ubuntu 8.04 for operation system and i use XAMPP for Apache server, MySQL and PHP5. My main problem is our web applications, which were done by CI, started to give some error messages "Disallowed Key Characters".

I search on google, ci forms... but i find nothing... Sad

I overwrite the _clean_input_keys($str)methods with

Code:
function _clean_input_keys($str)
    {
        if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
        {
            //exit('Disallowed Key Characters.');
            exit('Disallowed Key Characters: '.$str);
        }
        return $str;
    }

Then the output is "Disallowed Key Characters: PHPSESSID"
The strange thing is ZF also doesn't work stablely on ubuntu?
Is there any idea over this problem?

.htaccess file is
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ index.php [L]
    RewriteCond $1 !^(index\.php|themes|robots\.txt|sitemap\.xml)
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.

    ErrorDocument 404 /index.php
</IfModule>

And i change Allowed URL Characters from config.php
Code:
$config['permitted_uri_chars'] = ' ';

Here is the solutions?
1. Don't use XAMPP on linux so we uninstall it!
Code:
rm -rf /opt/lampp
2. Install apache2
Code:
apt-get install apache2
3. Setup mod_rewrite
/etc/apache2/sites-available/default
Code:
<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Directory>

Then you must install PHP5 thats all.
#2

[eluser]dpgtfc[/eluser]
I don't have any ideas on what your issue would be, but I had a similar issue today due to a cookie clash.

The server I host my CI application on is also sometimes used as a proxy by myself. I was using the proxy today and this error came up. I cleared my cookies and had no more problems. I am using the Modular Extensions, but I'm not sure if that has anything to do with it.
#3

[eluser]davidbehler[/eluser]
I don't know in detail how the function preg_match handles stuff, but might it be that your problem are simply the capital letters in "PHPSESSID" since you only have "a-z" in your regular expression. Try "a-zA-Z" instead, maybe that works.
#4

[eluser]Onur Özgür ÖZKAN[/eluser]
Thanks guys but we couldn't solve the problem

1. I delete all cookies on my browser. First i open the site everything is okey. But second time it gives the some error. Sad

2. I and A-Z to _clean_input_keys($str) method in input library but nothing changed. Sad

Come on! Isn't a developer who use CI and write code in ubuntu?
#5

[eluser]Unknown[/eluser]
Well, I use Ubuntu and have been coding in codeigniter for a couple of months now. I have the same error "Disallowed key characters."

I am still trying to debug my problem, but i can tell from the forums that even when i find the solution, i have to have all previous cookies (or at least the bad cookie) deleted.

I'll keep you posted.




Theme © iAndrew 2016 - Forum software by © MyBB