wp-cloud-deploy
wp-cloud-deploy copied to clipboard
V5 OLS | PHP Overrides for Error Log & Open Base Dir
Hi,
Thank you for OLS beta. Appreciate all the effort and something I was looking forward to for a long time
However, in its current form, I find the utility of this much-awaited release rather limiting.
Edit 17 October 2022:
Specifically, the three listed PHP Overrides are restrictive:
- php_admin_value open_basedir "/var/www/ols.testdomain.com/html:/tmp/"
- php_admin_flag log_errors On
- php_admin_value error_log logs/php_error_log
I cannot fully use popular monitoring plugins because they cannot read the PHP log file defined by WPCD. Although there are likely to be more incompatible plugins, the ones I have tried unsuccessfully include:
- Erro Log Viewer (https://wordpress.org/plugins/error-log-viewer/)
- Error Log Mointor (https://wordpress.org/plugins/error-log-monitor/)
- BulletProof Security (https://wordpress.org/plugins/bulletproof-security/)
- Database Cleaner & Optimizer- PHP Error Log Feature (https://wordpress.org/plugins/database-cleaner/)
Moreover, the use of php_admin_value does not allow admins to override the configuration using a custom php.ini file.
This approach is somewhat surprising because WPCD's earlier webserver (NGINX) allowed admins to set their own location for error logs.
Here's a snippet (taken from the OLS manager) of what PHP overrides section for a Virtual Host limits:
### Insert common phpIni
**php_admin_flag log_errors On**
**php_admin_value error_log logs/php_error_log**
**php_admin_value open_basedir "/var/www/sub.domain.com/html:/tmp/"**
php_admin_value disable_functions "dl, exec, fpassthru, getmypid, getmyuid, highlight_file, link, opcache_get_configuration, passthru, pcntl_exec, pcntl_get_last_error, pcntl_setpriority, pcntl_strerror, pcntl_wifcontinued, phpinfo, popen, posix_ctermid, posix_getcwd, posix_getegid, posix_geteuid, posix_getgid, posix_getgrgid, posix_getgrnam, posix_getgroups, posix_getlogin, posix_getpgid, posix_getpgrp, posix_getpid, posix_getppid, posix_getpwnam, posix_getpwuid, posix_getrlimit, posix_getsid, posix_getuid, posix_isatty, posix_kill, posix_mkfifo, posix_setegid, posix_seteuid, posix_setgid, posix_setpgid, posix_setsid, posix_setuid, posix_times, posix_ttyname, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, show_source, source, system, virtual"
php_admin_flag allow_url_fopen Off
php_admin_value session.use_strict_mode 1
php_admin_value session.cookie_httponly 1
php_admin_value session.use_cookies 1
php_admin_value session.use_only_cookies 1
php_admin_value session.use_trans_sid 0
php_admin_value memory_limit 128M
php_admin_value post_max_size 25M
php_admin_value upload_max_filesize 25M
php_admin_value max_execution_time 7200
Of course, this can be modified manually by accessing OLS manager for a site and then removing the unwanted lines. Doing so for a number of sites and everytime a new site is deployed just calls for unnecessary administrative overhead.
While the rest of the configuration is just fine, my specific request is to consider dropping /commenting out the line items of php_admin_flag log_errors On, php_admin_value error_log logs/php_error_log, and php_admin_value open_basedir "/var/www/ols.testdomain.com/html:/tmp/" from the above section, This should allow admins the flexibility to use plugins of choice and / or define their own PHP ini values.
Once again, thank you for all the amazing work and just this minor modification would make it a lot easier to transition to OLS.
TIA
Kind regards,