• 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

Resolved connect() to unix:/var/www/vhosts/system/[domain]/php-fpm.sock failed (2: No such file or directory) while connecting to upstream

riccardo.roscilli

New Pleskian
Hello,
I have to use php 5.2 for an old app. I installed it on plesk and configured the domain to run php 5.2 as fastcgi
When I try to browse the website I got

Bad Gateway​

and in the log I found the message in the object
In the dir
/var/www/vhosts/system/[domain]/
there's no php sock
Bye
Riccardo
 
Hi @riccardo.roscilli , thank you for posting. Could you please add what your operating system and Plesk version are? Was PHP 5.2 installed from the Plesk upgrades/updates page or was it registered as a handler manually?
 
Sounds like the php-fpm.sock was never created which should had been created on startup. Maybe try changing the serving type from Nginix to Apache?
 
Did you choose to run PHP as FastCGI application served by Apache with proxy unchecked?
 
with proxy unchecked it will run with nginx, with proxy checked it download the php files
this is the php configuration

1673264983604.png
and this is the nginx setting

1673265032539.png
 
I can't seem to replicate it in a test I have setup, here's what I have set:

1673272471342.png
raw

raw


I would recommend double checking the settings and reboot the server if you have not already done so.
 
Eh, weird. Check if you have a .htaccess file in the root directory (if you're using the default settings it should be in your home directory of the files > test.jackrusselltabarrino.com) and make sure you have mod_fcgid installed located under Web hosting > Apache (so basically go to Tools & Settings > Plesk > Updates > Add/Remove Components, then navigate to Web hosting > Apache and make sure mod_fcgid is installed. If it is, uninstall it and reinstall it)
 
Do you have short open tags in your script? Have you checked the option "short open tags" (=on) in your PHP settings? Else scripts with that lead-in won't be execute, but the code will be downloaded or displayed.
 
OK, first of all, thank you very much for your support, I really appreaciate it.
I don't know what's going on under the hood, by the way after I went out to rest a couple of hours, I came back and the test site was displaying correctly the phpinfo 5.3
After that I got encouraged and infact the real site I have to migrate was showing some php errors but only with php 5.6 (deprecated mysql functions, you know). Than after your very last message, I changed again to php 5.3, set up magic_quotes_gpc and short tags on, apply and... boom! the site loaded.
A lot of errors on css loading but I know they will go away once pointed the domain and installed the ssl certificate.
Thank you again for your invaluable support.
Bye
Riccardo
 
Back
Top