We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13933
    • 8 Posts
    After successfully installing MODx last week it all suddenly went a bit wrong after I’d been playing around for a few days. The code output for the site was full of weird backslashes and other odd characters.... so I thought I’d try a fresh install.

    Now I keep gettting a massive series of errors on the install screen (here is a small excerpt)

    Any ideas?


    Creating database tables: Database Alerts!

    MODx setup couldn’t install/alter some tables inside the selected database.

    The following errors had occurred during installation

    You have an error in your SQL syntax near ’\’0\’, `username` varchar(50) NOT NULL default \’\’, `lasthit` int(20) NOT N’ at line 2 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `modx_active_users` ( `internalKey` int(9) NOT NULL default \’0\’, `username` varchar(50) NOT NULL default \’\’, `lasthit` int(20) NOT NULL default \’0\’, `id` int(10) default NULL, `action` varchar(10) NOT NULL default \’\’, `ip` varchar(20) NOT NULL default \’\’, PRIMARY KEY (`internalKey`) ) TYPE=MyISAM .
    You have an error in your SQL syntax near ’\’0\’, `document` int(10) NOT NULL default \’0\’, PRIMARY KEY (`id`), KEY’ at line 3 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `modx_document_groups` ( `id` int(10) NOT NULL auto_increment, `document_group` int(10) NOT NULL default \’0\’, `document` int(10) NOT NULL default \’0\’, PRIMARY KEY (`id`), KEY `document` (document), KEY `document_group` (document_group) ) TYPE=MyISAM .You have an error in your SQL syntax near ’\’\’, `private_memgroup` TINYINT DEFAULT 0 , `private_webgroup` TINYINT DEFA’ at line 3 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `modx_documentgroup_names` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default \’\’, `private_memgroup` TINYINT DEFAULT 0 , `private_webgroup` TINYINT DEFAULT 0 , PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) TYPE=MyISAM .You have an error in your SQL syntax near ’\’0\’, `keyword_id` int(11) NOT NULL default \’0\’, KEY `content_id` (`conte’ at line 2 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `modx_keyword_xref` ( `content_id` int(11) NOT NULL default \’0\’, `keyword_id` int(11) NOT NULL default \’0\’, KEY `content_id` (`content_id`), KEY `keyword_id` (`keyword_id`) ) TYPE=MyISAM .You have an error in your SQL syntax near ’\’0\’, `document` int(11) NOT NULL default \’0\’, `timestamp` int(20) NOT NU’ at line 2 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `modx_log_access` ( `visitor` int(11) NOT NULL default \’0\’, `document` int(11) NOT NULL default \’0\’, `timestamp` int(20) NOT NULL default \’0\’, `hour` tinyint(2) NOT NULL default \’0\’, `weekday` tinyint(1) NOT NULL default \’0\’, `referer` int(11) NOT NULL default \’0\’, `entry` tinyint(1) NOT NULL default \’0\’, KEY `visitor` (`visitor`), KEY `document` (`document`), KEY `timestamp` (`timestamp`), KEY `referer` (`referer`), KEY `entry` (`entry`), KEY `hour` (`hour`), KEY `weekday` (`weekday`) ) TYPE=InnoDB .You have an error in your SQL syntax near ’\’0\’, `data` varchar(255) NOT NULL default \’\’, PRIMARY KEY (`id`) ) TYPE’ at line 2 during the execution of SQL statement CREATE TABLE IF NOT EXISTS `modx_log_hosts` ( `id` int(11) NOT NULL default \’0\’, `data` varchar(255) NOT NULL default \’\’,

    .........

    and so on!!!!

      • 33337
      • 3,975 Posts
      Please provide more details:

      http://modxcms.com/forums/index.php/topic,489.0.html

      regards,

      zi
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Something is doing an "addslashes()", adding a backslash character \ to the single-quote characters. So ’0’ becomes \’0\’ and MySQL doesn’t like that. I don’t see anything in the MODx installation that would do that.

        Has any kind of update been made to your server environment since the first time you installed?
          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
          • 13933
          • 8 Posts
          Has any kind of update been made to your server environment since the first time you installed?

          No server config changes since the last install.


          Please provide more details:

          Web Server:
          ----------------
          PHP version: 4.3.6
          MySQL version: 4.0.18
          Operating System and version: Red Hat 9.0 (also same error occuring on Fedora Core 9.0)

          Browser/Client:
          -----------------
          Browser name and version: Any browser
          Operating System and version: Any OS you choose...
            • 13933
            • 8 Posts
            Just noticed another strange thing...

            I haven’t uploaded config.inc.php yet I am getting the message

            Checking if manager/includes/config.inc.php is writable: OK!

            on the install checklist screen.
              • 13933
              • 8 Posts
              I seem to have stopped the backslash errors by over-riding the magic quote runtime setting in the .htaccess file

              php_flag magic_quotes_runtime Off

              problem solved .... for now ;-)
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Quote from: jello at Dec 05, 2005, 07:53 AM

                Just noticed another strange thing...

                I haven’t uploaded config.inc.php yet I am getting the message

                Checking if manager/includes/config.inc.php is writable: OK!

                on the install checklist screen.

                That is because the installer tries to write a file, and if successful, removes it again, to test that it can do so. If it fails, it can let you know that you need to fix the permissions before you get stuck half-installed. It actually writes the permanet file later in the installation process.
                  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