Hello there,
this is the first problem I've come across that I can't seem to find a solution to on google or on the support forum for Clear OS.
I've followed this post - https://www.clearos.com/clearfoundation/social/community/where-do-i-set-the-php-upload_max
I've tried this - https://www.clearos.com/clearfoundation/social/community/configuration-restore-the-uploaded-file-exceeds-the-maximum-allowed-size
I've searched on the command line using this grep command (php -i | grep "Loaded Configuration File" and php -i | grep "php.ini")
I've edited all the php.ini files that I can find to try and change this from 2M to 100M and restarted the server but no change to the upload size for the server?
Is there something I'm missing?
Thanks,
Henry.
this is the first problem I've come across that I can't seem to find a solution to on google or on the support forum for Clear OS.
I've followed this post - https://www.clearos.com/clearfoundation/social/community/where-do-i-set-the-php-upload_max
I've tried this - https://www.clearos.com/clearfoundation/social/community/configuration-restore-the-uploaded-file-exceeds-the-maximum-allowed-size
I've searched on the command line using this grep command (php -i | grep "Loaded Configuration File" and php -i | grep "php.ini")
I've edited all the php.ini files that I can find to try and change this from 2M to 100M and restarted the server but no change to the upload size for the server?
Is there something I'm missing?
Thanks,
Henry.
In Web Server
Share this post:
Accepted Answer
So I believe you want not only to change "upload_max_filesize", but also "post_max_size", the latter exceeding the former in value. See this forum link for hints
It wouldn't hurt to clarify how many files you're allowed to upload under the "max_file_uploads", keeping in mind that the total size in upload no matter the number of files cannot exceed the post_max value. I think the default to max_file is 20 at any rate.
It's not going to hurt to make the changes in the php.ini script in both /etc/ and in /etc/opt/rh/rh-php72/, the former config file being for the default v5.4. Make sure you restart the associated services, at command line
It wouldn't hurt to clarify how many files you're allowed to upload under the "max_file_uploads", keeping in mind that the total size in upload no matter the number of files cannot exceed the post_max value. I think the default to max_file is 20 at any rate.
It's not going to hurt to make the changes in the php.ini script in both /etc/ and in /etc/opt/rh/rh-php72/, the former config file being for the default v5.4. Make sure you restart the associated services, at command line
systemctl restart rh-php72-php-fpm.service httpd.service
Responses (8)
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Thanks ,
sorry for the double comments.
I ran /opt/rh/rh-php72/root/usr/bin/php -v as root and the result is as below -
PHP 7.2.10 (cli) (built: Nov 16 2018 15:24:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.10, Copyright (c) 1999-2018, by Zend Technologies
That solved that little bit of confusion
But what should I do about the php.ini not changing, should I just change it in /etc/opt/rh/rh-php72/php.ini and put the other php.ini files back to 2M or what would you suggest?
Thanks again,
Henry. -
Accepted Answer
I know nothing about PHP, but I think you'll find 5.4 is also in use as it is the default version. At a guess, In Use means it is assigned to a website. If you run "php -v", it runs the version in your path. If you run "/opt/rh/rh-php72/root/usr/bin/php -v" you get a completely different answer. -
Accepted Answer
I noticed something strange that when I did php -v in the command line it returned
php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
When in the clearOS dashboard it states I'm using php7.2
Not sure what to do?
Look at his post -
Accepted Answer
HI Nick,
thanks for the reply
I'm use php 7.2 and have edited that file /etc/opt/rh/rh-php72/php.ini
And just incase I also edited /etc/php.ini
But still nothing works.
I noticed something strange that when I did php -v in the command line it returned
php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
When in the clearOS dashboard it states I'm using php7.2
Not sure what to do? -
Accepted Answer
Thanks Nick for getting back to me,
I'm using php7.2 and I edited /etc/opt/rh/rh-php72/php.ini and restarted server but it didn't work
Another thing I've noticed is that when I run php -v in the command line it returns -
php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
But in the ClearOS control panel I have php 7.2 selected and running.
So I've edited /etc/php.ini aswell restarted and still no change.
I'm not sure what I should do? -
Accepted Answer
There are lots of php.ini's if you have the PHP extensions app installed. You'll find them in
If you are using the default PHP (5.4), you want:/etc/opt/rh/rh-php56/php.ini
/etc/opt/rh/rh-php70/php.ini
/etc/opt/rh/rh-php71/php.ini
/etc/opt/rh/rh-php72/php.ini
It is unlikely that you want the sandboxed php.ini as that is for the webconfig only./etc/php.ini
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »