We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9102 ☆ A M B ☆
    • 318 Posts
    OK, I deployed 2.2.7 into production.

    It looks like it's working!

    With flock on, I still get caching errors, and I was able after a few tries to reproduce one of the problems I was having (Articles posts not being listed).

    With flock off, everything works fine so far. I've tried clearing the cache several times and then visiting sites and pages in various orders (before it seemed to matter which site was visited first after cache clear). I got one error caching lexicon topics which didn't seem to cause any problems. Other than that, no errors, and I have been unable to reproduce any of the problems I was having previously.

    We'll see how it does on Monday when the load goes back up (we get almost no traffic on weekends). But so far so good.

    Jason, you're a genius. Of course, I already knew that, but it's nice to have it confirmed once again. Thanks!
      • 9102 ☆ A M B ☆
      • 318 Posts
      I have discovered one error that might be a bit tricky to resolve. When running a MODX snippet from a Cron job (which I do a lot), I get this error:

      PHP Fatal error: Call to undefined function gethostname() in /core/xpdo/cache/xpdocachemanager.class.php on line 275

      I don't get that error when running the exact same script from a browser.

      My guess is that Cron is running an older version of PHP (gethostname was added in 5.3), whereas the actual web server is running 5.3.

      That's just silly. I'll talk to Rackspace support and see if there's a way to run a Cron job using PHP 5.3.

      I may be able to get around it, by using the Cron job to request the script via CURL rather than calling it directly. The only drawback there is that I have to host the script inside webroot, whereas before I had it outside webroot because I don't want anybody invoking it other than me. There's probably a way around that too.

      Or maybe I could have the script check if gethostname is defined and define it myself if it isn't.

      Anyway, I'll figure something out. This is a much easier problem to solve than the ones I was having before. [ed. note: esnyder last edited this post 13 years, 8 months ago.]
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: esnyder at Jan 06, 2013, 02:31 AM
        I have discovered one error that might be a bit tricky to resolve. When running a MODX snippet from a Cron job (which I do a lot), I get this error:

        PHP Fatal error: Call to undefined function gethostname() in /core/xpdo/cache/xpdocachemanager.class.php on line 275

        I don't get that error when running the exact same script from a browser.

        My guess is that Cron is running an older version of PHP (gethostname was added in 5.3), whereas the actual web server is running 5.3.
        This is an error on my part since MODX 2.2.x should work on 5.2 (and some versions of 5.1). I'll see if we can tweak that to work on older versions...
          • 42260
          • 4 Posts
          Quote from: opengeek at Jan 06, 2013, 09:47 PM
          Quote from: esnyder at Jan 06, 2013, 02:31 AM
          I have discovered one error that might be a bit tricky to resolve. When running a MODX snippet from a Cron job (which I do a lot), I get this error:

          PHP Fatal error: Call to undefined function gethostname() in /core/xpdo/cache/xpdocachemanager.class.php on line 275

          I don't get that error when running the exact same script from a browser.

          My guess is that Cron is running an older version of PHP (gethostname was added in 5.3), whereas the actual web server is running 5.3.
          This is an error on my part since MODX 2.2.x should work on 5.2 (and some versions of 5.1). I'll see if we can tweak that to work on older versions...


          This is also an error/issue on our part. Our Cron servers have not yet been updated to PHP5.3, they're still running PHP5.2. The web servers were upgraded from 5.2 to 5.3, however, by the time we finished we were heading into our Holiday moratorium and did not have enough time to upgrade the Cron servers to 5.3. They will be upgraded within the next several weeks. As a workaround, you can run the Cron with a curl command rather than running the script directly using PHP.

          I apologize for the inconvenience!


          -Chris
          Rackspace Cloud Sites Support
            • 37261 ☆ A M B ☆
            • 113 Posts
            Quote from: adskiremote at Dec 28, 2012, 01:49 PM
            Thanks pyrographics it worked the second time around. I think it might be because I was already on 2.2.7-dev version.

            I tried the latest 2.2.7 fix on our problem site already on the previous 2.2.7 DEV with the semaphore tweak, it did the same thing with the placeholder data in the config file. I fixed the config file but could never get past the 500 error before the installation. Had to move that site to our other server. Not sure I want to try it on the other sites we've been running, they all are still functioning with the semaphore hack...not sure why this one still had issues.
              • 9102 ☆ A M B ☆
              • 318 Posts
              Quote from: pyrographics at Jan 07, 2013, 09:33 AM

              I tried the latest 2.2.7 fix on our problem site already on the previous 2.2.7 DEV with the semaphore tweak, it did the same thing with the placeholder data in the config file. I fixed the config file but could never get past the 500 error before the installation. Had to move that site to our other server. Not sure I want to try it on the other sites we've been running, they all are still functioning with the semaphore hack...not sure why this one still had issues.

              Did you still have flock turned off in config.inc.php during installation? As noted above, I got a 500 during installation until I removed that line, then it installs fine. You have to remember to put the line back in after install.
                • 9102 ☆ A M B ☆
                • 318 Posts
                This is an error on my part since MODX 2.2.x should work on 5.2 (and some versions of 5.1). I'll see if we can tweak that to work on older versions...

                Our Cron servers have not yet been updated to PHP5.3, they're still running PHP5.2... They will be upgraded within the next several weeks.
                That's great. Like I said, I can work around this for now and it's not that big a deal for me personally, but Jason is right, to merge this fix with the main branch of MODX it has to be 5.2 compatible. I have complete confidence that he'll figure something out.
                  • 37261 ☆ A M B ☆
                  • 113 Posts
                  Quote from: esnyder at Jan 07, 2013, 09:47 AM
                  Did you still have flock turned off in config.inc.php during installation? As noted above, I got a 500 during installation until I removed that line, then it installs fine. You have to remember to put the line back in after install.

                  Flock was turned On in the config for the initial install but I believe I did turn it Off when I went through and fixed all the broken variables caused by the first install failure. This may have caused the subsequent failures.
                    • 9102 ☆ A M B ☆
                    • 318 Posts
                    One more update, sorry for being so verbose but I figure more information is probably better...

                    I'm seeing a problem in production that I think is similar to the one I had with editing resources the first time I installed on my test subdomain. Grids that list objects from add-ons are not listing any data - so for example the grid of redirects for Redirector, my own Webinex addon, and Articles. All of these objects are working fine on the front-end. Articles are listed, as are webinars, and the redirects work fine. However, in the manager the grids are all empty.

                    I'm not having this problem in my test install.

                    I expect that reinstalling will fix this but it raises the question of why the JS is getting messed up on install. Could it have to do with having flock on during the installation? Or is this just a fluke?

                    I don't want to reinstall during the day, as the front end is working fine under normal traffic load. I'll try reinstalling tonight and let you know if that fixes the issue.
                      • 22303 MODX Staff
                      • 10,725 Posts
                      @freejung: Are you installing Standard or Advanced distributions of Revo in this environment? If Advanced, I think you will experience more issues because PHP has to write all the files into place vs. Standard which would rely on upload. However, until I have completed more testing on this environment, it will be hard for me to say. More as soon as possible...