Nexology Community
 
     
 
   

Go Back   Nexology Community > Support Zone > General Support

Reply
 
LinkBack Thread Tools Display Modes
Old 03-08-2010, 05:48 PM   #1
Registered User
 
Join Date: Jun 2009
Location: WI
Posts: 52
FastCGI not working at the Root on Plesk Panel

Thought I would start a second thread as this is a bit different issue and to alert others.
I am finding that FastCGI does not work properly at the Root with the Default setup on Plesk here at HN.

I am finding the issues as reported here: PHP/FastCGI unable to write to domain directory. - Parallels Forums
"We're running into a permissions issue, however - PHP has the ability to overwrite existing files, but not create new files." This is the same issues that I am finding. Breaking a number of pages that need to be able to create a file on the Session root. It will create files in sub directories fine but at the root will not. In my setup, this is needed in the Modx CMS.

There are also a number of side issues, but the above is the main one.

In my case
1. The installation will run in a Subdirectory fine in CGI or FastCGI
2. The installation will run at the Root in CGI but not FastCGI


Why do I want to use FastCGI? I could run in CGI which runs the site without breaking but with a significant performance drop.
Here are a number of pages tested at Free web site speed test - website speed analysis. You can do similar tests for yourself on your own pages. My Site is on PION using PHP 5.2.6 and MySQL. Using pages that do not break.

Setup to run as CGI this is my result:

Domain name Size Load Time
1 www.mydomain.com/index.php?id=24 11.72 KB 5.51 seconds
2 www.mydomain.com/index.php?id=22 11.38 KB 5.34 seconds
3 www.mydomain.com/index.php?id=49 10.14 KB 0.53 seconds
4 www.mydomain.com/index.php?id=15 10.45 KB 5.47 seconds
5 www.mydomain.com/index.php?id=16 10.69 KB 5.42 seconds
6 www.mydomain.com/index.php?id=14 10.71 KB 5.53 seconds
7 www.mydomain.com/index.php?id=48 10.46 KB 5.48 seconds
8 www.mydomain.com/index.php?id=33 11.3 KB 5.58 seconds
9 www.mydomain.com/index.php?id=32 10.28 KB 5.45 seconds
10 www.mydomain.com/index.php?id=6 11.16 KB 5.46 seconds
49.77 seconds total


Same pages changing to FastCGI

Domain name Size Load Time
1 www.mydomain.com/index.php?id=24 11.72 KB 0.58 seconds
2 www.mydomain.com/index.php?id=22 11.38 KB 0.41 seconds
3 www.mydomain.com/index.php?id=49 10.14 KB 0.44 seconds
4 www.mydomain.com/index.php?id=15 10.46 KB 0.6 seconds
5 www.mydomain.com/index.php?id=16 10.7 KB 0.37 seconds
6 www.mydomain.com/index.php?id=14 10.72 KB 0.37 seconds
7 www.mydomain.com/index.php?id=48 10.46 KB 0.38 seconds
8 www.mydomain.com/index.php?id=33 11.31 KB 0.38 seconds
9 www.mydomain.com/index.php?id=32 10.28 KB 0.37 seconds
10 www.mydomain.com/index.php?id=6 11.16 KB 0.38 seconds
4.28 Seconds total


As you can see, less than 1/10 the time with FastCGI. FastCGI working helps HN as the load on the data servers goes way down and the websites as they say 5 to 8 second page loads you start to lose people on the site.
tmcleroy is offline   Reply With Quote
Old 03-09-2010, 04:06 AM   #2
HN Top Canine
 
NexDog's Avatar
 
Join Date: Jan 2002
Location: The Nexus
Posts: 13,328
Wow, that is a huge difference. Wish Plesk would fix that bug.
__________________
Laurence - [HostNexus Administrator]

- Need Support? Quickest reponses are found at the Support Helpdesk!
- Stay in touch! Make sure you are subscribed to our Lists.
NexDog is offline   Reply With Quote
Old 03-09-2010, 07:59 PM   #3
Moderator
 
MikeMann's Avatar
 
Join Date: Jun 2002
Location: Los Angeles CA
Posts: 7,528
I found about the same here for my one site that I operate. I am working to switch my sites over to using FastCGI.
__________________
Michael Mann

Michael Mann Desktop Publishing
Me On the Net: Facebook | Twitter | Squidoo | Yahoo! Contributor Network

Ubuntu Linux User since 08.04 (April 2008 release)

Virus? Computer slow? In LA? Downtown LA PC Techs can help.
MikeMann is offline   Reply With Quote
Old 03-15-2010, 12:00 PM   #4
Registered User
 
Join Date: Jun 2009
Location: WI
Posts: 52
I think there is also a bug in CGI as you will see a page load about 90% and then it waits for @5 seconds to finish the load.

I think the issue with FastCGI is setting up permissions right. I had support give IUSR modify on the root but that did not help, however, I queried a friend who does hosting and came away with this response:

My question: if this installation in the root works in CGI but not FastCGI, do you look at that as still being a modify IUSR situation?

Response: I think I explained this to you before when you run your site as php-cgi.exe
the exe launches as your website user and has the full access wheres fastcgi launches as a system (server account)
tmcleroy is offline   Reply With Quote
Old 03-19-2010, 01:53 PM   #5
Registered User
 
Join Date: Jun 2009
Location: WI
Posts: 52
Good News, Akash fixed the bug! I have to HIGHLY commend Akash at support for not letting this die!! This is an issue with FastCGI on Plesk panels and there is a work around. The defining php.ini when set to FastCGI mode (PHP5) does not define the environment properly. The issue I faced stemmed from as Akash wrote, "In Windows 2003 servers, the path to look for php.ini in FastCGI is hardcoded in the fastcgi.dll, we cannot make any changes in it, so as a workaround, I needed to edit fastcgi.ini in C:\windows\system32.inetsrv.

The defining documents to this issue are:
Using FastCGI to Host PHP Applications on IIS 6.0 : Host Applications on the Microsoft Web Platform : Running PHP Applications on IIS : The Official Microsoft IIS Site
PHPRC and php.ini : The Official Microsoft IIS Site
Enable Per-Site PHP Configuration on IIS 7 and IIS 6.0 : Configure and Optimize the Microsoft Web Platform for PHP Applications : Running PHP Applications on IIS : The Official Microsoft IIS Site

Even though on Plesk it was set to FastCGI mode, in my PHPinfo file I saw that the defining php.ini had the setting "fastcgi.impersonate = 0" The above articles point to the importance of "fastcgi.impersonate = 1"
tmcleroy is offline   Reply With Quote
Old 03-19-2010, 11:35 PM   #6
HN Top Canine
 
NexDog's Avatar
 
Join Date: Jan 2002
Location: The Nexus
Posts: 13,328
Yah, incredibly complex issue and hats off to Akash for nailing it.
__________________
Laurence - [HostNexus Administrator]

- Need Support? Quickest reponses are found at the Support Helpdesk!
- Stay in touch! Make sure you are subscribed to our Lists.
NexDog is offline   Reply With Quote
Reply

Tags
fastcgi, hostnexus, modx, plesk, root


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:29 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 RC1
Copyright ©2001 - 2009, HostNexus