We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26903
    • 1,336 Posts
    Hi, you’ve found a little bug!. The _evolutionGatewayExists function has a $status parameter which I don’t pass on its call, hence the warning, but its only a warning and won’t stop Provisioner working.

    OK, check the contents of the file you are using for your tempfile, it should start with a comment saying something like .... generated by CURL, edit at your peril’ and should contain URL’s and session id’s etc.

    If this looks OK and your getting no other feedback on login it may be the password issue I’ve corrected but not released yet, if the password for your remote site contains non-alpha characters e.g. !?* then it won’t work, to correct this either change the password to use only alphanumeric characters or grab the latest version of provisioner.class.php from GitHub.

    Other than that have a look at your access logs, you should see Provisioner accessing its connectors and the CURL request going out to your remote site, also check the access logs on your remote site you should see access from your revo site.
      Use MODx, or the cat gets it!
      • 21841
      • 36 Posts
      Back again and ready to go ...

      Still no luck I’m afraid. Its still saying that the revo gateway is not installed on the evo site, but if I take the generated url and stick it into the browser it seems to find it OK.

      Strange thing is when I look at the CURL temporary file it is completely empty - nothing in it - zilch, nada, you get the picture.

      The file has set up OK in the specified directory with RW permissions to the owner WWW only.

      Any ideas of where to look next ?

      Many thanks for your time.

      NWJ
        • 21841
        • 36 Posts
        OK, done a bit more digging. wink

        The problem is that revogateway relies on the json_encode function that does not exist on the server running my evo sites (PHP 5.1.6) it did not come in until 5.2.

        This means that when you access the index.php to check the the revo gateway has been installed a null result is reurned and the whole thing goes t*ts up. shocked

        I have found an alternative PHP function here
        www.mike-griffiths.co.uk/php-json_encode-alternative/
        but I have not managed to make it work.

        I’ll keep onto it.

        NWJ
          • 26903
          • 1,336 Posts
          Ah yes, I’ll file an issue for this in github. I should really test for the existence of this function, if not found use one from the gateway zip. Revo has an encoder/decoder, get the file /core/xpdo/json/json.php and copy it into your ’common’ directory in your revogateway, then just instantiate the class and use this everywhere you need a json_ function, bit hacky bu should work until I get a fix out.
            Use MODx, or the cat gets it!
            • 1841
            • 141 Posts
            Hi There,
            I have an evo 1.04 site that I am trying to eventually transfer to revolution. I have setup a revolution install on another domain and have tried using this tool to transfer the resources but I just get blank lists. I have installed the snippet folder on the evo site, used the right login details, no errors appear but I just get blank lists, any ideas anyone?
              • 26903
              • 1,336 Posts
              Does the password of your remote evo site contain non alpha-numerics such as ’#?’ etc. If so see above in this thread, this is fixed but not in the latest release.
                Use MODx, or the cat gets it!
                • 1841
                • 141 Posts
                Hi,
                No the password doesn’t contain any nonstandards, just letters and numbers. I have checked the revo error log and can see similair errors to those mentioned aboce:

                [2010-09-07 13:25:38] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                [2010-09-07 13:25:38] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 837) PHP warning: Invalid argument supplied for foreach()



                Problem is I don’t know how to "hack" the provisioner.class.php file.

                Any ideas?
                  • 26903
                  • 1,336 Posts
                  OK, go into the system settings and pull up all the settings in the provisioner namespace, clear the fields and set the status fields value to 2, this will force log you out. Then go into provisioner and try a login, you should get something back if it fails, also check your logs when you do this.


                    Use MODx, or the cat gets it!
                    • 1841
                    • 141 Posts
                    That didn’t work, still don’t get any files showing up, the error logs show:
                    2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 672) PHP warning: Invalid argument supplied for foreach()
                    [2010-09-07 15:34:31] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/model/modx/modconnectorresponse.class.php : 126) Recoverable error: Argument 1 passed to modConnectorResponse::outputArray() must be an array, string given, called in /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php on line 680 and defined
                    [2010-09-07 15:34:32] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:32] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:40] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:40] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:40] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 223) PHP warning: tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:40] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 228) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:40] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 229) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:40] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 2028) PHP warning: Missing argument 1 for Provisioner::_evolutionGatewayExists(), called in /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php on line 234 and defined
                    [2010-09-07 15:34:41] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:41] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:42] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:42] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:42] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 464) PHP warning: Invalid argument supplied for foreach()
                    [2010-09-07 15:34:45] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:45] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:34:45] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 400) PHP warning: unlink() [<a href='function.unlink'>function.unlink</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:02] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 223) PHP warning: tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:02] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 228) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:02] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 229) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:02] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 2028) PHP warning: Missing argument 1 for Provisioner::_evolutionGatewayExists(), called in /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php on line 234 and defined
                    [2010-09-07 15:35:03] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:03] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:05] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1889) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:05] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 1890) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)
                    [2010-09-07 15:35:05] (ERROR @ /var/www/vhosts/searchenginesandbox.co.uk/httpdocs/core/components/provisioner/model/provisioner/provisioner.class.php : 464) PHP warning: Invalid argument supplied for foreach()
                    

                      • 26903
                      • 1,336 Posts
                      This is odd, from the log
                      ..File() is not within the allowed path(s): (/var/www/vhosts/searchenginesandbox.co.uk/httpdocs:/tmp)

                      but the /tmp directory where tempnam creates the CURL cookie file is quite clearly in the allowed path.

                      OK, on line 222 of the file /core/components/provisioner/model/provisioner/provisioner.class.php is
                      /* Create a temp file for session cookies */
                      $this->_cookiefile = tempnam("", "CURL");
                      

                      You need to change this to point to file within your webroot that’s writeable by your webserver, so pick a place under /assets and create a file called CURLcookies or something
                      then change the code to point to it
                      $this->_cookiefile = $this->modx->getOption('assets_path')<path to your file>;


                      It won’t regen the file on successive logins but CURL should overwrite it anyway. When you log in it should contain a CURL generated header comment if alls well.

                        Use MODx, or the cat gets it!