Page 1 of 1

Help with parse error

Posted: Sat Mar 04, 2006 4:16 pm
by AlecH
Hello all,

Im in the making of a CMS and I ran into an error in one of my files that I just can't figure out at all. Here is the code.

./includes/global.php

Code: Select all

<?php
/*
+--------------------------------------------------+
| Content Management System
+--------------------------------------------------+
| - Content Removed -
+--------------------------------------------------+
*/
require_once("./includes/config.php")
define("TABLE_PREFIX", $cfg['table_prefix']);
define("IN_MADKERNAL", $cfg['in_madkernal']);
define("MADKERNAL_PATH", $cfg['madkernal_path']);

$madkernal = new madkernal;
$madkernal->loadclasses(1);

$db = new db;
$template = new template;

$db->init($cfg['dbhost'], $cfg['dbuser'], $cfg['dbpass'], $cfg['dbname']);
$template->init("default");
//END
?>
The PHP Error:

Code: Select all

Parse error: parse error in c:\program files\easyphp1-8\www\bullying_cms\includes\global.php on line 13
Line 13 is :
define("TABLE_PREFIX", $cfg['table_prefix']);

Part of the problem here is that my webserver spftware has some kinda setting that limits the error information PHP outputs and its very annoying because I dont get enough information about the problem and I looked int eh php.ini file and found nothing wrong. Anyway, I still cant figure out whats wrong and I can bet on the fact its something simple. It would be great if someone could help me out.

Thanks! :D

Posted: Sat Mar 04, 2006 5:12 pm
by a94060
yo dude,your 14?

Code: Select all

if ($you==14) {
echo 'You are real cool. You represend us 14 yr olds:)';
}

yea man

Posted: Sat Mar 04, 2006 5:32 pm
by mickd
You are missing a ; at the end of

Code: Select all

require_once("./includes/config.php")
normally when theres a error on a certain line, you should also check the line before it as it could be causing the error to happen.

p.s. i used to be 14 :P 15 now and turning 16 soon.

Posted: Sat Mar 04, 2006 5:35 pm
by a94060
o thats pretty cool.i thought i was only 1 of the younger developers(i have not really developed because i need a project to do) i know msot thnigs and i liek interactions with Mysql DB's

Posted: Sun Mar 05, 2006 12:47 pm
by AlecH
Err... I knew it was something stupid like that. Thanks alot! :D

EDIT:
a94060 - contact me on MSN or by email and we can talk. My site has alot of projects in development that I could use your help on. :D