xml - PHP SimpleXML, CodeIgniter and Apache with Suhosin -


i have application writing in php5, using codeigniter framework. have running on both windows (using xampp) , ubuntu (using standard apache, php, mysql stack).

i have form, takes xml, parses (using simplexml) , posts results database.

on windows - no problem, works intended.

on linux - big problem. errors out.

i have double checked xml, , it's fine.

i removed large amount of xml, , seems ok.

i think it's related size of xml string being posted form, not sure. again, on windows it's ok - on linux, errors out.

the size of data posted in form ~160k (yeah, that's lot of text, it's automated - , it's gonna 200k).

the error below.

any appreciated.

fatal error: uncaught exception 'exception' message 'string not parsed xml' in /var/www/ci/system/application/controllers/system.php:49 stack trace: #0 /var/www/ci/system/application/controllers/system.php(49): simplexmlelement->__construct('') #1 [internal function]: system->add_system() #2 /var/www/ci/system/codeigniter/codeigniter.php(233): call_user_func_array(array, array) #3 /var/www/ci/index.php(115): require_once('/var/www/ci/sys...') #4 {main} thrown in /var/www/ci/system/application/controllers/system.php on line 49

line 49 looks this:

$xml = new simplexmlelement($this->input->post('form_systemxml'));

edit - fixed

found issue. suhosin installed on ubuntu. in file /etc/php5/apache2/conf.d/suhosin.ini, enabled line suhosin.post.max_value_length = 65000 , changed value 195000. restarted apache, , good. pointers guys.

it seems you're running suhosin php extension. please have @ configuration documentation at: http://www.hardened-php.net/suhosin/configuration.html.

the relevant option seems (i've never used suhosin extension): suhosin.post.max_value_length and/or suhosin.request.max_value_length


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -