• 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

FastCGI problems after upgrade

KimV

New Pleskian
First I upgraded Plesk Panel to the version 11.0.9 Update #31.
Then I upgraded PHP to 5.3.19 and installed mcrypt.
After the last 2 steps I noticed that I had problems to login to websites. (expired sessions)
So I changed the session path of php to /tmp with the permission 777. (if there's a more secure option, please let me know)

But I noticed in the log the flollowing error.
Dec 17 18:19:23 vps1892 cgi_wrapper[9712]: /var/www/vhosts/mywebsite.com/etc/php.ini:No such file or directory Dec 17 18:19:48 vps1892 cgi_wrapper[9714]: /var/www/vhosts/mywebsite.com/etc/php.ini:No such file or directory Dec 17 18:19:52 vps1892 cgi_wrapper[9717]: /var/www/vhosts/mywebsite.com/etc/php.ini:No such file or directory Dec 17 18:19:52 vps1892 cgi_wrapper[9718]: /var/www/vhosts/mywebsite.com/etc/php.ini:No such file or directory Dec 17 18:20:50 vps1892 cgi_wrapper[9782]: /var/www/vhosts/mywebsite.com/etc/php.ini:No such file or directory

Looks like FastCGI is looking for the php.ini file in the wrong place?
How can I correct this?
 
Try to set FastCGI mode for domain manually with help of command:

# /usr/local/psa/bin/domain -u domain.com -php_handler_type fastcgi -fastcgi true

and check result.
 
Try to set FastCGI mode for domain manually with help of command:

# /usr/local/psa/bin/domain -u domain.com -php_handler_type fastcgi -fastcgi true

and check result.

As you can see the FastCGI is enabled in Plesk:


What I need to mention is that I upgraded to Plesk Business model and maybe this can also be the cause?
 
Tried the command line and it didn't help.
Still I see the error in the logfile that it cannot find the php.ini file in the folder /var/www/vhosts/mywebsite.com/etc/
Why is it only for this domain? I didn't set it to use an individual php.ini file. Where can I check this setting?
 
Try to set FastCGI mode for domain manually with help of command:

# /usr/local/psa/bin/domain -u domain.com -php_handler_type fastcgi -fastcgi true

and check result.

I've found the problem... Disabled "FastCGI support (required for Ruby on Rails)" where I was looking on the wrong domain.
Now the error disappeared... but I will check the misconfig of it :)

But I still ask myself if it is save to point sessions to the folder /tmp and set 777 as permission.
Is there a better solution to it?
 
On my default test Plesk server installation I see :

~# stat /tmp
File: `/tmp'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: c2h/194d Inode: 15080816 Links: 2
Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
 
Back
Top