Forum Moderators: coopster

Message Too Old, No Replies

Help with parse error, unexpected T VARIABLE

PHP sry not sure what version, Yep I'm Newbie!

         

MasterSpanky

3:36 am on Oct 2, 2006 (gmt 0)

10+ Year Member



I am not sure i am in the right place but it sure seems like it to me . So here goes . I am new to php . I have been trying with out much success to setup a php web site . but i have hit an impass and no matter where i have looked i cannot seem to find what the prob is . So i ask those of you who know about php to plz help me . I get this error and no matter what i do to the line i cannot seem to fix it. From what i can it will conect to the database but then gives me the error below. Any help or suggestions would be greatly apreciated . And now for the stupid question of the day as long as i am here . Could this issue be my hosting Co. servers/sites? I did get this working on another hosting Co. site but when i moved to a new host this started up .

Thanks in advance for any help!
MasterSpanky

Parse error: parse error, unexpected T_VARIABLE in c:\hosting\webhost4life\member\MasterSpanky\config.php on line 38

This is line 38
$levelreset= "380"; //Level reset character

<?php
error_reporting(E_ALL ^E_NOTICE ^E_WARNING);
if (extension_loaded('gd'))
{echo("");}
else{Die("Loading php_gd2.dll Falied! <br>Please Enable php_gd2.dll in ur php.ini");}
if (extension_loaded('mssql'))
{echo("");}
else{Die("Loading php_mssql.dll Falied! <br>Please Enable php_mssql.dll in ur php.ini");}

//=============IP AND LOGIN SETTINGS OF SQL SERVER==============
// Enter the IP or DSN of the database server to connect to
$databsehost = "";

// Enter database name
$databasename = "";

// Enter the username to connect to the db, default is sa
$databaseuser = "";

// Enter the password for your SQL Server
$databasepassword = "";

// Host. IP If working remotely, usually 127.0.0.1 works
$localhost = "";

"User Id=?;Password=?;Initial Catalog=?;"

//============END OF IP AND LOGIN SETTINGS OF SQL SERVER ========

//-------------------------------------


$levelreset= "380"; //Level reset character

$resetlimit= "999"; //Reset Limit

//------------------------------------
//Reset Mode:
$resetmode= "reset"; //keep - Keep Stats
//reset - Reset Stats
//------------------------------------

$resetpoints='200'; //Bouns levelup points for reset

//-----------------------------------------------------------
//Bonus leveup points mode:
$levelupmode= "extra"; //normal - Give normal bonus levelup points
//extra - Give bonus levelup points * Resets
//-----------------------------------------------------------

//===============WEBSITE SETTINGS====================

//Castel siege time
$castlesiege="N/A";

//15 is max top characters (put what number you want,default 15)
//Characters

$top='15';

//Server name
$servername= "MuWeb 0.4";

//Server version
$serverversion= "1.01E+";

//Server experience
$serverexp= "5000X";

//Server drop
$serverdrop= "50%";

//Server conect port
$serverport= "44405";

$portgs = "55901";

//Website title
$title= "MuWeb 0.4";

//Zen required for clear pk
$clearpkzen= "3000000";


//Zen required for reset character
$resetzen= "10000000";


//Downloads client link
$downloadclient= "http://client link";

//Downloads launcher link
$downloadlauncher= "http://launcher link";

//Downloads patch link
$downloadpatch= "http://patch link";

//Forum link
$forumlink= "http://127.0.0.1/forum";

//===================================GALLERY=============================================
//All images go to modules/gallery
//Gallery images directory

//1
$gallerypic1directory='smallDK_1024.jpg';
//2
$gallerypic2directory='smallDK_1024.jpg';
//3
$gallerypic3directory='smallDW_1024.jpg';
//4
$gallerypic4directory='smallFE_1024.jpg';
//5
$gallerypic5directory='smallType-01.jpg';
//6
$gallerypic6directory='smallType-03.jpg';
//7
$gallerypic7directory='smallType-04.jpg';
//8
$gallerypic8directory='Type-02.jpg';
//9
$gallerypic9directory='Type-05.jpg';
//10
$gallerypic10directory='1.jpg';
//11
$gallerypic11directory='2.jpg';
//12
$gallerypic12directory='3.jpg';
//13
$gallerypic13directory='4.jpg';
//14
$gallerypic14directory='5.jpg';
//15
$gallerypic15directory='6.jpg';
//16
$gallerypic16directory='7.jpg';
//17
$gallerypic17directory='8.jpg';
//18
$gallerypic18directory='9.jpg';

