We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Very nice, this is getting better and better !

    I definitely have to check those improvements out, great work grin
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 2690
      • 148 Posts
      Hi Guys,

      Any idea why i get this error when running the module during the installation?

      « MODx Parse Error »
      MODx encountered the following error while attempting to parse the requested resource:
      « Execution of a query to the database failed - You have an error in your SQL syntax near ’; ’ at line 8 »
      SQL: CREATE TABLE IF NOT EXISTS `site_polls` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) default NULL, `question` varchar(255) default NULL, `votes` int(11) default ’0’, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT=’Simple Poll’;
      [Copy SQL to ClipBoard]

      Parser timing
      MySQL: 0.0002 s s (0 Requests)
      PHP: 1144943373.0717 s s
      Total: 1144943373.0719 s s
        MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
        • 10487 MODX Staff
        • 1,535 Posts
        Hi bakalek,

        Can you let me know what version of MySQL you’re using and I’ll have a look into it.

        Thanks, Garry
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 2690
          • 148 Posts
          MySQL version 3.23.58


          Thank you !

          Aleks
            MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
            • 10487 MODX Staff
            • 1,535 Posts
            Bakalek, could you please try running the SQL statements below using phpMyAdmin and let me know what the results are.

            This is the table information exported straight from my working version and is in MySQL 3.23 compatibility mode so should work.
            CREATE TABLE `site_poll_choices` (
              `id` int(11) NOT NULL,
              `pollid` int(11) NOT NULL default '0',
              `choice` varchar(255) default NULL,
              `votes` int(11) default '0',
              PRIMARY KEY  (`id`),
              KEY `pollid` (`pollid`)
            ) TYPE=MyISAM COMMENT='Simple Poll' AUTO_INCREMENT=1 ;
            
            CREATE TABLE `site_pollip` (
              `id` int(11) NOT NULL,
              `pollid` int(11) default NULL,
              `ipaddress` varchar(255) default NULL,
              PRIMARY KEY  (`id`)
            ) TYPE=MyISAM COMMENT='Simple Poll' AUTO_INCREMENT=1 ;
            
            CREATE TABLE `site_polls` (
              `id` int(11) NOT NULL,
              `name` varchar(50) default NULL,
              `question` varchar(255) default NULL,
              `votes` int(11) default '0',
              PRIMARY KEY  (`id`)
            ) TYPE=MyISAM COMMENT='Simple Poll' AUTO_INCREMENT=1 ;


            Cheers, Garry
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 2690
              • 148 Posts
              Garry, running sql from the webmin. getting this error:

              Failed to execute SQL : SQL CREATE TABLE `site_poll_choices` ( `id` int(11) NOT NULL, `pollid` int(11) NOT NULL default ’0’, `choice` varchar(255) default NULL, `votes` int(11) default ’0’, PRIMARY KEY (`id`), KEY `pollid` (`pollid`) ) TYPE=MyISAM COMMENT=’Simple Poll’ AUTO_INCREMENT=1 ; CREATE TABLE `site_pollip` ( `id` int(11) NOT NULL, `pollid` int(11) default NULL, `ipaddress` varchar(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT=’Simple Poll’ AUTO_INCREMENT=1 ; CREATE TABLE `site_polls` ( `id` int(11) NOT NULL, `name` varchar(50) default NULL, `question` varchar(255) default NULL, `votes` int(11) default ’0’, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT=’Simple Poll’ AUTO_INCREMENT=1 ; failed : You have an error in your SQL syntax near ’; CREATE TABLE `site_pollip` ( `id` int(11) NOT NULL, `pollid` int(11) defau’ at line 1

              Thank you for your help !


              Aleks
                MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
                • 10487 MODX Staff
                • 1,535 Posts
                Well, I’ll be honest - this has me completely stumped sad

                I’ve just had a second opinion on the SQL and as far as we can tell it’s a valid SQL statement. Have you had any issues with any other SQL statements being run? I’m pretty certain the problem is something to do with the environment/setup and not the module but I wouldn’t know what to suggest really.

                Can anybody help with this? Has anybody else experienced problems installing or know what the problem may be.

                Sorry I can’t help more bakalek but I’ll keep thinking about it, see if something comes to mind,

                Garry

                EDIT: You could always create the tables manually using the same fields etc. as the SQL statements - not ideal but should work (else something has gone seriously wrong wink )
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Slight change; try this and see if that executes:

                  CREATE TABLE `site_poll_choices` (
                    `id` int(11) NOT NULL AUTO_INCREMENT,
                    `pollid` int(11) NOT NULL default '0',
                    `choice` varchar(255) default NULL,
                    `votes` int(11) default '0',
                    PRIMARY KEY  (`id`),
                    KEY `pollid` (`pollid`)
                  ) TYPE=MyISAM COMMENT='Simple Poll' ;
                  
                  CREATE TABLE `site_pollip` (
                    `id` int(11) NOT NULL AUTO_INCREMENT,
                    `pollid` int(11) default NULL,
                    `ipaddress` varchar(255) default NULL,
                    PRIMARY KEY  (`id`)
                  ) TYPE=MyISAM COMMENT='Simple Poll' ;
                  
                  CREATE TABLE `site_polls` (
                    `id` int(11) NOT NULL AUTO_INCREMENT,
                    `name` varchar(50) default NULL,
                    `question` varchar(255) default NULL,
                    `votes` int(11) default '0',
                    PRIMARY KEY  (`id`)
                  ) TYPE=MyISAM COMMENT='Simple Poll';


                  I think I had this problem working with a 3.23 install and exporting using phpMyAdmin’s 3.2x COMPATIBILITY MODE a year or so ago.
                    • 2690
                    • 148 Posts
                    Hmm .. the last SQL went through!

                    but in order to make the module work i had to remove lines: 18-56

                    now its seems to be ok


                    Thank you for your help !

                    Aleks
                      MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
                      • 10487 MODX Staff
                      • 1,535 Posts
                      Wonderful, thanks for getting back Aleks smiley

                      Now you’ve confirmed the changes worked I’ll get the module updated with the new SQL info.

                      Cheers, Garry

                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com

                      This discussion is closed to further replies. Keep calm and carry on.