Help on error: Parse error: syntax error, unexpected ':'

Hi – I’m a newbie with php. Can someone help me with the following error. I’d really appreciate it!

Parse error: syntax error, unexpected ':' in /home/oakstateadmin/oakstate.com/globals.php on line 23

[php]<?php
session_start();
$site_env = ‘dev’; // dev or live

if ($site_env == ‘live’ || $site_env == ‘dev’) {
// ini_set(“log_errors”,“On”);
// ini_set(“display_errors”,“Off”);
}
// include config files
require_once ‘config/settings.inc’;
require_once ‘config/database.inc’;
require_once ‘config/data.inc’;
require_once ‘_globals.php’;

$site_url = $site_urls[$site_env];
set_include_path($include_path[$site_env] . ‘/lib/’ . PATH_SEPARATOR . get_include_path());
// set_include_path($include_path[$site_env] . ‘/lib/Barcode/’ . PATH_SEPARATOR . get_include_path());
set_include_path($include_path[$site_env] . ‘lib/Zend/’ . PATH_SEPARATOR . get_include_path());

// require(‘BCGColor.php’);
// require(‘BCGDrawing.php’);
// require(‘BCGpdf417.barcode2d.php’);
require_once ‘Zend/Db.php’;(‘include_path=’/home/farfromclients/oakstate.com/lib/Zend/:/home/farfromclients/oakstate.com//lib/:.:/usr/local/lib/php:/usr/local/php5/lib/pear’);
require_once ‘Zend/Db/Adapter/Pdo/Mysql.php’;
require_once ‘Zend/Db/Table/Abstract.php’;
require_once ‘Zend/Db/Table/Rowset.php’;
require_once ‘Zend/Db/Table/Row.php’;
require_once ‘Zend/Db/Profiler.php’;
//
// require_once ‘Zend/Rest/Server.php’;//
// require_once ‘Zend/Filter/Input.php’;
require_once ‘Zend/Filter/StripTags.php’;
require_once ‘Zend/Registry.php’;
// // require_once ‘Inflect.php’;
// // require_once ‘Zend/Mail.php’;
// // require_once ‘Zend/Date.php’;
// // require_once ‘Zend/Feed.php’;
//
try {
$db = Zend_Db::factory(‘Pdo_Mysql’, $database[$site_env]);
$db->getConnection();
Zend_Registry::set(‘db’, $db);

// if ($site_env == 'local') {
//     $db->getProfiler()->setEnabled(true);
// }

} catch (Zend_Db_Adapter_Exception $e) {
// perhaps a failed login credential, or perhaps the RDBMS is not running
} catch (Zend_Exception $e) {
// perhaps factory() failed to load the specified Adapter class
}
//
//
//
// if (isset($load_models)) {
// foreach ($load_models as $class) {
// $object = camel_case($class);
// $$class = new $object($db);
// }
// }
if (isset($admin)) {
require_once ‘lib/Admin.php’;
$admins = new Admin($db);
// set_include_path($include_path[$site_env] . ‘lib/wideimage/’ . PATH_SEPARATOR . get_include_path());
} else {
require_once ‘lib/News.php’;
$news = new News($db);
require_once ‘lib/NewsArticle.php’;
$news_article = new NewsArticle($db);
require_once ‘lib/SiteContent.php’;
$site_content = new SiteContent($db);
}
// } else {
// require_once ‘lib/User.php’;
// require_once ‘lib/Form.php’;
// $form = new Form;
// }
//
// // set_error_handler(‘errorHandler’);
// //
// // function errorHandler ($errno, $errstr, $errfile, $errline, $errcontext) {
// // $errorstring = “Error in line $errline of file ‘$errfile’.\n”;
// // $errorstring .= “Script: ‘{$_SERVER[‘PHP_SELF’]}’.\n”;
// // mail(‘[email protected]’, ‘ERROR’, $errorstring);
// //
// // }

require_once ‘config/data.inc’;[/php]

require_once ‘Zend/Db.php’;(‘include_path=’/home/farfromclients/oakstate.com/lib/Zend/:/home/farfromclients/oakstate.com//lib/:.:/usr/local/lib/php:/usr/local/php5/lib/pear’);

You can’t use like quotes, which means if you’re outter quotes are single, then anything side has to either be escaped (/’ /’) or double quotes (" "), can’t do (’ ’ ’ ')

escape special chars - like quotes with a backslash , not a forward slash / as Richei posted below :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service