ERROR: the chdir path does not exist or not a directory

A Hartonian

Active Member
May 22, 2018
44
10
8
Oman
cPanel Access Level
DataCenter Provider
Hello,

So today we cleaned up the second disk on the server /home1/ and moved all users to /home/ and then removed the hard disk that was mounted on /home1/
After the disk was removed, PHP FPM went down.

So I restarted the FPM via SSH by the following command:
Code:
/scripts/restartsrv_apache_php_fpm
Then watched the log from:
Code:
/opt/cpanel/ea-phpXX/root/usr/var/log/php-fpm/error.log
The following error is recorded multiple times:
Code:
[10-Dec-2019 23:50:32] ERROR: [pool post_userxxxdomain_tld] the chdir path '/home1/userxxx/' does not exist or is not a directory
[10-Dec-2019 23:50:34] ERROR: FPM initialization failed
Please note that user userxxx is safely moved to /home/ and it is accessible.

Upon restarting PHP_FPM, I am getting the following errors via WHM interface:
Code:
(XID ykzr3s) The “apache_php_fpm” service failed to restart because the restart script exited with an error
Your advice is much appreciated.

Thank you.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,

What process did you use to move the user accounts? When using rearrange accounts this should automatically modify the chdir to the correct path. Otherwise you need to modify it manually at /opt/cpanel/ea-phpXX/root/etc/php-fpm.d/domain.tld.conf
 

A Hartonian

Active Member
May 22, 2018
44
10
8
Oman
cPanel Access Level
DataCenter Provider
Basically, there were users that was using EA-PHP
So I switched them all to ALT-PHP and FPM started working.

Switching back from ALT-PHP to EA-PHP after fix did not cause any issue. I guess the /home1/ had to be corrected by the switch between EA and ALT
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
I'd assume that this is occurring because of the split of using alt-php and ea-php - if you run into any further issue with this I'd suggest opening a ticket with us so that we can look into it further.
 

A Hartonian

Active Member
May 22, 2018
44
10
8
Oman
cPanel Access Level
DataCenter Provider
I'd assume that this is occurring because of the split of using alt-php and ea-php - if you run into any further issue with this I'd suggest opening a ticket with us so that we can look into it further.
Looks good for now.

Is there a way to automatically convert all users that are using EA version to ALT version?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
I don't believe so, I know that when you set all users to inherit in the MultiPHP manager but changing their specific PHP version in alt-php would be something that's manually done.
CloudLinux gives some helpful commands for setting this for all users in the following: PHP Selector useful commands