How do i increase the upload limit in my cpanel

megadrive

Member
Dec 18, 2005
5
0
151
Hello,
My maximum upload file size is limited to 2 MB
And i can not find zend folder to change the php.ini
but it says the following when i typed php -v

Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Do i have zend optimizer installed or not?
If not how do i install zend optimiser?
Thank you
Cheers
Senthil
 

Hightek Designs

Registered
Jul 8, 2005
4
0
151
if you have Cpanel 11 go to WHM and click on 'Service Configuration' then go to 'PHP Configuration Editor' You should then see upload_max_filesize. Change that to what you need.

I hope this helps.
 

megadrive

Member
Dec 18, 2005
5
0
151
I don't have cpanel 11 version, so i don't have php configuration editor
but i did edit the Tweak settings in the server configuration and set it to (unlimited) but it didn't work.
Are there any other ways?
Thank you
Cheers
Senthil
 

Hightek Designs

Registered
Jul 8, 2005
4
0
151
Yes, if you can use SSH to edit a file, edit this file:

nano /usr/local/lib/php.ini

Find upload in the file and change
upload_max_filesize = 2M

you can then change it to 6 or what ever number you decide.

I know that the php.ini file is located there on a CentOS 4.5 system, not sure of any other linux system.

I hope this helps. :)

EDIT: If you can not find php.ini type in locate php.ini and it should find all occurrences of it.
 
Last edited:

megadrive

Member
Dec 18, 2005
5
0
151
I did try that using the file manager from virtuzzo. I edited the file and after i saved it the file size decreased from 37.5Kb to 6.95 kb and i can no longer find the top half of the script.
I don't know what to do?
 

pross

Well-Known Member
Mar 14, 2005
75
0
156
you dont have zend optimizer installed or you'd see this:
Code:
[email protected] [~]# php -v
PHP 5.2.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jun 22 2007 17:32:06)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with the ionCube PHP Loader v3.1.29, Copyright (c) 2002-2007, by ionCube Ltd., and
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies
run /scripts/installzendopt as root to install it then edit /usr/local/Zend/etc/php.ini and set your upload limit, default is 2M restart apache to take effect
 

megadrive

Member
Dec 18, 2005
5
0
151
Hello,
I installed zend optimiser using ur commands restarted apache and then went to the file location of php.ini but there r only half the scripts i can not find the upload file size scripts at all. It starts from this script :

albeit register_globals
; is disabled. PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.

session.bug_compat_42 = 1
session.bug_compat_warn = 1

; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0
 

pross

Well-Known Member
Mar 14, 2005
75
0
156
line 475:
Code:
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
if your using nano or pico CTRL+w is search and CTRL+c shows the current linenumber