hello i am trying to pass a large serialized array (12.4kb) using POST via PHP, but it doesn't get passed completely i only recieve 269 bytes, whats wrong? i am using Godaddy linux shared hosting.

I guess you will have to check the following setting in php.ini


; Maximum size of POST data that PHP will accept.
post_max_size = 50M

I guess you will have to check the following setting in php.ini


; Maximum size of POST data that PHP will accept.
post_max_size = 50M

on my system it was set to 128MB, no idea about Godaddy, how can i change that?

put a temporary page on your GoDaddy server with just this code:

<?php
phpinfo();
?>

Navigate directly to it. The current value of the setting should appear in the "Configuration -> PHP Core" section of the output.

Once you have the output, print it for your records then remove the page for security reasons.

I'm guessing your issue is elsewhere though. If that's your cause, that's an awful small limit.

It is 8M, much larger than 12.5KB may be the issue is with php not serializing array correctly, though when i try to print it does correctly, but it doesn't send correctly through post request, i am stuck, please help

The array doesn't contain any slashes or quotes does it? You may just need to run some clean up like mysql_real_escape_string on it to get it to come through.

i tried mysql_real_escape_string it says access denied:-O

In php5 you have to have an open connection to mysql to use the mysql_real_escape_string. You can also try addslashes().

i tried add slashes, it didn't work :'(

maybe i can use some encryption algo of fixed length, 32, 128 etc on serialized array

and then decode it after receiving it and then unserialize the data ???

can you post your code up?

That could work, you should try it out and see what happens.

solved! i used base64_encode and base64_decode and it solved the problem!

Glad to hear it worked!