PHP - Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN
<p>while making an install script for my CMS i come across this error: Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN. Yet i do no know why it is doing it now, since it was fine before.</p>

<p>here is the code thats creating the error:</p>

<pre><code>mysql_query("CREATE TABLE IF NOT EXISTS `index_content` (`id` int(11) NOT NULL AUTO_INCREMENT,`heading` text,`paragraph` text, `slug` text, PRIMARY KEY (`id`)) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4") or die(mysql_error());
</code></pre>

<p>here is all the code for the file:</p>

<pre><code> &lt;?
// This is Step 2 in the installation process. Adding the user assignment. And also filling the MySQL Database --
// All php comments start with " // "
// Built by M.REYNOLDS FOR AS IS HOSTING -- NO LICENCE -- GPL USE, NOT GOV.
// VERSION 1.1x Alpha -- Minor Changes to style and functions
// collect the MySQL data from the previous step/
require('../includes/dbconfig.php');

echo "Torque CMS -- INSTALLATION (INSTALLER VERSION: 1.0 Stable)";
echo "Step One - Database Details ---- COMPLETE! &lt;br /&gt;";
echo "Step Two - Installing tables -- IN PROGRESS &lt;br /&gt;";
echo " Please BEWARE, do NOT refresh or close this page, it may look like it has frozen but there is a lot of data. &lt;br /&gt;";
echo "&lt;br /&gt; ";
echo ' ' . 'Creating table "active_guests"...&lt;br /&gt;';
mysql_query(" CREATE TABLE IF NOT EXISTS `active_guests` (`ip` varchar(15) NOT NULL,`timestamp` int(11) unsigned NOT NULL,PRIMARY KEY (`ip`)) ENGINE=MyISAM DEFAULT CHARSET=latin1") or die(mysql_error());
flush();
sleep (5);
echo ' ' . 'Creating table "active_guests"... done&lt;br /&gt;';
echo ' ' . 'Creating table "active_users"...&lt;br /&gt;';
mysql_query(" CREATE TABLE IF NOT EXISTS `active_users` (`username` varchar(30) NOT NULL,`timestamp` int(11) unsigned NOT NULL,PRIMARY KEY (`username`)) ENGINE=MyISAM DEFAULT CHARSET=latin1") or die(mysql_error());
flush();
sleep (5);
echo ' ' . 'Creating table "active_users"...done&lt;br /&gt;';
echo ' ' . 'Creating table "ads"...&lt;br /&gt;';
mysql_query("CREATE TABLE IF NOT EXISTS `ads` (`heading` text,`adcode` text) ENGINE=MyISAM DEFAULT CHARSET=latin1");
mysql_query("INSERT INTO `ads` (`heading`, `adcode`) VALUES ('Advertisements', '')");
flush();
sleep (5);
echo ' ' . 'Creating table "ads...done&lt;br /&gt;';
echo ' ' . 'Creating table "Banned_users...&lt;br /&gt;';
mysql_query("CREATE TABLE IF NOT EXISTS `banned_users` (`username` varchar(30) NOT NULL,`timestamp` int(11) unsigned NOT NULL,PRIMARY KEY (`username`)) ENGINE=MyISAM DEFAULT CHARSET=latin1") or die(mysql_error());
flush();
sleep (5);
echo ' ' . 'Creating table "Banned_users...done&lt;br /&gt;';
echo ' ' . 'Creating table "footer...&lt;br /&gt;';
mysql_query("CREATE TABLE IF NOT EXISTS `footer` (`version` text NOT NULL,`year` text NOT NULL,`sitename` text NOT NULL,`sitehomeurl` text NOT NULL,`template` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1") or die(mysql_error());
flush();
sleep (3);
echo ' ' . 'inserting data into: "footer...&lt;br /&gt;';
mysql_query("INSERT INTO `footer` (`version`, `year`, `sitename`, `sitehomeurl`, `template`) VALUES('Torque CMS V1.1.3', '2013', 'Torque CMS', 'http://asishosting.com', 'Torque blue')") or die(mysql_error());
flush();
sleep (5);
echo ' ' . 'Creating table "footer...done&lt;br /&gt;';
echo ' ' . 'Creating table "index_content...&lt;br /&gt;';
mysql_query("CREATE TABLE IF NOT EXISTS `index_content` (`id` int(11) NOT NULL AUTO_INCREMENT,`heading` text,`paragraph` text, `slug` text, PRIMARY KEY (`id`)) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4") or die(mysql_error());
flush();
sleep (5);
echo ' ' . 'inserting into: "index_content...&lt;br /&gt;';
mysql_query("INSERT INTO `index_content` (`id`, `heading`, `paragraph`, `slug`) VALUES (1, 'Welcome to Torque CMS!', '&lt;p&gt;\r\n   Welcome to the Torque CMS Theme. We are currently in Stable mode and are under constant development by Brayden the CEO of As Is Hosting.&lt;/p&gt;\r\n', 'Torque-CMS-Welcome!'), (2, 'Torque CMS Plugin developments', '&lt;p id='#paragraph'&gt;\r\n   &amp;nbsp;&lt;/p&gt;\r\n&lt;p id='#paragraph'&gt;\r\n   &amp;nbsp;&lt;/p&gt;\r\n&lt;p&gt;\r\n   We are currently in development of a Plugin manager for Torque CMS. All code is welcome as well as coders are being requested for development. contact torque@asishosting.com for more info&lt;/p&gt;\r\n&lt;div&gt;\r\n    &amp;nbsp;&lt;/div&gt;\r\n&lt;p&gt;\r\n &amp;nbsp;&lt;/p&gt;\r\n&lt;p&gt;\r\n   &amp;nbsp;&lt;/p&gt;\r\n&lt;p&gt;\r\n   &amp;nbsp;&lt;/p&gt;\r\n', 'Torque-CMS-Plugin-developments'), (3, 'Torque CMS News', '&lt;p id='#paragraph'&gt;\r\n News:&lt;/p&gt;\r\n&lt;p&gt;\r\n    Dark Pulse Nova now getting upgraded and old theme becoming the face of Torque CMS.&lt;/p&gt;\r\n&lt;p&gt;\r\n  Torque CMS being updated as fast as possible to keep up with broken files.&lt;/p&gt;\r\n', 'Torque-CMS-News')") or die(mysql_error());
flush();
sleep (5);
echo ' ' . 'Creating table "index_content...done&lt;br /&gt;';
echo ' ' . 'Creating table "menu...&lt;br /&gt;';
mysql_query("CREATE TABLE IF NOT EXISTS `menu` (  `id` int(11) NOT NULL AUTO_INCREMENT,`menu2_names` text NOT NULL, `menu2_links` text NOT NULL,`menu2_heading` text NOT NULL,  PRIMARY KEY (`id`)) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4");
flush();
sleep (5);
echo ' ' . 'inserting data into: "menu...&lt;br /&gt;';
mysql_query("INSERT INTO `menu` (`id`, `menu2_names`, `menu2_links`, `menu2_heading`) VALUES(1, 'Custom Link 1', 'http://quickk.tk/1', 'Menu 2'),(2, 'Custom Link 2', 'http://quickk.tk/2', ''),(3, 'Custom Link 3', 'http://quickk.tk/3', '')");
flush();
sleep (5);
echo ' ' . 'Creating table "menu...done &lt;br /&gt;';
echo ' ' . 'Creating table "users... &lt;br /&gt;';
mysql_query("CREATE TABLE IF NOT EXISTS `users` (`username` varchar(30) NOT NULL,`password` varchar(32) DEFAULT NULL,`userid` varchar(32) DEFAULT NULL, `userlevel` tinyint(1) unsigned NOT NULL, `email` varchar(50) DEFAULT NULL, `timestamp` int(11) unsigned NOT NULL, PRIMARY KEY (`username`)) ENGINE=MyISAM DEFAULT CHARSET=latin1");
flush();
sleep (5);
echo 'Creating table "users...done...&lt;br /&gt;&lt;br /&gt;';
echo 'ALL DONE! The MySQL Tables have been created successfully. It is recommended that you delete this install directory before you use Dark Pulse Nova. Please wait, redirecting....';
flush();
sleep (5);
echo '&lt;META HTTP-EQUIV="Refresh" Content="2; URL=../install/index.php?logindet=1"&gt;';
?&gt;
</code></pre>
