Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Syntax error when installing add-ons on xampp


Driamer

Recommended Posts

Posted

I am having a problem with MySQL table modifications when installing add-ons on my localhost.

I am using new installation of OsCommerce 2.3.1 and trying to install Headertags SEO add-on (this problem occurs on other add-ons as well), and when i try to import the additional tables into the database via Phpmyadmin i get an error that says

 

CREATE TABLE IF NOT EXISTS headertags_cache(

title
TEXT
,

data TEXT

) TYPE = MYISAM ;

 

 

 

#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 'TYPE=MyISAM' at line 4

 

And when i try use the headertags_seo_install.php file i get an error like this

 

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 'TYPE=MyISAM' at line 1

 

 

 

CREATE TABLE IF NOT EXISTS headertags_cache (title text, data text) TYPE=MyISAM

 

[TEP STOP]

 

When I install these online i have no problems. This only happens with XAMPP.

I am using the newest version of XAMPP and the newest version of Phpmyadmin and I am working with Windows XP.

 

Is there possibly an easy fix for this that does not involve modifying the .php files? Because i would like to keep the files exactly the same on my localhost and domain.

Posted

Newer versions of MySQL may not like the "TYPE =" syntax. Try changing it to "ENGINE =". Are you using MySQL 6 and/or PHP 6 on your system? They are not stable enough. Try to find an installation back on MySQL 5 and PHP 5.

Posted

I am using MySQL 5.5.8 and PHP 5.3.5

 

I tried changing the TYPE syntax to ENGINE and with the .php file i got this message

 

1060 - Duplicate column name 'categories_htc_title_tag'

 

ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;

 

[TEP STOP]

 

With Phpmyadmin i got this message

 

 

ALTER TABLE products_description ADD products_head_title_tag VARCHAR( 80 ) NULL ;#1060 - Duplicate column name 'products_head_title_tag'

 

Phpmyadmin was able to add 4 tables to the database before the error occured.

 

The thing that i am wondering here is why does this work on my domain but not on my localhost.. My domain has MySQL 5.1.51 and PHP 5.3.8 does this make a difference? Or can it be because of the fact that the domain is Linux and my computer is Windows.

Posted

It sounds like you're trying to update the database for an add-on a second time -- you already have those fields in the database! Make sure that you didn't also change the PHP code a second time -- you don't want duplicate functions defined and duplicate in-line code. If you're not sure what the situation is, perhaps you should start over with a fresh set of code and original database, and be careful not to add an add-on more than once. Fix the .sql code to change TYPE to ENGINE before trying to use it (it sounds like that got you further along than before).

Posted

I thought my backup database was taken from a fresh install, but it seems i was wrong :)

 

Now it works perfectly!

 

Thank you very much for your help Phil, you made my life a lot easier.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...