Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 PServer - Discussions / Questions
You last visited: Today at 12:37

  • Please register to post and access all features, it's quick, easy and FREE!


[HELP] Parse error: parse error in C:\wamp\www\co\config.php on line 140

Discussion on [HELP] Parse error: parse error in C:\wamp\www\co\config.php on line 140 within the CO2 PServer - Discussions / Questions forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2010
Posts: 36
Received Thanks: 8
[HELP] Parse error: parse error in C:\wamp\www\co\config.php on line 140

Im getting this error when i try to go to my reg page:
Code:
Parse error: parse error in C:\wamp\www\co\config.php on line 140
It says that ^

Here is the code:
Code:
<?php
	// Configurations
	$myhost='localhost';   // MySQL database address   //  :33006
	$mypass='test'; 		   // MySQL server login
	$myuser='test'; 		   // MySQL server pass
	
	$accdb='zf';         //your server account database
	//$accdb='account_zf';   //your server account database
	$gamedb='zf';			    //your server game database
	
	$pageTitle='Conquer Online 2 restricted test server';        // page title if u wanna use it
	
	//register.php pass.php    //HOWEVER I suggest if u rly meant it seriously about doing the proper server
	  // to 1. use changed server and at least md5 pass of users and 2. use crypted ways for register and pass ... etc
	  //   do it in pro way OR get out of my SIGHT !
	$passhash=false;        // set to true if u wish to save (md5)hash of pass instead of plain text pass
  $requireCAPTCHA=false;  //set true if u want check for robot/human registration
  $chPass=true;    //  how much info demand from user if he wanna change his password
                //  false ownerID    true ownerID + reply
  // as for edits or way that those files are done well I hate this sort of work myself so sry for that mess
  
  //status.php
  $serveraddress='88.67.213.73'; 	//your server ip
	$serverport=5816;		//your server connection port
	$servername='Eternity'; 	//your server name
	
	//ranks.php
	$tableSet=' width="440" border="1" align="center"';  // rank tables settings html code
	$limit=33;   //records[lines/rows] limit for ranks table
	$limit2=13;  //records[lines/rows] limit for half of an rank table guilds
	$longProfNames=false;   //longnames(true) means full proffesion name, set false to disable and use the old fasion way
	
	
	//  DON'T CHANGE ANYTHING BELOW THIS LINE
	//   //    //    //    //    //    //    //    //    //    //    //   //    //    //    //    //    //    //    //
  //      even more if u dont know what u r doing !!!
	$MySQL=mysql_connect($myhost,$myuser,$mypass);
	mysql_select_db($gamedb);
	if ($requireCAPTCHA) require_once './inc/class.captcha.php';
	
	//if (!isset($fileSent))  $fileSent=true;
	if (!isset($_GET['download']))  $fileSent=false;
	else $fileSent=true;
	
	// mainly ranks.php ...
  function prof ($val) { //params> int_proffesion   returns>string_proffesion  //made for prof and old_prof
    global $longProfNames;
    
    $prof=Array ( 10=>'InternTrojan', 11=>'Trojan',
      12=>'VeteranTrojan', 13=>'TigerTrojan', 14=>'DragonTrojan', 15=>'TrojanMaster', 
      20=>'InternWarrior', 21=>'Warrior', 22=>'BrassWarrior', 23=>'SilverWarrior', 24=>'GoldWarrior', 25=>'WarriorMaster', 
      40=>'InternArcher', 41=>'Archer', 42=>'EagleArcher', 43=>'TigerArcher', 44=>'DragonArcher', 45=>'ArcherMaster',
      100=>'InternTaoist', 101=>'Taoist', 112=>'MetalTaoist', 113=>'MetalWizard', 114=>'MetalMaster', 115=>'MetalSaint',
      122=>'WoodTaoist', 123=>'WoodWizard', 124=>'WoodMaster', 125=>'WoodSaint',
      132=>'WaterTaoist', 133=>'WaterWizard', 134=>'WaterMaster', 135=>'WaterSaint', 
      142=>'FireTaoist', 143=>'FireWizard', 144=>'FireMaster', 145=>'FireSaint',
      152=>'EarthTaoist', 153=>'EarthWizard', 154=>'EarthMaster', 155=>'EarthSaint', 
      190=>'InternTaoist', 191=>'Taosit', 192=>'GeneralTaoist', 193=>'Wizard', 194=>'Master', 195=>'Saint', 
      30=>'Knight' );
    
    if (!$longProfNames) {
      if ($val>9 && $val<16)  return 'Trojan';
      if ($val>19 && $val<26) return 'Warrior';
      if ($val>39 && $val<46) return 'Archer';
      if ($val>99 && $val<102)  return 'Taolist';
      if ($val>131 && $val<136) return 'Water';
      if ($val>141 && $val<146) return 'Fire';
      if ($val>0) return 'E> Taolist??';
      }
    
  	//return (Empty($val) ? '' : 'Error'); //  when old prof is not set print nothing in table
  	return (Empty($val) ? '' : (isset($prof[$val]) ? $prof[$val] : 'Error'));
  	}
  function pk ($val) {  //params> int_pk   returns>string_PKpoints
    if ($val>=1000) return '<font color="black"><b><u>'.$val.'</u></b></font>';
    if ($val>=100) return '<font color="black"><b>'.$val.'</b></font>';    //  <font color="darkgreen">
    if ($val>=30 && $val<100)  return '<font color="red">'.$val.'</font>';
    
    return $val;  //I know ... lets say ... STANDART dot
    }
  function noble ($val,$cash) {  //params> int_nobleNr. int_donated   returns>string_nobleRank
    if ($val<4) return 'King/Queen';
    if ($val<16) return 'Prince';
    if ($val<51)  return 'Duke';
    
    if ($cash>200000000)  return 'Earl';
    if ($cash>100000000)  return 'Baron';
    if ($cash>30000000)   return 'Knight';
    
    return 'Error';  //I know ... lets say ... STANDART dot
    }

