Solved

How do I configure the PHP.INI file to allow for a maxuploadcontentlength

Posted on 2013-06-04
6
1,127 Views
Last Modified: 2013-06-17
The following is the PHP.INI file I have located on my server. I have a problem in Plesk Panel that keeps me from uploading files larger than some amount. I cannot find where in the code below that shows the MaxUploadContentLength and I am wondering if I am supposed to introduce new code into the code.......If so what is that code and where do I place that code below. Any support is appreciated.

CODE FROM MY PHP.INI file

[Pcre]

[sqlite]

[intl]

[bcmath]
bcmath.scale = 0

[gd]

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

[COM]

[iconv]

[exif]

[ODBC]
odbc.allow_persistent = On
odbc.defaultbinmode = 1
odbc.max_links = -1
odbc.check_persistent = On
odbc.defaultlrl = 4096
odbc.max_persistent = -1

[Session]
session.bug_compat_42 = Off
session.auto_start = 0
session.cache_limiter = nocache
session.bug_compat_warn = Off
session.hash_function = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
session.name = PHPSESSID
session.use_only_cookies = 1
session.entropy_length = 0
session.serialize_handler = php
session.cookie_path = /
session.entropy_file =
session.gc_probability = 1
session.cache_expire = 180
session.gc_divisor = 1000
session.cookie_domain =
session.cookie_httponly =
session.gc_maxlifetime = 1440
session.referer_check =
session.save_handler = files
session.save_path = "/var/lib/php/session"
session.cookie_lifetime = 0
session.use_cookies = 1
session.use_trans_sid = 0
session.hash_bits_per_character = 5

[mbstring]

[sqlite3]

[sysvshm]

[soap]
soap.wsdl_cache_ttl = 86400
soap.wsdl_cache_enabled = 1
soap.wsdl_cache_dir = "/tmp"

[mail function]
mail.add_x_header = On
sendmail_path = /usr/sbin/sendmail -t -i
smtp_port = 25
smtp = localhost

[PostgresSQL]
pgsql.max_links = -1
pgsql.allow_persistent = On
pgsql.log_notice = 0
pgsql.auto_reset_persistent = Off
pgsql.ignore_notice = 0
pgsql.max_persistent = -1

[Phar]

[Assertion]

[Pdo]

[Date]

[MySQLi]
mysqli.default_host =
mysqli.default_pw =
mysqli.reconnect = Off
mysqli.default_user =
mysqli.default_socket =
mysqli.max_links = -1
mysqli.default_port = 3306

[Tidy]
tidy.clean_output = Off

[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.min_client_severity = 10
sybct.max_links = -1
sybct.min_server_severity = 10

[filter]

[Syslog]
define_syslog_variables = Off

[browscap]

[SQL]
sql.safe_mode = Off

[PHP]
asp_tags = Off
include_path = ".:"
ignore_repeated_source = Off
variables_order = "GPCS"
track_errors = Off
output_buffering = 4096
auto_globals_jit = On
doc_root =
log_errors = On
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
auto_append_file =
disable_classes =
display_startup_errors = Off
user_dir =
enable_dl = Off
register_argc_argv = Off
display_errors = Off
open_basedir = "/var/www/vhosts/macsimizesoftware.com/:/tmp/"
allow_call_time_pass_reference = Off
safe_mode_exec_dir =
default_socket_timeout = 60
html_errors = Off
register_globals = Off
unserialize_callback_func =
y2k_compliance = On
magic_quotes_runtime = Off
expose_php = Off
log_errors_max_len = 1024
post_max_size = 8M
report_memleaks = On
engine = On
memory_limit = 128M
short_open_tag = On
max_execution_time = 60
safe_mode_include_dir =
serialize_precision = 100
precision = 14
upload_max_filesize = 128M
register_long_arrays = Off
safe_mode = off
zlib.output_compression = Off
ignore_repeated_errors = Off
request_order = "GP"
default_mimetype = "text/html"
allow_url_include = Off
disable_functions =
file_uploads = On
magic_quotes_sybase = Off
max_input_time = 60
magic_quotes_gpc = Off
error_reporting = E_ALL & ~E_DEPRECATED
safe_mode_gid = Off
auto_prepend_file =
implicit_flush = Off
allow_url_fopen = On

[MSSQL]
mssql.compatability_mode = Off
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.max_links = -1
mssql.secure_connection = Off
0
Comment
Question by:ruavol2
  • 2
  • 2
  • 2
6 Comments
 
LVL 23

Accepted Solution

by:
tailoreddigital earned 250 total points
ID: 39221013
You can add it to the ini file in the [PHP] section,

upload_max_filesize = 10M
post_max_size = 10M
0
 
LVL 7

Assisted Solution

by:Robert Saylor
Robert Saylor earned 250 total points
ID: 39221018
This might help:

http://kb.parallels.com/en/1447

Note: I believe plesk will allow you to use a custom php.ini file that you can upload to your public_html directory. Give that a try. If not, you will have to modify the file from SSH using root login.
0
 
LVL 23

Assisted Solution

by:tailoreddigital
tailoreddigital earned 250 total points
ID: 39221019
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:ruavol2
ID: 39221447
tailoreddigital
I noticed above that the code I posted has those two entries. They say
upload_max_filesize = 128M
post_max_size = 8M

It fails when I try to change them and save them. I went into PLESK and found a tab under Domains and Websites. Then selected my domain and double clicked it. That choice took me to the Hosting Settings for the Domain. I then clicked the tab for the PHP Settings. There under Performance Settings section. I saw the
Post Max Size
Upload Max FileSize
Both had choices for using the default setting or using a custom setting. I switched both to 128M and the started to work. I had all kinds of problems trying to edit it and save the change to the code inside of PLESK. Which the tool actually offers. I was surprised that it gave that functionality but it did not work.
0
 
LVL 7

Assisted Solution

by:Robert Saylor
Robert Saylor earned 250 total points
ID: 39221936
Plesk is not friendly BTW. The best option is to modify the file via SSH then restart apache. WHM/cPanel does a much better job with configuring and tweaking php then plesk.
0
 

Author Closing Comment

by:ruavol2
ID: 39253442
I got it to work thank you for the support. I set the
post_max_size = 8M  to post_max_size = 128M
and it seems to have worked. Thank you.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question