We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30504
    • 14 Posts
    I have some problems with MODx. I downloaded the latest version (0.9.5) and installed it in "modx" folder of server document root. During installation everything was OK, but i cannot preview any document. When i try to run web-site (localhost), i receive PHP error:
    Fatal error: Maximum execution time of 30 seconds exceeded in Z:\home\localhost\www\lyrics\MODx\manager\includes\document.parser.class.inc.php on line 1296
    At the same time my CPU becomes very busy and my apache server allocates huge amount of memory (PHP is installed as apache module, so i think, that’s not actually apache overloads CPU, but PHP).
    I tried to reinstall modx several times with different configurations, with or without sample web-site, but the error occured in every case.
    I use Apache 2.2.2, PHP 5.2.0 and MySQL 5.0.19.
    Browsers: Opera 9.10 and IE 6.0.
    System: WinXP sp2.
    Can anybody help, please? huh
      • 22303 MODX Staff
      • 10,725 Posts
      If you installed TemplateSwitcher plugin, make sure you disable or delete it. This is a known issue, and the upcoming 0.9.5.1 release will not include this plugin, which is most likely causing the problem you are experiencing.
        • 30504
        • 14 Posts
        I’ve reinstalled modx without TemplateSwitcher plug-in, but nothing happend. Just after i reinstalled modx, and tried to preview default web-page (localhost/modx/index.php) i received this error:
        Fatal error: Maximum execution time of 30 seconds exceeded in Z:\home\localhost\www\lyrics\MODx\manager\includes\document.parser.class.inc.php on line 2552

        This error occured only one or two times, and after that it disappeared and the old one (in line 1296) appeared. I tried to remove WayFinder tag in Minimal Template, and after that I could get MODx Welcome web page... So... it’s very strange...
          • 25663 MODX Staff
          • 12,272 Posts
          Sounds like a weird configuration issue. Did you roll your own manual installs of php/mysql or are you using a distro like XAMPP. Take a wild guess what the suggestion will be if you rolled your own... tongue
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 30504
            • 14 Posts
            I do not use any of all-in-one distributives just because it’s hard to check if installed servers are configured as it needed.;) I’ve installed apache, mysql and php manually. So can you define more exactly, what config parameters can infly on such php behavior when running modx web-site? Or, maybe, can you send your php.ini file to compare your and my settings (e-mail: toxxic(_at_)tut.by)? I would appreciate your help, because i found MODx very comfortable and functional.
              • 25663 MODX Staff
              • 12,272 Posts
              Install XAMPP for local testing in Windows environments. Configuring a properly behaving webserver is not easy. Heck, even Opengeek uses XAMPP for local testing/dev and he’s clearly capable of manual installation, but prefers it because it’s just too easy to get it wrong.

              If you want to see other options, view this thread.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 33372
                • 1,611 Posts
                Is there anything in your MODx error logs? Or the server error logs? If WayFinder in particular seems to be where things are breaking down, have you tried updating that snippet with the latest version from the repository?
                  "Things are not what they appear to be; nor are they otherwise." - Buddha

                  "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                  Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Reinstalling without template switcher will not remove it if you run the upgrade installation. Can you confirm you started with a clean database on the re-install? Just make sure that plugin does not exist in the manager under Resources --> Plugins...
                    • 30504
                    • 14 Posts
                    To ZAP: As far I understand, MODx error log is the table ’modx_event_log’, am I right? if yes, then it contains nothing special, just a warning about "Writable config file". And during all my experiments i didn’t see any new record in this table.
                    And Apache logs didn’t show any abnormal behavior...
                    I didn’t try to update WayFinder... Actually, I’m not sure that it’s involved in this mess. But when I do this, I’ll let you know about results.
                    To OpenGeek: I reinslall MODx from scratch every time I need it. i.e. I drop all tables in MODx database and remove all files from MODx folder. And, of course, there’s no template switcher plugin in Resources->Plugins.

                    I tried to find out, what’s the reason of error on line 1296. I modified the code this way:
                    $sql= "INSERT INTO " . $this->getFullTableName("event_log") . "(eventid,type,createdon,source,description,user) " .
                            "VALUES($evtid,$type," . time() . ",'$source','$msg','" . $this->getLoginUserID() . "')";
                            print_r($sql);die(); // <--- breakpoint 1. 
                            $ds= $this->dbQuery($sql);
                            print_r("done... ". $sql ); die(); // <--- breakpoint 2


                    When I run the site, i received result immediately (on breakpoint 1). It shows SQL query:
                    [tt]INSERT INTO `modx`.modx_event_log(eventid,type,createdon,source,description,user) VALUES(0,3,1169847249,’Parser’,’..... error message (HTML) ...... ’,’’)[/tt]

                    Error message has following information:
                    [tt]PHP error debug
                    Error: include_once(assets/modules/quick_edit/output.class.inc.php) [function.include-once]: failed to open stream: No such file or directory
                    Error type/ Nr.: Warning - 2
                    File: Z:\\home\\localhost\\www\\lyrics\\MODx\\manager\\includes\\document.parser.class.inc.php(724) : eval()\’d code
                    Line: 70[/tt]

                    I should say that I don’t have any MODx file missing.
                    When I removed breakpoint 1 and then run the site I received those error of 30 secs limit. Breakpont 2 was not executed. And i don’t understand why in sql request "user" column is empty, because in the table it’s defined with NOT NULL parameter.

                    Maybe I step wrong way, but I think that any problem should be solved.
                    If I get success with running MODx using XAMPP, I’ll let u know.
                    And thank u for your help)
                      • 33372
                      • 1,611 Posts
                      So if I read this right, MODx is trying to write an error to the log and timing out, and that error has to do with not being able to include QuickEdit files...

                      Have you tried reinstalling without QuickEdit (or just removing it from your current install)?

                      You may just receive the error on the next include if the problem is more general, however...
                        "Things are not what they appear to be; nor are they otherwise." - Buddha

                        "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options