We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22879
    • 16 Posts
    Can any1 tell me if i have anything wrong on my install/index.php

    <phpinfo();
    /**
    * 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’);
    ?>

    thanks
    Carl
      • 24806
      • 43 Posts
      After comparing your Code with the original version of the modx installer 0.9.6.1 I could not find any mistake except the "<phpinfo()" at the beginning. You have no initiation tag of php. You have to type: "<?php" to make sure following code is parsed in php but maybe it is only a temporary writing mistake on your side. Forget that phpinfo function or put in another file ("<?php phpinfo ?>").
      But why checking the whole code? If you haven’t installed your system yet you simply can download the installer again!
      Äh, if this doesn’t work I would appreciate it to make this extra phpinfo file and post a link to it so that we can look deeper in your materia wink.

      good luck
      Max
        I love MODx
        • 17734
        • 18 Posts
        More than 4 years since this thread but my problem is the same...

        suhosin.....disable_eval is OFF but, it still truncate my snippet when it founds some javascript and the blank page is here !

        Is there another property to turn off???

        I'm on the server of a all town and can't ask them to turn all suhosin Off...


        • Hello,

          I know in MODX Revolution the fix is to use (http://rtfm.modx.com/display/revolution20/MODX+and+Suhosin), as for MODX Evolution, what version are you using?

            Patrick | Server Wrangler
            About Me: Website | TweetsMODX Hosting
            • 17734
            • 18 Posts
            Thanx.
            I use MODX Revolution 2.1.3-pl
            i'll try this configuration and tell you if it works
              • 17734
              • 18 Posts
              So....
              i try to save that snippet :

              ?>
              <script>
                function check() {
                  var msg = "";
                  if (document.getElementById('nom').value == "")  { msg += "Veuillez saisir votre nom\n";  
                    document.getElementById('nom').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('prenom').value == "")  { msg += "Veuillez saisir votre prénom\n";  
                    document.getElementById('prenom').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('ville').value == "")  { msg += "Veuillez indiquer votre ville\n";
                   document.getElementById('ville').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('email').value == "")  { msg += "Veuillez indiquer une adresse mail\n";
                    document.getElementById('email').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('mess').value == "")  { msg += "Merci de saisir un message\n";  
                    document.getElementById('mess').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('objet').value == "")  { msg += "Merci de saisir un objet pour votre message\n";
                    document.getElementById('objet').style.backgroundColor = "#ffcdcd";}
                  
                  //Si aucun message d'alerte a été initialisé on retourne TRUE
                if (msg == "") return(true);
               
              //Si un message d'alerte a été initialisé on lance l'alerte
                else  {
                  alert(msg);
                  return(false);
                }
                }
              </script>
              <?php
              // pas posté, affiche le formulaire
              if(!isset($_POST['submit'])){
              ?>
              
              <form action="[[~19~]]" method="post" class="form_contact"  onSubmit="return check();">
                <table width="100%" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="50%"><label for="nom">Nom *</label>
                      <input type="text" id="nom" name="nom" size="30"></td>
                    <td><label for="prenom">Prénom *</label>
                      <input type="text" id="prenom" name="prenom" size="30"></td>
                  </tr>
                  <tr>
                    <td width="50%"><label for="ville">Ville *</label>
                      <input type="text" id="ville" name="ville" size="30"></td>
                    <td><label for="email">Email *</label>
                      <input type="text" id="email" name="email" size="30"></td>
                  </tr>
                  <tr>
                    <td colspan="2"><label for="objet">Objet *</label>
                      <input type="text" id="objet" name="objet" size="60"></td>
                  </tr>
                  <tr>
                    <td width="50%" colspan="2"><label for="mess" style="float:left;">Message *</label>
                      <textarea id="mess" name="mess" style="width:550px" rows="10"></textarea></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center"><small>* champs obligatoires</small></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center"><input type="submit" name="submit" value="Envoyer" /></td>
                  </tr>
                </table>
              </form>
              <?php
                      
              }else{
                      require("assets/js/phpmailer/class.phpmailer.php");
              $corps='<html>
              <style type="text/css">
              * { font-family: verdana; font-size:11px; }
              html { width:100%; height:100%; }
              table tr.border-bottom{ border-bottom:1px solid #666;}
              </style>
              <div style="width:600px;margin:0 auto 20px auto; padding:10px; border:5px solid #dddddd; background-color:#fff;">
              <img src="http://reattu.polesud.fr/logo_blanc.gif" /><br /><br />
              ';
                  
              $corps.="<strong>Nom</strong> : ".  ($_POST['nom'])."<br />
                 <strong> Prénom</strong> : ". ($_POST['prenom'])."<br />
                  <strong>Email</strong> : ". ($_POST['email'])."<br />
                  <strong>Ville</strong> : ". ($_POST['ville']). "<br /><br>
                  <strong>Objet</strong> : ". ($_POST['objet']). "<br /><br>
                  <strong>Message</strong> : <br />". nl2br($_POST['mess']). "<br /></div></body></html>";
                  
                      $mail  = new PHPMailer();
              $mail->AddReplyTo("[email protected]","Emilie");
              $mail->SetFrom("[email protected]", "Emilie");
              $mail->AddReplyTo("[email protected]","Emilie");
              $address = "[email protected]";
              $mail->AddAddress("[email protected]", "Emilie");
              $mail->Subject = ">> Message du formulaire de contact";
              $body=utf8_decode($corps);
                $mail->MsgHTML($body);
                      if($mail->Send()){
                      echo "<br />
              <br />
              Merci, votre message a été transmis.<br />
              <br />
              Nous vous répondrons dans les plus brefs délais.<br />
              <br />
              ";        
                      }else{
                      echo "<br />
              <br />
              Une erreur est survenue, veuillez réessayer ulterieurement.
              <br />
              ";                
                      }
                      
              }


              When i save, i've the Please Wait and the progress bar and it seems ok, but (of course there's a BUT) when i click the snippet in the tree, the only thing lasting is

              <?php
              ?>
              <script>
                function check() {
                  var msg = "";
                  if (document.getElementById('nom').value == "")  { msg += "Veuillez saisir votre nom\n";  
                    document.getElementById('nom').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('prenom').value == "")  { msg += "Veuillez saisir votre prénom\n";  
                    document.getElementById('prenom').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('ville').value == "")  { msg += "Veuillez indiquer votre ville\n"; 
                   document.getElementById('ville').style.backgroundColor = "#ffcdcd";}
                  if (document.getElementById('email').value == "")  { msg += "Veuillez indiquer une adresse mail\n"; 
                    document.getElemen