Solved

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

Posted on 2013-06-04
6
1,148 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

739 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