Code Igniter Error: Disallowed Key Characters


1. Search for function _clean_input_keys on /system/core/Input.php

2. Modify this line

exit(‘Disallowed Key Characters.’);

to

exit(‘Disallowed Key Characters.’ .  $str);

3. Refresh page to see the characters which generate the error

4. If you need to add those characters into the exception list, just add to this line

if ( ! preg_match(“/^[a-z0-9:_\/-]+$|/i”, $str))

I add | (pipe) character on the example above

Note: In most cases you can resolve the problem just by clearing the cookies

PHP – Unzip Large File


    $filename = 'c:\kosmas.zip';
        $archive = zip_open($filename);
        while($entry = zip_read($archive)){
            $size = zip_entry_filesize($entry);
            $name = zip_entry_name($entry);
            $unzipped = fopen('c:/unzip/'.$name,'wb');
            while($size > 0){
                $chunkSize = ($size > 10240) ? 10240 : $size;
                $size -= $chunkSize;
                $chunk = zip_entry_read($entry, $chunkSize);
                if($chunk !== false) fwrite($unzipped, $chunk);
            }

            fclose($unzipped);
        }


source:
http://stackoverflow.com/questions/3263129/unzipping-larger-files-with-php