We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30176
    • 99 Posts
    Hi, I would like to run FastCGI for the server benefits. I am on IIS 6 and Evo 1.02 testing with the Default website install.

    When I run PHP support as either ISAPI or CGI all is fine. However, when I run as FastCGI I throw the following error when looking at the Blog or MiniBlog pages (Documents #2 or 9)
    Any thoughts? Thank you.

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: require_once(manager/includes/sniff/phpSniff.core.php) [function.require-once]: failed to open stream: No such file or directory
    Error type/ Nr.: Warning - 2
    File: D:\inetpub\vhosts\mydomain.com\httpdocs\manager\includes\sniff\phpSniff.class.php
    Line: 22
    Line 22 source: require_once($modx->config[’base_path’] . ’manager/includes/sniff/phpSniff.core.php’);

    Parser timing
    MySQL: 0.1320 s (21 Requests)
    PHP: 6.7835 s
    Total: 6.9155 s


      "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
      • 30176
      • 99 Posts
      Hi Ryan, I see that you put this over on the Windows hosting issues, but I think that this might be more of a coding issue than an IIS issue as it is present with FastCGI rather than CGI.

      I would like to run CGI/FastCGI for the security that it offers. And I would like to run FastCGI as I think it will deliver sites much faster and more efficiently, especially for a CMS like Modx.

      But FastCGI is not dependent on IIS as it can be run on Apache too. These two articles have some excellent points:
      http://www.fastcgi.com/drupal/
      http://phplens.com/phpeverywhere/fastcgi-php

        "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
        • 3749
        • 24,544 Posts
        It looks like that file is missing from your manager/includes/sniff directory (check to make sure). I have it in my Evo install. You may have a bad download or an error in FTPing the files to the server (or extracting them).

        Both phpSniff.class.php and phpSniff.core.php should be there in manager/includes/sniff.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 30176
          • 99 Posts
          Thanks Bob, you are up late if you are in the states.
          I did check and the file is there even though it says it is not. I did put in several Evo installations to check against each other.

          This has bugged me and so I continued checking. I saw another post and it got me thinking to check the Ditto in the default installation. If I take out the &tpl=`ditto_blog` of the Ditto on the Blog link php?id=2 the error is gone.

          I changed the code from
          [[Ditto? &parents=`2` &display=`2` &removeChunk=`Comments` &tpl=`ditto_blog` &paginate=`1` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`1` &tagData=`documentTags`]]


          to

          [[Ditto? &parents=`2` &display=`2` &removeChunk=`Comments` &paginate=`1` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`1` &tagData=`documentTags`]]


          So it might be something with that template and FastCGI. As I said, I did not get the errors with CGI.

          Also, there is something in the {{Comments}} that FastCGI did not like (on my server)too.

          And so I have come to a conclusion that either there is something wrong with a FastCGI setting on my server (as CGI did work) or something with FastCGI and that particular code in the Ditto.

          Thanks
            "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
            • 33337
            • 3,975 Posts
            There are Jot snippet calls in ditto_blog and comments chunks, try removing them and see if it renders fine.

            If that works, then we can probably investigate issue inside Jot.

            Lets see. smiley
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 30176
              • 99 Posts
              For others information my problems were more deeply rooted then the title suggests. But what I found I think is important to relay on to others on an IIS install.

              I was throwing problems that were not apparent where they were coming from and more importantly they were not consistent. Things seemed to work, then would stop and then work again. So even if you set up and everything starts out working fine in my case it did not mean that all was well.

              In a nutshell Session_Save was not writing properly to the Temp directory. My host was not giving modify access to the Temp directory. In this case C:\WINDOWS\Temp\

              Anyway here is what I found and based on two posts I realized what was happening:

              1. Thanks to the poster at http://php.net/manual/en/function.session-start.php

              A note on Windows installations with an NTFS file structure:

              Make sure you give your Internet user account (usually IUSR_MACHINENAME) "Modify" access to the session.save_path directory. Otherwise session_start() will silently - and oh, so slowly - fail.

              ("Modify" is a Win2k term, but the concept translates to older IIS installs).


              This was what was happening to me as I would fail slowly so it was hard to see consistency in the errors.

              2. And then Jason’ and Susan’s comments on Session_Save at:

              http://modxcms.com/forums/index.php/topic,4758.msg34281.html#msg34281

              Once again, you need to set the session save_path variable to a proper location in the startCMSSession() function in your manager/config.inc.php file...add one line before the session_start() call
              session_save_path('path/to/writable/directory');


              For me, I did not get the instant error so initially I overlooked this.

              My host was reluctant to give modify access to the C:\WINDOWS\Temp\ so I did as Susan said and put the session_save folder above the public_html. And then I added the Session_Save_path line of code to manager/config.inc.php one line before the session_start()call.

              In my case:

              session_save_path('D:/inetpub/vhosts/mydomain.com/TEMP');
              session_start();


              Where:
              /inetpub/vhosts/mydomain.com/httpdocs is the public root.




                "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