We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30176
    • 99 Posts
    This is an issue with FastCGI on Plesk panels in IIS and there is a work around. For others with the same issue it might be just that IIS is not set up correctly. Again I want to thank Aaron for sticking with this. He is amazing in his dedication to Modx.

    The defining php.ini when set to FastCGI mode (PHP5) does not define the environment properly. I am on a Windows 2003 server. Because of this I was having issues in Modx with base_path and writing files on the root. Let me also note just for what it is worth that my Wordpress applications seem to work fine without this fix but Modx needed it.

    The defining documents to this issue are:
    http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/
    http://forums.iis.net/t/1157444.aspx
    http://learn.iis.net/page.aspx/745/enable-per-site-php-configuration-on-iis-7-and-iis-60/

    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"

    As my tech pointed out:
    In Windows 2003 server, the path to look for php.ini in FastCGI is hard-coded in the fastcgi.dll, we cannot make any changes in it, so as a workaround, I was forced to edit fastcgi.ini in C:\WINDOWS\system32\inetsrv like this.

    ====
    php:1000=mydomain
    php5:1000=mydomain
    phtml:1000=mydomain
    [mydomain]
    ExePath=C:\Program Files (x86)\parallels\Plesk\Additional\PleskPHP5\php-cgi.exe
    EnvironmentVars=PHPRC:D:\inetpub\vhosts\mydomain.com\httpdocs\
    ====

    where 1000 is the domain ID in IIS

    The original default values were:
    ====
    php:1000=Plesk_php5
    php5: 1000=Plesk_php5
    phtml: 1000=Plesk_php5
    [Plesk_php5]
    ExePath=C:\Program Files (x86)\parallels\Plesk\Additional\PleskPHP5\php-cgi.exe
      "Remember what Bilbo used to say: It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to."
      -J.R.R. Tolkien from The Lord of the Rings