//Description of images
//1
$description1='image1';
//2
$description2='image2';
//3
$description3='image3';
//4
$description4='image4';
//5
$description5='image5';
//6
$description6='image6';
//7
$description7='image7';
//8
$description8='image8';
//9
$description9='image9';
//10
$description10='image10';
//11
$description11='image11';
//12
$description12='image12';
//13
$description13='image13';
//14
$description14='image14';
//15
$description15='image15';
//16
$description16='image16';
//17
$description17='image17';
//18
$description18='image18';

//=========================================END GALLERY====================================


//****************************************************DONT EDIT HERE*********************************************************

//=============== NOT EDITABLE AREA ====================
// DEFAULT SETTINGS DO NOT CHANGE
$popup="<A HREF=javascript:popitup('modules/gallery/";
$popup2="')>";
$image="<img src=modules/gallery/";
$image2=" WIDTH='160' BORDER='0' HEIGHT='120'>";
$database = 'muonline';
$regsubmit = "regform.submit()";
$msconnect=mssql_connect("$localhost","$databaseuser","$databsepassword");
if ($msconnect <= 0){die ("Connection with database failed!<br> Please check if user and password are ok.");exit();}
$msdb=mssql_select_db("$database",$msconnect);
//========================END===========================

?>

[edited by: MasterSpanky at 3:38 am (utc) on Oct. 2, 2006]

eelixduppy

4:20 am on Oct 2, 2006 (gmt 0)



Welcome to WebmasterWorld!

What's this line?:


"User Id=?;Password=?;Initial Catalog=?;"

This is probably where your error lies. Comment this out.

Good luck!

MasterSpanky

2:35 am on Oct 3, 2006 (gmt 0)

10+ Year Member



Thank you for the Welcome!

Welcome to WebmasterWorld!
What's this line?:
"User Id=?;Password=?;Initial Catalog=?;"
This is probably where your error lies. Comment this out.

The answer to your question is :: that it is from my hosting co with out that info i cannot connect to the database . The error is please check user name and password if that is not i there no matter how i set it up . I can remove all the info above that and still conect to the database . I have done so . But with out that line i cannot conect . That is why i asked if it could be my hosting comp. I did not have to add anything like that to access my databases before i started useing this new host . I do not want to just start pointing fingers with my limited knowlage of PHP .

Is there a way to edit the top of this so that it will read what that bottum line says but in easch seperate line? User name D/B name and all? Think that might fix the prob?

// Enter the IP or DSN of the database server to connect to
$databsehost = "";
// Enter database name
$databasename = "";
// Enter the username to connect to the db, default is sa
$databaseuser = "";
// Enter the password for your SQL Server
$databasepassword = "";
// Host. IP If working remotely, usually 127.0.0.1 works
$localhost = "";
"User Id=?;Password=?;Initial Catalog=?;"

Thank you for your Help .
I have started to reading PHP for dummies .
Its a big book gonna take a while to read this one .

eelixduppy

8:58 pm on Oct 3, 2006 (gmt 0)



I have not seen this before from any hosting company. Maybe you should talk to your host about this first to see what they think.

MasterSpanky

10:07 pm on Oct 3, 2006 (gmt 0)

10+ Year Member



I will talk to my hosting Co about this issue . When i have a firm answer from them i will post it here if i get a good strong answer as to what the prob is . I will post it just so that we can all have this info on hand for future use . Maybe it will help some one else who may have a similar issue in the future .

eelixduppy
I thank you for your time and your help!

SALUTE!

MasterSpanky

12:10 am on Oct 6, 2006 (gmt 0)

10+ Year Member



I am still waiting for an answer from my host . I shall return once we/i have figured out whats going on.

Matt72

1:44 am on Oct 6, 2006 (gmt 0)

10+ Year Member



Yuo can leave that line (although it is a bizarre line to have in there), just put a ';' on the line beneath it.

// Host. IP If working remotely, usually 127.0.0.1 works
$localhost = "";
"User Id=?;Password=?;Initial Catalog=?;"
;

Should fix it.

MasterSpanky

3:24 am on Oct 6, 2006 (gmt 0)

10+ Year Member



I will give that a try thanks . I'll be back to let you know how it goes .