We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13181
    • 8 Posts
    Is it possible to install it on php4? i try to make it but when i enter www.mysite.com/install/index.php i get error.
    on my server i have php4 (primary) and php5.
      • 2034
      • 18 Posts
      why bother install it on php4? php4 is dying... grin
        • 27708 MODX Staff
        • 2,502 Posts
        modx works on php 4 so long as it meets the minimum requirements.

        I would suggest strongly (but not so bluntly) that it is time to move to PHP5 as 6 is on the horizon.

        What error are you getting? 500? Blank page? Install errors? It might also be worth while re-downloading modx, re-extract new download and re-upload modx. Sometimes files get lost or broken via ftp via timeouts or bad server connections.

          Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
          • 13181
          • 8 Posts
          I’m agree php4 is dying. but my problem is that i’m running application (someone developed it to me in the past) that work with php4 and i acctually wants to modify this application to work on php5 but i dont know what is involve to make it.

          if i installed modx and i run in the same time php4 and 5, shouldn’t i do something that tell to modx to to work with php5?
          i know other application (Magento [www.magentocommerce.com]) that have workaround (cgi-bin) to run the code on machine with php4 and php5.

          @ smashingred
          when i go to /install/index.php i get a popup window that ask me if i want to download php file with this content:

          <?php
          /**
          * MODx Installer for 0.9.6.1
          */
          // do a little bit of environment cleanup if possible
          @ ini_set(’magic_quotes_runtime’, 0);
          @ ini_set(’magic_quotes_sybase’, 0);

          // start session
          session_start();

          // set error reporting
          error_reporting(E_ALL & ~E_NOTICE);

          require_once("lang.php");

          // session loop-back tester
          if (!$_SESSION[’session_test’] && $_GET[’s’] != ’set’) {
          $_SESSION[’session_test’] = 1;
          $installBaseUrl = (!isset ($_SERVER[’HTTPS’]) || strtolower($_SERVER[’HTTPS’]) != ’on’) ? ’http://’ : ’https://’;
          $installBaseUrl .= $_SERVER[’HTTP_HOST’];
          if ($_SERVER[’SERVER_PORT’] != 80)
          $installBaseUrl = str_replace(’:’ . $_SERVER[’SERVER_PORT’], ’’, $installBaseUrl); // remove port from HTTP_HOST
          $installBaseUrl .= ($_SERVER[’SERVER_PORT’] == 80 || isset ($_SERVER[’HTTPS’]) || strtolower($_SERVER[’HTTPS’]) == ’on’) ? ’’ : ’:’ . $_SERVER[’SERVER_PORT’];
          echo "<html><head><title>" . $_lang[’loading’] . "</title><script>window.location.href=’" . $installBaseUrl . $_SERVER[’PHP_SELF’] . "?action=language’;</script></head><body></body></html>";
          exit;
          }

          $moduleName = "MODx";
          $moduleVersion = "0.9.6.1";
          $moduleSQLBaseFile = "setup.sql";
          $moduleSQLDataFile = "setup.data.sql";
          $moduleSQLUpdateFile = "setup.updates.sql";

          $moduleChunks = array (); // chunks - array : name, description, type - 0:file or 1:content, file or content
          $moduleTemplates = array (); // templates - array : name, description, type - 0:file or 1:content, file or content
          $moduleSnippets = array (); // snippets - array : name, description, type - 0:file or 1:content, file or content,properties
          $modulePlugins = array (); // plugins - array : name, description, type - 0:file or 1:content, file or content,properties, events,guid
          $moduleModules = array (); // modules - array : name, description, type - 0:file or 1:content, file or content,properties, guid
          $moduleTemplates = array (); // templates - array : name, description, type - 0:file or 1:content, file or content,properties
          $moduleTVs = array (); // template variables - array : name, description, type - 0:file or 1:content, file or content,properties

          $errors= 0;

          // get post back status
          $isPostBack = (count($_POST));

          $action= isset ($_GET[’action’]) ? trim(strip_tags($_GET[’action’])) : ’language’;

          // make sure they agree to the license
          if (!in_array($action, array (’language’, ’welcome’, ’license’))) {
          if (!isset ($_POST[’chkagree’])) $action= ’license’;
          }

          include (’header.php’);

          if (!@include (’action.’ . $action . ’.php’)) {
          die (’Invalid install action attempted. [action=’ . $action . ’]’);
          }

          include (’footer.php’);
          ?>


          i know its because the application dont know how to serve the php file.

          what do you think?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            How is your server configured to run php? What happens if you upload a simple file, info.php, with the following code
            <?php
            phpinfo();
            ?>


            MODx works just fine with PHP 4.1.0 or greater.

            Some snippets and other third-party modules or plugins use 5.0-specific functions.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 13181
              • 8 Posts
              when i upload info.php i get the same popup window that ask me if i want to save the php file
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Then your server is not configured properly to use PHP.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 13181
                  • 8 Posts
                  so what should i do? something related to php.ini?