Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2012
    Location
    Louisville, Colorado, USA
    Posts
    116
    Plugin Contributions
    0

    Default inscrutable PHP Error 1064 install failure

    I've read the other posts regarding the 1064 error and I get the impression that there's no general rule for determining what issue is triggering the (line 101 in my case) query_factory.php warning. Also, I have the myDebug-backtrace file in the two designated extra-configure folders, and they don't activate.

    So, following are the specifics. I'm attempting two fresh installs of zc-v1.50 into two domains not used for my ecommerce site. The domains are webspaces in a Centos 6.x virtual server container. Both fresh installs fail with exactly the same error_log addition:

    [Sat Mar 14 00:10:59 2015] [warn] [client 67.190.29.70] mod_fcgid: stderr: PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-configuration WHERE configuration_key = 'CATEGORIES_COUNT_ZERO'' at line 1 :: SELECT count(*) as count FROM spin-configuration WHERE configuration_key = 'CATEGORIES_COUNT_ZERO' in /var/www/vhosts/MyDomain.us/MyDomain.us/includes/classes/db/mysql/query_factory.php on line 101, referer: http:/MyDomain.us/zc_install/index.php?main_page=license

    The zc_install "Warning" is generated with this query_factory.php function:

    function show_error() {
    if ($this->error_number == 0 && $this->error_text == DB_ERROR_NOT_CONNECTED && !headers_sent() && file_exists('nddbc.html') ) include('nddbc.html');
    echo '<div class="systemError">';
    if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true)
    {
    echo $this->error_number . ' ' . $this->error_text;
    echo '<br />in:<br />[' . (strstr($this->zf_sql, 'db_cache') ? 'db_cache table' : $this->zf_sql) . ']<br />';
    } else {
    echo 'WARNING: An Error occurred, please refresh the page and try again.';
    }
    trigger_error($this->error_number . ':' . $this->error_text . ' :: ' . $this->zf_sql, E_USER_ERROR);
    if (defined('IS_ADMIN_FLAG') && IS_ADMIN_FLAG==true) echo 'If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.<br />';
    echo '</div>';
    }

    And the data base 412 configuration referenced in the error_log is:

    (|412|Categories with 0 Products Status|CATEGORIES_COUNT_ZERO|0|Show Category Count for 0 Products?&lt;br /&gt;0= off&lt;br /&gt;1= on|19|30|NULL|2015-02-17 08:43:31|NULL|zen_cfg_select_option(array('0', '1'))

    I find nothing inappropriate with that db record.

    So, I'm stymied.

    Any knowledge regarding this problem would be appreciated.

    And incidentally, if someone has noticed I have many posts seeking help but none offering help, it's because until I have successfully installed my ecommerce site, I categorically "don't know nothin worth knowing!"

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: inscrutable PHP Error 1064 install failure

    Your table names include a character that the requires the table name to be quoted. See: http://dev.mysql.com/doc/refman/5.0/en/identifiers.html

    By having the - it appears that there may be an issue... Try generating/setting up the site to use an underscore as the last character of the database prefix and don't use the dash...

    Generally speaking, not using a prefix at all is the preferred method unless there is some business related need for it.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Apr 2012
    Location
    Louisville, Colorado, USA
    Posts
    116
    Plugin Contributions
    0

    Default Re: inscrutable PHP Error 1064 install failure

    Thanks for your prompt reply. Both the admin and store configuration files support db name prefixes. lines 66 and 52 respectfully. In the link you suggest the canonical SQL does not disallow the hyphen character.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: inscrutable PHP Error 1064 install failure

    Quote Originally Posted by cyberbaffled View Post
    Thanks for your prompt reply. Both the admin and store configuration files support db name prefixes. lines 66 and 52 respectfully. In the link you suggest the canonical SQL does not disallow the hyphen character.
    Welcome. And no it does not disallow it, but states that if the table name is not comprised of letters (small/large), numbers, and/or underscores, then particular care must be taken when accessing that table.

    So, how about revising the prefix to replace the dash with an underscore and see if the problem is resolved. Changes could be made to the existing database, the includes/configure.php file, and the admin/includes/configure.php file.

    Or, create a new set of tables through the zc_install process while the configure.php files have a modified DB_PREfIX to replace the dash with the underscore and see/report the results.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: inscrutable PHP Error 1064 install failure

    Quote Originally Posted by MySQL Reference Manual
    Permitted characters in unquoted identifiers: ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore) and Extended: U+0080 .. U+FFFF
    Zen Cart currently uses "unquoted identifiers". This means you cannot use characters other than those listed above. This goes for the database name, database prefix, table names, and column names. Hyphen (minus / dash key on most QWERTY keyboards) is U+002D.

    One should also avoid any "reserved names" in the database name, database prefix, table names, and column names. These will also cause issues when "unquoted identifiers" are used.
    Last edited by lhungil; 17 Mar 2015 at 06:08 AM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  6. #6
    Join Date
    Apr 2012
    Location
    Louisville, Colorado, USA
    Posts
    116
    Plugin Contributions
    0

    Default Re: inscrutable PHP Error 1064 install failure

    Quote Originally Posted by lhungil View Post
    Zen Cart currently uses "unquoted identifiers". This means you cannot use characters other than those listed above. This goes for the database name, database prefix, table names, and column names. Hyphen (minus / dash key on most QWERTY keyboards) is U+002D.

    One should also avoid any "reserved names" in the database name, database prefix, table names, and column names. These will also cause issues when "unquoted identifiers" are used.
    Ihungil, your observation has the "ring of truth" to it. The stricture you quote is one of a gazillion that has escaped memory. I will try this immediately and post the result.

  7. #7
    Join Date
    Apr 2012
    Location
    Louisville, Colorado, USA
    Posts
    116
    Plugin Contributions
    0

    Default Re: inscrutable PHP Error 1064 install failure

    Hi again. Thanks for your continued attention to this conundrum. Your last remark has the specificity that has the "ring of truth" similar to that I note for Ihungil's observation. Again, I will test your idea immediately and post the result.

  8. #8
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: inscrutable PHP Error 1064 install failure

    What action(s) were taken and what was the result?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Apr 2012
    Location
    Louisville, Colorado, USA
    Posts
    116
    Plugin Contributions
    0

    Default Re: inscrutable PHP Error 1064 install failure

    I apologize. When life intrudes some "immediate" intervals last longer than others. Replacing the hyphen with an underscore did allow me to continue the install procedure. However, I fear I'm going to have to abandon the Parallels Plesk virtual server and move everything over to another hosting company. That server gives me error_log messages that it can't find files which don't exist and can't find files which exist at every document level. I'm completely exhausted. The site I've set up is intended to help me debug another site whose admin login.php execution vanishes without activating the index.php file and yields an error log message that it can't find a file at .../var. I've explained this in great detail in my series of posts before this concerning the install hanging. Thanks again for the information. There was nothing in the error_log message that would have directed my mind in that direction.

  10. #10
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: inscrutable PHP Error 1064 install failure

    Quote Originally Posted by cyberbaffled View Post
    I apologize. When life intrudes some "immediate" intervals last longer than others. Replacing the hyphen with an underscore did allow me to continue the install procedure. However, I fear I'm going to have to abandon the Parallels Plesk virtual server and move everything over to another hosting company. That server gives me error_log messages that it can't find files which don't exist and can't find files which exist at every document level. I'm completely exhausted. The site I've set up is intended to help me debug another site whose admin login.php execution vanishes without activating the index.php file and yields an error log message that it can't find a file at .../var. I've explained this in great detail in my series of posts before this concerning the install hanging. Thanks again for the information. There was nothing in the error_log message that would have directed my mind in that direction.
    Certainly happens to all (immediate intervals not being so immediate), sometimes is immediate but here is not revisited. Glad *that* issue was resolved...

    The other? Started a new thread about all that? Seems like potentially paths are incorrect and or php.ini (or similar) issues..
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v151 PHP Fatal error: 1064:You have an error in your SQL syntax
    By chaptech in forum General Questions
    Replies: 2
    Last Post: 5 Mar 2015, 07:16 PM
  2. v152 PHP Fatal error: 1064
    By welshop.com in forum General Questions
    Replies: 14
    Last Post: 10 Jun 2014, 04:58 PM
  3. PHP Fatal error: 1064:You have an error in your SQL syntax
    By uswebworx in forum General Questions
    Replies: 11
    Last Post: 19 Apr 2012, 09:17 AM
  4. Error with new install 1.3.9d 1064 error in SQL syntax
    By Joseph M in forum Installing on a Linux/Unix Server
    Replies: 21
    Last Post: 28 Jun 2010, 06:36 PM
  5. Install error 1064
    By yueli7 in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 8 Jul 2009, 09:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR