We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 54325
    • 22 Posts
    Quote from: BobRay at Aug 26, 2018, 08:54 PM
    Are you running upgrade.php in a code editor? That would explain the port number in the URL and the problem. When you switch to a different port, the session is lost and you're no longer logged in. If you're running it in MODX, it should just forward you to the script without changing the port number, unless you have something unusual in .htaccess.


    The port was my idea. I was telling you that the default port (80) was in use. The URL reads: https://myserver/upgrade.php.

    This is all I have in .htaccess: I have removed all the comments for brevities sake:

    RewriteEngine On
    RewriteBase /

    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


    Is there anything weird going on here?

    James

      • 54325
      • 22 Posts
      Quote from: jxarms3 at Aug 27, 2018, 12:19 AM
      Quote from: BobRay at Aug 26, 2018, 08:54 PM
      Are you running upgrade.php in a code editor? That would explain the port number in the URL and the problem. When you switch to a different port, the session is lost and you're no longer logged in. If you're running it in MODX, it should just forward you to the script without changing the port number, unless you have something unusual in .htaccess.


      The port was my idea. I was telling you that the default port (80) was in use. The URL reads: https://myserver/upgrade.php.

      This is all I have in .htaccess: I have removed all the comments for brevities sake:

      RewriteEngine On
      RewriteBase /

      # The Friendly URLs part
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


      Is there anything weird going on here?

      James

        • 54325
        • 22 Posts
        Quote from: jxarms3 at Aug 27, 2018, 07:28 AM
        Quote from: jxarms3 at Aug 27, 2018, 12:19 AM
        Quote from: BobRay at Aug 26, 2018, 08:54 PM
        Are you running upgrade.php in a code editor? That would explain the port number in the URL and the problem. When you switch to a different port, the session is lost and you're no longer logged in. If you're running it in MODX, it should just forward you to the script without changing the port number, unless you have something unusual in .htaccess.


        The port was my idea. I was telling you that the default port (80) was in use. The URL reads: https://myserver/upgrade.php.

        This is all I have in .htaccess: I have removed all the comments for brevities sake:

        RewriteEngine On
        RewriteBase /

        # The Friendly URLs part
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


        Is there anything weird going on here?

        James


        my root/manager directory has a ht.access file that was never converted to .htaccess.

        Also, when click the "Upgrade MODX" button. I am logged out.
          • 54325
          • 22 Posts
          Quote from: jxarms3 at Aug 27, 2018, 09:31 AM
          Quote from: jxarms3 at Aug 27, 2018, 07:28 AM
          Quote from: jxarms3 at Aug 27, 2018, 12:19 AM
          Quote from: BobRay at Aug 26, 2018, 08:54 PM
          Are you running upgrade.php in a code editor? That would explain the port number in the URL and the problem. When you switch to a different port, the session is lost and you're no longer logged in. If you're running it in MODX, it should just forward you to the script without changing the port number, unless you have something unusual in .htaccess.


          The port was my idea. I was telling you that the default port (80) was in use. The URL reads: https://myserver/upgrade.php.

          This is all I have in .htaccess: I have removed all the comments for brevities sake:

          RewriteEngine On
          RewriteBase /

          # The Friendly URLs part
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


          Is there anything weird going on here?

          James


          my root/manager directory has a ht.access file that was never converted to .htaccess.

          Also, when click the "Upgrade MODX" button. I am logged out.
            • 3749
            • 24,544 Posts
            As far as being logged out. UGM logs everyone out when it launches the script, so that's normal. It should be launching the upgrade.php script in the root of the MODX site. If you go to http://yoursite.com/upgrade.php in your browser, you should see it. MODX only steps in if the requested file is not found, so it could be a file or directory permission problem with the upgrade.php file.

              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
              • 54325
              • 22 Posts
              Quote from: BobRay at Aug 27, 2018, 11:49 AM
              As far as being logged out. UGM logs everyone out when it launches the script, so that's normal. It should be launching the upgrade.php script in the root of the MODX site. If you go to http://yoursite.com/upgrade.php in your browser, you should see it. MODX only steps in if the requested file is not found, so it could be a file or directory permission problem with the upgrade.php file.


              This file is NOT present????
                • 3749
                • 24,544 Posts
                That's really strange. The Widget snippet opens that file at MODX_BASE_PATH . 'upgrade.php' for writing and throws an error if the file isn't opened successfully. I don't know how it could fail to exist with you getting an error message. Even if the write failed, there's be a 0-length file there.
                  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
                  • 54325
                  • 22 Posts
                  Quote from: BobRay at Aug 27, 2018, 12:44 PM
                  That's really strange. The Widget snippet opens that file at MODX_BASE_PATH . 'upgrade.php' for writing and throws an error if the file isn't opened successfully. I don't know how it could fail to exist with you getting an error message. Even if the write failed, there's be a 0-length file there.
                  can I simply put the file there? Can I download the extra locally and manually place the file there? Would there be an error in the error log as to why the file was not present?
                    • 54325
                    • 22 Posts
                    Quote from: jxarms3 at Aug 27, 2018, 02:33 PM
                    Quote from: BobRay at Aug 27, 2018, 12:44 PM
                    That's really strange. The Widget snippet opens that file at MODX_BASE_PATH . 'upgrade.php' for writing and throws an error if the file isn't opened successfully. I don't know how it could fail to exist with you getting an error message. Even if the write failed, there's be a 0-length file there.
                    can I simply put the file there? Can I download the extra locally and manually place the file there? Would there be an error in the error log as to why the file was not present?


                    Here are the contents of the package:

                    /var/www/html/core/packages/upgrademodx-1.5.5-pl
                    -bash-4.2$ find . -name "*upgrade*"
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c/1/upgrademodx
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c/0/upgrademodx
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c/0/upgrademodx/elements/snippets/upgrademodxwidget.snippet.php
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c/0/upgrademodx/elements/chunks/upgrademodxtpl.chunk.html
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c/0/upgrademodx/elements/chunks/upgrademodxsnippetscriptsource.chunk.php
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c/0/upgrademodx/model/upgrademodx.class.php
                    ./modCategory/ac745d6b0e713df8d10d6c1aa45cdf7c.upgrademodx.resolver.resolver
                    -bash-4.2$
                      • 3749
                      • 24,544 Posts
                      It's not in the package. The widget snippet creates it on the fly using the upgradeMODXScriptSource chunk and the settings from the widget snippet properties.

                      You might be able to replace all the placeholders in the chunk with the appropriate values and save the result to upgrade.php, but it would be a pain.

                      You should definitely see an error message in the Widget itself when it fails to write that file. You might make sure that the MODX root directory can be written to.
                        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