clmurray Posted May 3, 2009 Share Posted May 3, 2009 OK guys...I actually put this post in MySQL help...before i saw the third party script area...i think my question belongs in here...so here goes...im new to the world of php scripts...so be gentle...im sure this is something simple...but here goes. Im trying to install this classified script on godaddy...and i get this error when doing the insert to create the tables and such... php5 host config 2.1 Error SQL query: -- -- Dumping data for table `classifieds` -- INSERT INTO `classifieds` (`adid`, `title`, `description`, `cat`, `price`, `name`, `number`, `email`, `password`, `picture`, `date`, `views`, `authorized`) VALUES (1, 'Alpha Bravo Charlie', 'First Ad Listing. Default Admin Username and Password are User: admin password: password.The management area can be found at /manager/ ', 1, 22, 'Sell Name', '555-555-5555', 'some@email.com', '', 'images/noimage.jpg', '2009-03-04 00:00:00', 66, 1), -- -------------------------------------------------------- -- -- Table structure for table `myuser` -- CREATE TABLE IF NOT EXISTS `myuser` ( `ID` int(10) unsigned NOT NULL auto_increment, `userName` char(50) character set utf8 collate utf8_bin default NULL, `userPass` char(50) character set utf8 collate utf8_bin default NULL, `isAdmin` tinyint(2) NOT NULL default '-1', `userGroup` int(10) unsigned default '1', `sessionID` char(50) collate utf8_unicode_ci default NULL, [...] MySQL said: Documentation #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 'CREATE TABLE IF NOT EXISTS `myuser` ( `ID` int(10) unsigned NOT NULL auto_inc' at line 6 Here is the insert file... -- phpMyAdmin SQL Dump -- version 2.11.9.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 03, 2009 at 04:16 PM -- Server version: 5.0.67 -- PHP Version: 5.2.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `rcoders_classifieds` -- -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE IF NOT EXISTS `categories` ( `id` int(255) NOT NULL auto_increment, `name` text collate utf8_unicode_ci NOT NULL, `sub` int(2) NOT NULL default '0', `parent` int(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=27 ; -- -- Dumping data for table `categories` -- INSERT INTO `categories` (`id`, `name`, `sub`, `parent`) VALUES (1, 'Announcements', 0, 0), (2, 'Bids Wanted', 0, 0), (3, 'Employment', 0, 0), (4, 'Items For Sale', 0, 0), (5, 'Real Estate for Rent', 0, 0), (6, 'Real Estate For Sale', 0, 0), (7, 'Services', 0, 0), (8, 'Garage Sales', 0, 0), (9, 'Found And Free', 0, 0), (10, 'Automobiles', 0, 0), (11, 'Recreational Vehicles', 0, 0), (12, 'Wanted To Buy', 0, 0), (20, 'test', 1, 1), (21, 'test 2', 1, 1), (22, 'test 3', 1, 1), (23, 'test 4', 1, 1), (24, 'test 5', 1, 1), (25, 'test 6', 1, 1), (26, 'test 2 2', 1, 21); -- -------------------------------------------------------- -- -- Table structure for table `classifieds` -- CREATE TABLE IF NOT EXISTS `classifieds` ( `adid` int(255) NOT NULL auto_increment, `title` text collate utf8_unicode_ci NOT NULL, `description` text collate utf8_unicode_ci NOT NULL, `cat` int(10) NOT NULL, `price` int(10) NOT NULL, `name` text collate utf8_unicode_ci NOT NULL, `number` text collate utf8_unicode_ci NOT NULL, `email` text collate utf8_unicode_ci NOT NULL, `password` text collate utf8_unicode_ci NOT NULL, `picture` text collate utf8_unicode_ci NOT NULL, `date` timestamp NOT NULL default CURRENT_TIMESTAMP, `views` int(255) NOT NULL, `authorized` int(10) NOT NULL default '0', PRIMARY KEY (`adid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=83 ; -- -- Dumping data for table `classifieds` -- INSERT INTO `classifieds` (`adid`, `title`, `description`, `cat`, `price`, `name`, `number`, `email`, `password`, `picture`, `date`, `views`, `authorized`) VALUES (1, 'Alpha Bravo Charlie', 'First Ad Listing. Default Admin Username and Password are User: admin password: password.The management area can be found at /manager/ ', 1, 22, 'Sell Name', '555-555-5555', 'some@email.com', '', 'images/noimage.jpg', '2009-03-04 00:00:00', 66, 1), -- -------------------------------------------------------- -- -- Table structure for table `myuser` -- CREATE TABLE IF NOT EXISTS `myuser` ( `ID` int(10) NOT NULL auto_increment, `userName` char(50) character set utf8 collate utf8_bin default NULL, `userPass` char(50) character set utf8 collate utf8_bin default NULL, `isAdmin` tinyint(2) NOT NULL default '-1', `userGroup` int(10) unsigned default '1', `sessionID` char(50) collate utf8_unicode_ci default NULL, `lastLog` datetime default NULL, `userRemark` char(255) collate utf8_unicode_ci default NULL, PRIMARY KEY (`ID`), UNIQUE KEY `userName` (`userName`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Created by the AdminPro Class MySQL Setup ' AUTO_INCREMENT=10 ; -- -- Dumping data for table `myuser` -- INSERT INTO `myuser` (`ID`, `userName`, `userPass`, `isAdmin`, `userGroup`, `sessionID`, `lastLog`, `userRemark`) VALUES (1, 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 1, 1, 'b051fc6f339d333c2ee5ec1c276516fa', '2009-04-03 15:20:44', 'Administrator'), -- -------------------------------------------------------- -- -- Table structure for table `settings` -- CREATE TABLE IF NOT EXISTS `settings` ( `id` int(255) NOT NULL auto_increment, `sitename` text collate utf8_unicode_ci NOT NULL, `keywords` text collate utf8_unicode_ci NOT NULL, `description` text collate utf8_unicode_ci NOT NULL, `block1` text collate utf8_unicode_ci NOT NULL, `block2` text collate utf8_unicode_ci NOT NULL, `block3` text collate utf8_unicode_ci NOT NULL, `block4` text collate utf8_unicode_ci NOT NULL, `block5` text collate utf8_unicode_ci NOT NULL, `block6` text collate utf8_unicode_ci NOT NULL, `block7` text collate utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -- Dumping data for table `settings` -- INSERT INTO `settings` (`id`, `sitename`, `keywords`, `description`, `block1`, `block2`, `block3`, `block4`, `block5`, `block6`, `block7`) VALUES (1, 'Classifieds Ads', 'Classified, Ads', 'Classified Ads Website', '<script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* classifieds-right */\r\ngoogle_ad_slot = "3482043982";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script>', '<script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* classifieds-right */\r\ngoogle_ad_slot = "3482043982";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script>', '<div align="center">\r\n <script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* Classifieds-top */\r\ngoogle_ad_slot = "7819033564";\r\ngoogle_ad_width = 180;\r\ngoogle_ad_height = 150;\r\n//-->\r\n </script>\r\n <script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n </script>\r\n <!-- End: AdBrite -->\r\n </div>', '<div align="center"><script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* Classifieds-sell-page */\r\ngoogle_ad_slot = "1051956347";\r\ngoogle_ad_width = 200;\r\ngoogle_ad_height = 200;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script></div>', '<script type='text/javascript'><!--\r\ngoogle_ad_client = 'pub-5995434485696039';\r\n/* 200x90, class-details-right */\r\ngoogle_ad_slot = '9671201816';\r\ngoogle_ad_width = 200;\r\ngoogle_ad_height = 90;\r\n//-->\r\n</script>\r\n<script type='text/javascript'\r\nsrc='http://pagead2.googlesyndication.com/pagead/show_ads.js'>\r\n</script> ', '<div align="center"><script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* 468x15, class-details-inside */\r\ngoogle_ad_slot = "5876948639";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 15;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script></div>', '<div align="center"><script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* 468x15, class-details-inside */\r\ngoogle_ad_slot = "5876948639";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 15;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script></div>'); Any help would be greatly appreciated!! Quote Link to comment https://forums.phpfreaks.com/topic/156679-solved-php-classifiedssyntax/ Share on other sites More sharing options...
clmurray Posted May 3, 2009 Author Share Posted May 3, 2009 Ok...i got that taken care of...the problem was a mismatch of versions of php...so now it installed all the tables and Ive made the changes to the config files to the database...so now Im getting this... Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/l/o/c/mysitename/html/inc/header.php on line 3 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Any Ideas? Quote Link to comment https://forums.phpfreaks.com/topic/156679-solved-php-classifiedssyntax/#findComment-825093 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 Read rule #13 - http://www.phpfreaks.com/page/forum-rules Quote Link to comment https://forums.phpfreaks.com/topic/156679-solved-php-classifiedssyntax/#findComment-825109 Share on other sites More sharing options...
revraz Posted May 4, 2009 Share Posted May 4, 2009 This is probably a similar issue http://www.phpfreaks.com/forums/index.php/topic,95378.0.html Quote Link to comment https://forums.phpfreaks.com/topic/156679-solved-php-classifiedssyntax/#findComment-825638 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.