/*
<script type="text/javascript"> 
function toggle(a,b) { 
a = document.getElementById(a); 
b = document.getElementById(b); 
var display = a.style.display ? '' : 'none'; 
a.style.display = display; 
var displaydva = a.style.display ? 'block' : 'none'; 
b.style.display = displaydva; 
} 
</script> 
<script type="text/javascript"> function Rshow(o) {
          var a = document.getElementByID('b'+o+'');
          a.style.display='none';
          document.getElementByID('row'+o+'').style.display='block';
          }
        function Rhide(o) {
          document.getElementByID('b'+o+'').style.display='block';
          var a = document.getElementByID('row'+o+'');
          a.style.display='none';
          } </script>
*/
	if (!$fileSent) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome To Ghosts Conquer OnLine private Server</title>
<script type="text/javascript" src="./inc/md5.js"></script>
<!-- Created by <someone> @ webyt.net -->
<link href="default.css" rel="stylesheet" type="text/css" />

</head><body>
<script type="text/javascript"> 
function todd(a,b) { 
a = document.getElementById('row' + a + b); 
//var display = a.style.display ? '' : 'none'; 
//a.style.display = display; 
a.style.display='block'; 
} 
</script> 

<?
    }
?>
How can I fix this?



Vultix is offline  
Old 01/23/2010, 17:12   #2
 
elite*gold: 0
Join Date: Oct 2007
Posts: 181
Received Thanks: 68
Could you just post line 140.


Sion~ is offline  
Old 01/23/2010, 17:15   #3
 
elite*gold: 0
Join Date: Jan 2010
Posts: 36
Received Thanks: 8
There is nothing on line 140, thats the thing. What do i do to fix it?

#edit
Line 140 is after the last:
Quote:
?>
Vultix is offline  
Old 01/23/2010, 20:01   #4
 
elite*gold: 0
Join Date: Oct 2007
Posts: 181
Received Thanks: 68
It's not connecting to the database. You may have specified incorrect information or have a pretty strict firewall.

Then again its a parse error: so it could possibly be your code is trying to parse a string into another primitive data type; such as an int.

I'm not 100% sure but proofread your code for errors.


Sion~ is offline  
Old 03/14/2010, 17:30   #5
 
