Reply
unexpected T_CONSTANT_ENCAPSED_STRING
Old 11-17-2007, 04:34 AM unexpected T_CONSTANT_ENCAPSED_STRING
Junior Talker

Posts: 2
hey
i am getting this message.


Code:
Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/adam07/public_html/forum/alice/src/admin/dbprefs.php on line 51
The code is

Code:
<?php

/*
    Program E
    Copyright 2002, Paul Rydell
    
    This file is part of Program E.
    
    Program E is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Program E is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Program E; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

//Disable Error Reporting Since this code needs alot of work to become completely clean and error free under stict php setups.
//error_reporting(0);

# Turn this off in case people have it on.
set_magic_quotes_runtime(0);

# Can't turn off magic quotes gpc so just redo what it did if it is on.
if (get_magic_quotes_gpc()) {
    foreach($_GET as $k=>$v)
        $_GET[$k] = stripslashes($v);
    foreach($_POST as $k=>$v)
        $_POST[$k] = stripslashes($v);
    foreach($_COOKIE as $k=>$v)
        $_COOKIE[$k] = stripslashes($v);
}


define("LOOPINGERRORMSG", "Oops. I wasn't paying attention. Tell me again what is going on.");
define("LOOPINGLIMIT",75); // -1 for no limit
define("RANDOMCHANCECLEAN",200); // -1 to never check
define("MINUTESTOKEEPDATA",300); // -1 to keep forever

# This is where all the AIML and startup.xml resides
$rootdir= "http://www.virtualchat.ej.am/forum/alice/aiml/";

require('http://www.virtualchat.ej.am/forum/includes/config.php');

$DB_HOST=$config['MasterServer']['servername'] "localhost";
$DB_UNAME=$config['MasterServer']['username'] "adam07_chat";
$DB_PWORD=$config['MasterServer']['password'] "liverpool21";
$DB_DB=$config['Database']['dbname'] "adam07_vitrual";

$boterrors="";
mysql_connect($DB_HOST,$DB_UNAME,$DB_PWORD) or $boterrors = $boterrors . "Could not connect to database.\n"; 
@mysql_select_db($DB_DB) or $boterrors = $boterrors . "Unable to select database\n";
?>
I cant figure out the problem so could someone help me,thanks
adamlaher is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 11-17-2007, 06:33 AM Re: unexpected T_CONSTANT_ENCAPSED_STRING
Foundationflash's Avatar
Ultra Talker

Posts: 411
Name: Harry Burt
Location: Colchester, Essex, England
I think your problem comes on these line:
PHP Code:
$DB_HOST=$config['MasterServer']['servername'"localhost";
$DB_UNAME=$config['MasterServer']['username'"adam07_chat";
$DB_PWORD=$config['MasterServer']['password'"liverpool21";
$DB_DB=$config['Database']['dbname'"adam07_vitrual"
I'm thinking maybe you mean:
PHP Code:
$DB_HOST=$config['MasterServer']['servername'] = "localhost";
$DB_UNAME=$config['MasterServer']['username'] = "adam07_chat";
$DB_PWORD=$config['MasterServer']['password'] = "liverpool21";
$DB_DB=$config['Database']['dbname'] = "adam07_vitrual"
__________________
Foundation Flash tutorials : www.foundation-flash.com

New Dreamed Up Web Design: www.dreamedupdesign.com
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Old 11-17-2007, 11:12 AM Re: unexpected T_CONSTANT_ENCAPSED_STRING
Junior Talker

Posts: 2
when i did what u said,this is what is said

Code:
Warning:  require() [function.require on line ]: URL file-access is disabled in the server configuration in /home/adam07/public_html/forum/alice/src/admin/dbprefs.php49

Warning:  require(http://www.virtualchat.ej.am/forum/includes/config.php) [function.require on line ]: failed to open stream: no suitable wrapper could be found in /home/adam07/public_html/forum/alice/src/admin/dbprefs.php49

Fatal error:  require() [function.require on line ]: Failed opening required 'http://www.virtualchat.ej.am/forum/includes/config.php' (include_path='.:/software/php/lib/php') in /home/adam07/public_html/forum/alice/src/admin/dbprefs.php49
i did this when you told me to add that

Code:
<?php

/*
    Program E
    Copyright 2002, Paul Rydell
    
    This file is part of Program E.
    
    Program E is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Program E is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Program E; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

//Disable Error Reporting Since this code needs alot of work to become completely clean and error free under stict php setups.
//error_reporting(0);

# Turn this off in case people have it on.
set_magic_quotes_runtime(0);

# Can't turn off magic quotes gpc so just redo what it did if it is on.
if (get_magic_quotes_gpc()) {
    foreach($_GET as $k=>$v)
        $_GET[$k] = stripslashes($v);
    foreach($_POST as $k=>$v)
        $_POST[$k] = stripslashes($v);
    foreach($_COOKIE as $k=>$v)
        $_COOKIE[$k] = stripslashes($v);
}


define("LOOPINGERRORMSG", "Oops. I wasn't paying attention. Tell me again what is going on.");
define("LOOPINGLIMIT",75); // -1 for no limit
define("RANDOMCHANCECLEAN",200); // -1 to never check
define("MINUTESTOKEEPDATA",300); // -1 to keep forever

# This is where all the AIML and startup.xml resides
$rootdir= "http://www.virtualchat.ej.am/forum/alice/aiml/";

require('http://www.virtualchat.ej.am/forum/includes/config.php');

$DB_HOST=$config['MasterServer']['servername']="localhost";
$DB_UNAME=$config['MasterServer']['username']="adam07_chat";
$DB_PWORD=$config['MasterServer']['password']="liverpool21";
$DB_DB=$config['Database']['dbname']="adam07_vitrual";  

$boterrors="";
mysql_connect($DB_HOST,$DB_UNAME,$DB_PWORD) or $boterrors = $boterrors . "Could not connect to database.\n"; 
@mysql_select_db($DB_DB) or $boterrors = $boterrors . "Unable to select database\n";
adamlaher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to unexpected T_CONSTANT_ENCAPSED_STRING
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11473 seconds with 12 queries