• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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