Help with parse error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
AlecH
Forum Commoner
Posts: 27
Joined: Fri Feb 24, 2006 4:22 pm
Location: New Hampshire

Help with parse error

Post 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
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post 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
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post 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.
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post 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
AlecH
Forum Commoner
Posts: 27
Joined: Fri Feb 24, 2006 4:22 pm
Location: New Hampshire

Post 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
Post Reply