• 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

cgi_wrapper: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory

SwanseaK

New Pleskian
On my CentOS server using Plesk, I have lots of below warnings in /var/log/messages file.

Code:
Aug 27 10:35:58 example cgi_wrapper[31986]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:36:35 example cgi_wrapper[32122]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:37:13 example cgi_wrapper[32250]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:37:46 example cgi_wrapper[32370]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:38:23 example cgi_wrapper[32549]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:39:00 example cgi_wrapper[32678]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:39:37 example cgi_wrapper[1120]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:40:15 example cgi_wrapper[1247]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:40:51 example cgi_wrapper[1373]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:41:25 example cgi_wrapper[1556]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:42:02 example cgi_wrapper[1678]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:42:46 example cgi_wrapper[1862]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:43:27 example cgi_wrapper[1983]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:44:01 example cgi_wrapper[3187]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:44:38 example cgi_wrapper[3323]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:45:17 example cgi_wrapper[3501]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:45:51 example cgi_wrapper[3628]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:46:28 example cgi_wrapper[3751]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:47:07 example cgi_wrapper[3941]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:47:42 example cgi_wrapper[4064]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory
Aug 27 10:48:16 example cgi_wrapper[5215]: /var/www/vhosts/system/example.com/etc/php.ini:No such file or directory

In /var/www/vhosts/<domain-name>/conf/ folder, I have these files:
Code:
13060867460.23093000_httpd.include
14081092100.11795700_httpd.conf
13060872010.97979800_httpd.include
14081092100.11795700_httpd_ip_default.conf
13288662630.62587100_httpd.include
14081224460.28481000_nginx.conf
13288957510.44987400_httpd.include
14083989450.39070500_nginx.conf
14050226970.59336600_httpd.include
14091924130.17335900_httpd.conf
14066584730.98409200_httpd.include
14091924130.17335900_httpd_ip_default.conf
14066720120.65014200_httpd.conf
last_httpd.conf
14066720120.65014200_httpd_ip_default.conf
last_httpd_ip_default.conf
14066800870.82161800_httpd.conf
last_nginx.conf
14066800870.82161800_httpd_ip_default.conf
stat_ttl.conf
14066800880.40754800_nginx.conf
vhost_nginx.conf
14081092090.57817500_nginx.conf

In 4 *_httpd_ip_default.conf files and they have PP_CUSTOM_PHP_INI which point to /var/www/vhosts/system/example.com/etc/php.ini

Code:
SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/example.com/etc/php.ini
SetEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi

<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/example.com/etc/php.ini
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
FcgidMaxRequestLen 134217728

</IfModule>

How can I fix these warnings if possible?

Thanks
 
Have you tried

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

?
 
Have you tried

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

?

Thanks for the reply.

I run the command but still getting the warnings.

I am not using any custom php.ini. May I ask why this directive is added in *_httpd_ip_default.conf files? Is this default behavior? If so there must be a php.ini in etc folder. What can be reason of missing file? Having placing an empty php.ini in the folder is required or not?

Thanks
 
Yes it's default behaviour, so each domain can have custom PHP settings.

Did you try and edit the domains PHP...

Code:
Plesk -> Domains -> Domain.tld -> Website & Domains -> PHP Settings

Try and add a custom memory limit or something and it may create the file.

Hope it helps

Kind regards

Lloyd
 
Thanks for your help Llyod. Your suggestion solved the error but now I see that this custom php.ini is loaded into system and consuming resources unnecessarily. I am using the system's php.ini and do not need to use custom php.ini because I am only serving one site. What should I do to disable php.ini into consuming resources?
 
Yep, I have the same issue with Obsidian still. I also tried "touch" those files, but that backfired -- I ended up with worse problems..
 
Back
Top