Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5 OLS | PHP Overrides for Error Log & Open Base Dir #71

Open
unakriti opened this issue Oct 15, 2022 · 0 comments
Open

V5 OLS | PHP Overrides for Error Log & Open Base Dir #71

unakriti opened this issue Oct 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@unakriti
Copy link

unakriti commented Oct 15, 2022

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:

  1. php_admin_value open_basedir "/var/www/ols.testdomain.com/html:/tmp/"
  2. php_admin_flag log_errors On
  3. 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:

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,

@elindydotcom elindydotcom added the enhancement New feature or request label Oct 15, 2022
@unakriti unakriti changed the title V5 OLS | PHP Overrides for Error Log Location V5 OLS | PHP Overrides for Error Log & Open Base Dir Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants