davenejo Posted February 21, 2007 Share Posted February 21, 2007 I am a newbie and trying to install a script written in php 5.5 on a godaddy linux hosted server. GoDaddy supports: PHP 4.3.11 MySQL 4.0.24 The config.php file is fine, but when I try to run mysite.com/install.php, I get the following error: Query failed: 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 'collate latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENG This is the beginning of the code where I believe it messes up. Can anybody provide some help? How would I need to tweak this so it works on the supported php version? I have tried taking out DEFAULT CHARSET=latin1, but still does not work. The beginning of the code: <? require('config.php'); if(!is_writable('img/')) { echo '<b><li><font color="f55555">ERROR: </b></li> Please chmod the directory img/ to 777</font> '; } $sql="CREATE TABLE `ads` ( `id` mediumint(50) NOT NULL, `code` text collate latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); $sql="CREATE TABLE `category` ( `ID` mediumint(9) NOT NULL auto_increment, `name` text collate latin1_general_ci NOT NULL, `img` text collate latin1_general_ci NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=8"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); $sql="CREATE TABLE `ipban` ( `id` mediumint(9) NOT NULL, `ip` text collate latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/39531-installphp-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.