Suggested max upload_max_filesize and post_max_size php.ini file ?

Smaily

Well-Known Member
Sep 19, 2011
46
0
56
cPanel Access Level
Root Administrator
I have changed my php.ini limits

/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini
/usr/local/cpanel/3rdparty/etc/php.ini
/usr/local/lib/php.ini

Code:
max_execution_time = 30
max_input_time = 60
memory_limit = 128M

log_errors = On
log_errors_max_len = 1024
ignore_repeated_source = Off

report_memleaks = On
track_errors = Off
register_argc_argv = On
post_max_size = 2500M
gpc_order = "GPC"

auto_prepend_file =
auto_append_file =

default_mimetype = "text/html"
include_path = ".:/usr/lib/php:/usr/local/lib/php"
doc_root =
user_dir =

extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
extension = "suhosin.so"
extension = "pdo.so"
extension = "pdo_sqlite.so"
extension = "pdo_mysql.so"
extension = "sqlite.so"
extension = "ixed.5.3.lin"

suhosin.request.max_vars = 2048
suhosin.post.max_vars = 2048
suhosin.cookie.encrypt = Off
suhosin.memory_limit = 128M
suhosin.session.encrypt = Off
suhosin.get.max_value_length = 2048
suhosin.get.max_name_length = 2048
suhosin.request.max_varname_length = 2048
enable_dl = Off
file_uploads = On
upload_max_filesize = 2500M
allow_url_fopen = On
default_socket_timeout = 60
smtp_port = 25
sendmail_path = "/usr/sbin/sendmail -t -i"
sql.safe_mode = Off

mysql.allow_persistent = Off
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off

session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.cache_limiter = nocache
session.cache_expire = 180
Worried if I changed them to too large values?
post_max_size = 2500M
upload_max_filesize = 2500M

I just wanted to be able to upload more higher size .sql file then 100-200MB because I had such database without having to split it or pack it.

What happens if specifyed too high value? In means of security and server physical load/status.
Total processors: 8 (2xQuad core Intel(R) Xeon(R) CPU E5405 @ 2.00GHz)
RAM: 32GB (16x2GB)
Interface is running bond mode 6.

Anything else I should pay attention in php.ini?
I also noticed simply editing /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini gets overwritten in time.
And by question I don't use port 25SMTP. Only php.ini has it set. Other then that WHM has changed outgoing port into 26 and 587, so is firewall. 25 should be blocked. what mail is going out using that port and can I change it?
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hello,

If you want to upload large databases file on your server through phpmyadmin then there is no need to increase the upload limit in your /usr/local/lib/php.ini file, Change the upload limit in /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini file for the large .sql file
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
And by question I don't use port 25SMTP. Only php.ini has it set. Other then that WHM has changed outgoing port into 26 and 587, so is firewall. 25 should be blocked. what mail is going out using that port and can I change it?
You can't block 25 out, because the other servers your server is sending to are listening in that port.
However you can, in your firewall, allow only specific users (usually root, exim and mailman) to use SMTP port.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

You should considering using the command line to import large databases. EX:

Code:
mysql database_name < /path/to/file.sql
There is no need to worry about PHP upload limits when you import a database this way.

Thank you.