elite*gold: 0
Join Date: Aug 2007
Posts: 180
Received Thanks: 158
Quote:
Originally Posted by Vultix View Post
Im getting this error when i try to go to my reg page:
Code:
Parse error: parse error in C:\wamp\www\co\config.php on line 140
Code:
......
<?
    }
?>
How can I fix this?
pretty old thing u got here.
Its known and easy to fix. You know I was trying to make it user friendly but on my system I have usually kind of tuned up php(configured, including short opentag), but I was doing my best expecting everyone else isn't. however, before uploading I overlooked missing php easily .... so fix

so on 3rd line from end of the file replace <? with <?php

I found this by accident while fooling around with google search lol.
galdik is offline  
Old 03/14/2010, 23:23   #6
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 59
im pretty sure that code is for the binary server setup.
so a. if your trying to get it to work for a 5095 / 5165 it wont
u can get it to work with a 5095 but you will need to mod it a little
and if it is for a binary server that you have
the error looks to be this :33006
im sure its 3306 or something on them lines idk tho.
also on line 140 if the error is there unless you know what your doing i wouldnt
play around in there tbh.


LegalConquer is offline  
Reply



« [Question]Is it possbile to make 5165 load accs, ranks, characters From mysql ? | ERORR.. »

Similar Threads
AutoIt - Unable to parse line
05/22/2010 - AutoIt - 3 Replies
Hallo leute, ich hab da ne problem mit auto it undzwar, den error unable to parse line. Ich hat mir ne paar tutorials angeschaut und ein wenig mit auto it rum gespielt. Hab mir jetzt ne bot gebastelt der Fragen stellt und antwortet, und hab in der Seite dieses Kastens noch eine Spieleseite angegeben aus Spaß, sodass man darüber online spiele Spilene kann, und hab die Adresse dort so eingeben $FENSTERURL = FileRead (Spele.nl - De leukste spelletjes site van Nederland!) Nur beim complien kommt...
Firefox - Parse Error?
04/09/2010 - Technical Support - 5 Replies
Hi, dieser Fehler hier kommt jedesmal wenn ich mit meinem Firefox (Shiretoko) nen Beitrag hier im Forum öffne, alle anderen Seiten funktionieren problemlos. Das Problem tritt erst seit gut einer Stunde auf und auch nur mit diesem Browser, gestern Nacht war alles noch in Ordnung. Naja, aus dem Code geht ja wohl deutlich hervor, das er den Html (oder besser PHP) Code nicht parsen kann. Da stellt sich natürlich die Frage: Warum? Wurde was am SourceCode verändert?
[Hilfe]Parse error: syntax error
10/27/2009 - Metin2 Private Server - 6 Replies
Also hab IS -Script per xampp on und beim einloggen kommt der fehler hier Parse error: syntax error, unexpected $end in C:\xampp\htdocs\default1.php on line 875 Help pls Thx Freaky
[Help] Wamp error or mysql error
09/27/2009 - EO PServer Hosting - 1 Replies
Notice: Undefined variable: myaccount in C:\wamp\www\pages\register.php on line 17 Warning: mysql_select_db() : Connecting to 3.22, 3.23 & 4.0 is not supported. Server is 4.0.18-nt in C:\wamp\www\pages\register.php on line 17 Warning: mysql_select_db() : Connecting to 3.22, 3.23 & 4.0 servers is not supported in C:\wamp\www\pages\register.php on line 17 Warning: mysql_select_db() : A link to the server could not be established in C:\wamp\www\pages\register.php on line 17 Warning:...
[Funpic]Parse error: ?
09/07/2009 - Main - 2 Replies
Parse error: syntax error, unexpected T_STRING in /usr/export/www/vhosts/funnetwork/hosting/miml/Main.htm on line 2 was soll das <.< ich will ne hp machen wo nur mit musik zu tun haben wird ok ein backlink zu pvpers wird sein aber wieso kann ich es nicht öffnen ich hab alles mit html gemacht <.< bitte um Hilfe sorry falls es falsche section ist Link: http://miml.mi.funpic.de/Main.htm



All times are GMT +2. The time now is 12:37.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 3KeUpz52VCbhmLwuwydqxu6U1xsgbT8YT5
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.