We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I wasn't sure where to post this, but I wanted to share the installmodx.php utility: https://github.com/craftsmancoding/modx_utils

    Here's the 2 minute video demo: http://youtu.be/-FR10DR16CE

    This was debuted tonight at the MODX Meeting in Denver. The goal of this utility was to streamline the MODX install process. If you've got a MODX config.xml file ready, this is a script that could be run without user input (that's the hope, at least).

    Hope this is useful!
      • 22840
      • 1,572 Posts
      Great utility, getting the below error when trying to run it:

      Parse error: syntax error, unexpected ':' in /home/tracksan/public_html/installmodx.php on line 619


      Looking at that line in the code it's the below but not knowing PHP I have no idea how to fix it:

      	ENTERDATA:
      	$data = get_data($data);
      	print_review_data($data);
        • 39344
        • 23 Posts
        Everett, this looks really great!

        What happens if there is no shell access on the server? Is it also possible to run this in a browser window?



        Greetings
        Harde
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          @Paul -- hmmm... I demo'd the script last night at the MODX meetup in Denver... I wonder if your version of PHP doesn't support that awesome GOTO statement there. What version of PHP are you running?

          @harde -- this version of the script is for command-line installs only. I'll add browser support in a future version.
            • 22840
            • 1,572 Posts
            Hi Everett,

            I'm running version 5.2.17

            Cheers
              • 9207 ☆ A M B ☆
              • 2,475 Posts
              Aha. Well, there's a version check in the script, but now that I think about it, it can't ever successfully run. You need PHP 5.3.0 or greater for this script to run.
                • 22840
                • 1,572 Posts
                Dohhh, Guess I'll have to get the servers upgraded then ;o)
                  • 40045
                  • 534 Posts
                  Looks really nice =), are your additional modx server/config checks included in the installer script?
                    • 9207 ☆ A M B ☆
                    • 2,475 Posts
                    The MODX guys already wrote a way to do the command-line install, so this is just a "front-end" for that: it does the following:

                    1. Finds the latests version of MODX
                    2. Downloads it and extracts it to a directory of your choosing
                    3. Prompts you for database and MODX creds
                    4. Creates the necessary directories that install always prompts you about: core/components/ etc.
                    5. Creates a config.xml file
                    6. Calls the MODX command-line install

                    So there are some checks -- I should up the game here and check the DB connection etc. Are there other checks you had in mind?

                    I wrote this in a way to make it easy to add additional prompts later if needed (e.g. database host or type etc)... so all of that's possible in a future version. The goal for me was to get something I could script automatically, and that's now possible once you have your config.xml file.