We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    Hey,

    I’m having some trouble getting MODx up and running using Evolution 1.0.5 on a clients server (thus at a bit of a loss). The site is not displaying any content, but the manager is working properly.

    My first step was to turn on stopOnNotice ($modx->stopOnNotice = true;) in the index.php which gave me the following error:
    PHP error debug
      Error: 	Undefined variable: disabled	 
      Error type/ Nr.: 	Notice - 8	 
      File: 	/srv/www/htdocs/test/manager/includes/document.parser.class.inc.php(791) : eval()'d code	 
      Line: 	6



    I then turned on dumpSQL ($modx->dumpSQL = true;) which gives me the following error:
    PHP error debug
      Error: 	Undefined property: DBAPI::$executedQueries	 
      Error type/ Nr.: 	Notice - 8	 
      File: 	/srv/www/htdocs/test/manager/includes/extenders/dbapi.mysql.class.inc.php	 
      Line: 	146	 
      Line 146 source: 	$modx->queryCode .= "<fieldset style='text-align:left'><legend>Query " . ($this->executedQueries + 1) . " - " . sprintf("%2.4f s", $totaltime) . "</legend>" . $sql . "</fieldset><br />"; 


    Has anyone got any ideas as to where I should be going with my fault finding?

    Fresh install using PHP Version 5.2.6-1+lenny10 MySQL-Client-Version: 4.1.13 / Server Version: 5.0.26

    Thanks very much!
    Taff
      Adrian Lawley: www.adrianlawley.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Your first problem is in a snippet or a plugin, on line 6 of that snippet or plugin’s code. No telling which one it is.

      The second has something to do with the time and number of queries taken to generate the page (the [^...^] tags).

      Possibly that code on line 146 of the DBAPI should be $modx->executedQueries instead of $this->executedQueries?
        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
        • 29181
        • 480 Posts
        Thanks for the reply Susan.

        I just got a phpinfo(); from the provider (function is blocked) in which states that magic_quotes_gpc is currently set to On.

        Could that be the route of the problem possibly? Currently it is just a basic install.

        Thanks again,
        Taff
          Adrian Lawley: www.adrianlawley.com
          • 21257 MODX Staff
          • 730 Posts
          That will be the source of many problems, though I’m not sure whether it’s causing your blank front end problem.
          If they’ve disabled phpinfo(), it also suggests they may have disabled some other functions. I’d ask them for a list. Also, having magic_quotes_gpc enabled by default is a worrying sign that would make me run from a hosting company. I understand how it is when it’s a client’s hosting company though.. you probably have no option but to try to work through it.
            Mike Schell
            Lead Developer, MODX Cloud
            Email: [email protected]
            GitHub: https://github.com/netProphET/
            Twitter: @mkschell
            • 29181
            • 480 Posts
            Thanks for the advice netProphet. That is exactly what I’ve done. If I can’t get some positive developments today, I think I’m going to pass it on...

            Other functions that are turned off:

            # show_source
            # system
            # shell_exec
            # passthru
            # exec
            # popen
            # proc_open

            I’m a little worried about exec...that could be the problem?
              Adrian Lawley: www.adrianlawley.com
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              As far as I know, MODx doesn’t use the exec() function for anything; this executes native operating system utilities and applications. A lot of servers have this disabled.
                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
                • 21257 MODX Staff
                • 730 Posts
                Evolution is going to throw a number of PHP Notices.. so having stopOnNotice On isn’t going to really help you see where the root problem is.
                Notices include, as you see in the error messages you captured in your first post, the use of variables that haven’t been defined.
                You’ll definitely need it Off to move forward.
                  Mike Schell
                  Lead Developer, MODX Cloud
                  Email: [email protected]
                  GitHub: https://github.com/netProphET/
                  Twitter: @mkschell
                  • 42138
                  • 1 Posts
                  Even if this topic is old, I hope this would help someone:
                  I just met the same problem (exactly) as Taff describes with one of my client's Website running under modx 1.0.6. However the problem wasn't effective online, but in local.
                  For me the trouble came from a snippet "DropMenu", because the Php tags were like this
                  ?> <? content ?>
                  instead of
                  <?php content ?>
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    DropMenu is very old, and was replaced by Wayfinder years ago.
                      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