Please contact us if you would like to help out.
Status as of 2019-04-24: Added PHP 7.2 support: http://koji.clearos.com/koji/packageinfo?packageID=332
Status as of 2018-02-28: Officially announced: https://www.clearcenter.com/blogs/timeline/php-engines-app-now-live-in-the-clearos-marketplace
Status as of 2018-02-10: Now with PHP 7.1 and improvements to Command Line handling
Status as of 2017-11-24: The app is complete. Next step is to ask ClearOS community to test extensively.
yum install app-php-engines
And you will get:
Features
- Permits to pick PHP version for various websites, including in the command line version.
How to override settings
We plan add a way to override settings via the GUI but for now, you need to edit some configuration files.
.user.ini
Create a .user.ini and put where in the directory where your Tiki is
memory_limit = 256M upload_max_filesize = 64M zlib.output_compression = 1
display_errors = On
If the values don't pick up, you can try rebooting your server or trying in php.ini instead (below)
memory_limit and max_execution_time can also be overridden in Tiki via tiki-admin.php?page=performance -> Time and Memory Limits
https://blog.ss88.uk/fast-cgi-and-user-ini-files-the-new-htaccess
php.ini
For some php.ini variables (ex.: post_max_size), you cannot override these settings in .user.ini, so these must be set in the PHP Engine's php.ini files
- /etc/opt/rh/rh-php56/php.ini
- /etc/opt/rh/rh-php70/php.ini
- /etc/opt/rh/rh-php71/php.ini
If the values don't pick up, just reboot your server.
OPcache
OPcache is activated by default. So How to deactivate OPcache on ClearOS
Settings change be changed here:
- /etc/opt/rh/rh-php56/php.d/10-opcache.ini
- /etc/opt/rh/rh-php70/php.d/10-opcache.ini
- /etc/opt/rh/rh-php71/php.d/10-opcache.ini
If the values don't pick up, just reboot your server.
Apache Proxy
See also: https://doc.tiki.org/How-to-install-Tiki-Manager-on-ClearOS#Timeouts_during_long_running_operations
Using the right version of PHP from the command line interface
Since each directory can have a different version of PHP, it uses the one from the current working directory.
* * * * * cd /var/www/virtual/test.example.org/html/ && php test.php >> /tmp/test.log
To manually set the PHP version to be used. Ex.: for CLI use outside the web directory
Create a .phpenv file with the desired PHP version, as follows:
71
70
56
Limitations
-
In some cases, PHP 5.4 is still used for the command line interface. Solution has been proposed.Solved