• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How do I setup PHP Enviroment variables correcly

K

Kalyse

Guest
Hello,

I am trying to set up PHP so that the enviroment variables actually work.

I have been changign quite a lot of the default settings in the PHP.ini because quite frankly they were awful as default.

Anyway, I am trying to setup DOCUMENT_ROOT for each of my virtual hosts automatically although as a first time server admin using Plesk I am unsure.

I would know easily of how to make the changes manually although automatically I am unsure.

I could do it with http.conf but that wouldnt be automatic would it for each virtual host that Plesk sets up.

Can anyone provide any information.

Are there lots of other settings that need updating in the PHP.ini on a new install using Plesk.

Thanks
 
Hello, Kalyse

If you use the php in cgi mode, you can use an individual php.ini for each domain.
You would just need to put the php.ini in the folder where the scripts are located.

Or, else, you can change any parameters in the scripts directly.

Please, note that Plesk manages Miscrosoft IIS. The httpd.conf you found in the Plesk folder is used for the Plesk Control Panel. You shouldn`t edit it, this can break the Panel.

As for the specific parameters that need to be changed, this will depend on what functionality you need. To make these decisions you need to know what your scripts (contact developers) need and which parameters to use (see php.net).
 
Back
Top