Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Posts: 2
Trades: 0
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
 
 
Register now for full access!
Old 11-17-2007, 06:33 AM Re: unexpected T_CONSTANT_ENCAPSED_STRING
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
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 :
Please login or register to view this content. Registration is FREE


New Dreamed Up Web Design:
Please login or register to view this content. Registration is FREE
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
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.14272 seconds with 12 queries