Zen Cart Logo
Forums / Installing on a Linux/Unix Server / inscrutable PHP Error 1064 install failure

inscrutable PHP Error 1064 install failure

Views: 1,708

Results 1 to 10 of 10
15 Mar 2015, 10:20 PM
#1
cyberbaffled avatar

cyberbaffled

Zen Follower

Join Date:
Apr 2012
Location:
Louisville, Colorado, USA
Posts:
120
Plugin Contributions:
0

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?<br />0= off<br />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!"

15 Mar 2015, 11:41 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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.

17 Mar 2015, 3:51 AM
#3
cyberbaffled avatar

cyberbaffled

Zen Follower

Join Date:
Apr 2012
Location:
Louisville, Colorado, USA
Posts:
120
Plugin Contributions:
0

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.

17 Mar 2015, 4:00 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: inscrutable PHP Error 1064 install failure

cyberbaffled:

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.

17 Mar 2015, 5:02 AM
#5
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: inscrutable PHP Error 1064 install failure

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.

17 Mar 2015, 4:09 PM
#6
cyberbaffled avatar

cyberbaffled

Zen Follower

Join Date:
Apr 2012
Location:
Louisville, Colorado, USA
Posts:
120
Plugin Contributions:
0

Re: inscrutable PHP Error 1064 install failure

lhungil:

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.

17 Mar 2015, 4:15 PM
#7
cyberbaffled avatar

cyberbaffled

Zen Follower

Join Date:
Apr 2012
Location:
Louisville, Colorado, USA
Posts:
120
Plugin Contributions:
0

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.

19 Mar 2015, 10:33 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: inscrutable PHP Error 1064 install failure

What action(s) were taken and what was the result?

20 Mar 2015, 12:36 AM
#9
cyberbaffled avatar

cyberbaffled

Zen Follower

Join Date:
Apr 2012
Location:
Louisville, Colorado, USA
Posts:
120
Plugin Contributions:
0

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.

21 Mar 2015, 4:16 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: inscrutable PHP Error 1064 install failure

cyberbaffled:

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..