How to change the post_max_size

Status
Not open for further replies.

zhengzhi

New Member
Messages
1
Reaction score
0
Points
1
I have been working on a project which will post some image to the server, it works well for the thumbnails, but when I start to send the original one, every time it fails, so I am wondering if it is because of the limitation of post in php.
I go through some thread in the community, and go to "select php version"->"switch to php setting", and try to find the "post_max_size", but it's not there, the screenshot is shown as below,
screenshot.jpg

so, can anyone help me with this.

Thank you
 

jchanx12

New Member
Messages
5
Reaction score
0
Points
1
I dont know if this will work but adding the following lines to .htacess may work

php_value upload_max_filesize xxM
php_value post_max_size xxM

Replace xx with your own values
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
I dont know if this will work
x10hosting's free-hosting accounts do not have access to change the [ php.ini ] file on their server

with this test PHP script on my free-hosting server [ xo3 ]
PHP:
<?php
error_reporting(E_ALL);

print "\"PHP maximum upload file size\" is ==>" . ini_get('upload_max_filesize') . "<==<br>\n<br>\n";

print "\"PHP maximum post file size\" is ==>" . ini_get('post_max_size') . "<==<br>\n<br>\n";
?>

I 'see'...
"PHP maximum upload file size" is ==>16M<==

"PHP maximum post file size" is ==>16M<==
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
And please note that 16MB is actually overkill here, since files over 10MB will be automatically deleted after about 4 hours anyway. A higher limit may be useful for files that are to be processed and discarded, but for files that are to be used/served as-is, a higher limit wouldn't be any help at all.
 

jchanx12

New Member
Messages
5
Reaction score
0
Points
1
x10hosting's free-hosting accounts do not have access to change the [ php.ini ] file on their server

with this test PHP script on my free-hosting server [ xo3 ]
PHP:
<?php
error_reporting(E_ALL);

print "\"PHP maximum upload file size\" is ==>" . ini_get('upload_max_filesize') . "<==<br>\n<br>\n";

print "\"PHP maximum post file size\" is ==>" . ini_get('post_max_size') . "<==<br>\n<br>\n";
?>

I 'see'...
"PHP maximum upload file size" is ==>16M<==

"PHP maximum post file size" is ==>16M<==
Mate, idk if you can read but I said
"adding the following lines to .htaccess may work" not php.ini
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
End-user access to php_ini variables, through any means (including .htaccess and ini_set()) is restricted on Free Hosting.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Mate, idk if you can read
I can read just fine

your code (lines) would try to change the values from the [ php.ini ] file that are used by the server
x10hosting has free-hosting accounts blocked from doing that on their servers

"AllowOverride Options" and/or "AllowOverride All" privileges are set off
or they run PHP in CGI mode (not a Apache module)

for more information see --> [ http://php.net/manual/en/configuration.changes.php ]
 
Status
Not open for further replies.
Top