Solved

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

Posted on 2013-06-04
6
1,070 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
Comment Utility
You can add it to the ini file in the [PHP] section,

upload_max_filesize = 10M
post_max_size = 10M
0
 
LVL 6

Assisted Solution

by:Robert Saylor
Robert Saylor earned 250 total points
Comment Utility
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
Comment Utility
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:ruavol2
Comment Utility
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 6

Assisted Solution

by:Robert Saylor
Robert Saylor earned 250 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now