Does cloudlinux set any environment variables?
  1. Forums
  2. General
  3. General Discussion
  1. Oliver Piotrowski
  2. Saturday, 12 October 2019
  3.  Subscribe via email

I would like to dynamically set php error log locations to store errors in a per-user location that's centralised (rather then relative to the script.

According to the php config file docs you can refer to environment variables in the ini files using the format ${ENVIRONMENT_VARIABLE}, and I was hoping to store the following in the global altphp ini so that it occurs for all users on the server by defaut.

Something like

error_log = "${PATHTOUSERHOME}/php_errors/${ALTPHPVERSION}_error.log"


error_log = "/var/log/php/${USER}_${ALTPHPVERSION}_error.log"

Does anyone know if there are some environment variables set inside cloudlinux that I can use to achieve this? I'm running on a directadmin server with apache and the default php running under lsphp. All users are caged in cagefs.
Rate this post:
  1. 16.10.2019 08:10:53
  2. # 1
Sergey Khristich Accepted Answer
Posts: 111
Joined: 20.05.2019
Hello Oliver! Thank you for reaching out! We checked this should work. Try again or сan you open a support ticket so we can take a closer look at your system? You can post the ticket number here and we'll link this thread to it. Thank you.
Marketing Manager
  1. 16.10.2019 14:10:54
  2. # 2
Oliver Piotrowski Accepted Answer
Posts: 1
Joined: 11.10.2019
What should work?

I want to know if cloud linux sets any environment variables within the cages that I could use to personalise the php.ini error location on a global basis.

If it does, I'd like to know what those variables are called so I can use them.
  1. 16.10.2019 14:10:03
  2. # 3
Sergey Khristich Accepted Answer
Posts: 111
Joined: 20.05.2019
Hello Oliver! We did not add special environment variables for such purposes. But logically, if the PHP documentation says that its version should work, then this should work for us. Please let us know if you have any questions. Thanks in advance!
Marketing Manager
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.