Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2011, 08:41 AM
Grebbin
Sarnak
 
Join Date: Apr 2011
Posts: 32
Default Peq character mover...

Has anyone had luck getting the peq character mover (the source is available for downpoad under their tools section) working on a windows machine? I have a website and I'd love to implement tools like the stuck character mover and magello for my server, but my .php script is having trouble connecting to my mysql peq database. I think I may have to change some mysql settings to allow remote access from a website. I'm a complete newb as far as mysql and In my researchI have seen things about IP binding, but most of the solutions involve editing the my.cfg file which is only in the linnux version. If anyone has internet .php scripts accessing their windows mysql database, let me know! Thanks!
Reply With Quote
  #2  
Old 04-19-2011, 09:43 AM
Grebbin
Sarnak
 
Join Date: Apr 2011
Posts: 32
Default error message...

This is the error message I get from my .php script:

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 113 in /home/gnideo5/public_html/PEQ-Char-Move.php on line 51
Lost connection to MySQL server at 'reading initial communication packet', system error: 113
Reply With Quote
  #3  
Old 04-19-2011, 09:44 AM
Grebbin
Sarnak
 
Join Date: Apr 2011
Posts: 32
Default This is the script I'm trying to run...

<?php
if (!ISSET($_POST['action'])) {
?>
<FORM ACTION="PEQ-Char-Move.php?action=process" METHOD="post">
<table width='300' cellpadding='0' cellspacing='2' border='0' align='center' >
<tr>
</tr>
<tr>
<td colspan=2>&nbsp </td>
</tr>
<tr>
<td colspan=2><INPUT TYPE="hidden" NAME="s_id" value=<?php echo "\"".session_id()."\""; ?>></td>
</tr>
<tr>
<td colspan=2><INPUT TYPE="hidden" NAME="action" value="process"></td>
</tr>
<tr>
<td><b><font size="-1">LoginServer Username: </font></b></td>
<td><font color="#000080"><INPUT TYPE="text" NAME="lsusername" ></font></td>
</tr>
<tr>
<td><b><font size="-1">Character Name: </font></b></td>
<td><font color="#000080"><INPUT TYPE="text" NAME="charname" ></font></td>
</tr>
<tr>
<td colspan=2>&nbsp </td>
</tr>
<tr>
<td colspan='2' align='center'><INPUT TYPE="submit" NAME="SUBMIT" VALUE="Next..."></td>
</tr>
</table>
</form>
<?php
} else {
if ($_POST['action'] == 'process') {
if (session_id() != $_POST['s_id']) {
echo "Session IDs do not match! Aborting...";
echo "<a href=\"PEQ-Char-Move.php\">Go back</a>";
exit;
}
$lsusername = $_POST['lsusername'];
$charname = $_POST['charname'];
$zonename = "nexus";

$mhost = '192.168.1.107';
$muser = 'root';
$mpass = 'XXXXX';
$mdb = 'peq';

// Connects to database
$link = mysql_connect($mhost, $muser, $mpass) or die (mysql_error());
mysql_select_db($mdb, $link) or die (mysql_error());

###Character Query###
$query = "SELECT account_id,name FROM character_ WHERE name='$charname'";
$cresult = mysql_query($query);
if (mysql_num_rows($cresult) != 1) {
echo "Character Name Incorrect! Aborting...";
echo "<a href=\"PEQ-Char-Move.php\">Go back</a>";
} else {
while ($char = mysql_fetch_array($cresult)) {
$account_id = $char['account_id'];
$ccharname = $char['name'];

###LoginServer Query###
$query2 = "SELECT id,name FROM account WHERE id='$account_id'";
$lsresult = mysql_query($query2);
if (mysql_num_rows($lsresult) != 1) {
echo "LoginServer Data Incorrect! Aborting...";
echo "<a href=\"PEQ-Char-Move.php\">Go back</a>";
} else {
while ($ls = mysql_fetch_array($lsresult)) {
$id = $ls['id'];
$lsname = $ls['name'];

###Zone Query###
$query3 = "SELECT * FROM zone WHERE short_name like '$zonename'";
$zresult = mysql_query($query3);
if (mysql_num_rows($zresult) != 1) {
echo "Zone Data Incorrect! Aborting...";
echo "<a href=\"PEQ-Char-Move.php\">Go back</a>";
} else {
while ($zid = mysql_fetch_array($zresult)) {
$short_name = $zid['short_name'];
$long_name = $zid['long_name'];
$zoneidnumber = $zid['zoneidnumber'];

if ($lsusername != $lsname) {
echo "Incorrect, this has been logged! Aborting...";
echo "<a href=\"PEQ-Char-Move.php\">Go back</a>";




} else {
?>
<FORM ACTION="?action=postdata" METHOD="post">
<table width='300' cellpadding='0' cellspacing='2' border='0' align='center'>
<tr bgcolor="#006600">
<td colspan=2 align="center">
<font size="+2" color='#ffffff'><b>STEP 2 OF 3</B></font>
</td>
</tr>
<tr>
<td colspan=2><INPUT TYPE="hidden" NAME="s_id" value=<?php echo "\"".session_id()."\""; ?>></td>
</tr>
<tr>
<td colspan=2><INPUT TYPE="hidden" NAME="action" value="postdata"></td>
</tr>
<tr>
<td colspan=2>&nbsp </td>
</tr>
<tr>
<td colspan=2>
<INPUT TYPE="hidden" NAME="lsusername" value=<?php echo "\"".$lsusername."\""; ?>>
<INPUT TYPE="hidden" NAME="charname" value=<?php echo "\"".$charname."\""; ?>>
<INPUT TYPE="hidden" NAME="zoneid" value=<?php echo "\"".$zoneidnumber."\""; ?>>
</td>
</tr>
<tr>
<td><b>LoginServer Name: </b></td>
<td>Confirmed: <? echo $lsname; ?></td>
</tr>
<tr>
<td><b>Character Name: </b></td>
<td>Confirmed: <? echo $ccharname; ?></td>
</tr>
<tr>
<td><b>Zone Name: </b></td>
<td>Confirmed Zone: <? echo $zonename; ?>, <? echo $long_name; ?></td>
</tr>
<tr>
<td colspan=2><input type=submit value="DO IT!"></td>
</tr>
</table>
</form>
</center>
<?php
}}}
}
}
}
} // end step 2
} else {
if (session_id() != $_POST['s_id']) {
echo "Session IDs do not match! Aborting...";
echo "<a href=\"upload.php\">Go back</a>";
exit;
}
$lsusername = $_POST['lsusername'];
$charname = $_POST['charname'];
$zoneid = 152;
$zone = "nexus";

$mhost = '192.168.1.107';
$muser = 'root';
$mpass = 'firiona';
$mdb = 'peq';


// Connects to database
$link = mysql_connect($mhost, $muser, $mpass) or die (mysql_error());
mysql_select_db($mdb, $link) or die (mysql_error());
$query = "UPDATE character_ SET zonename='$zone',zoneid=$zoneid,x=-1,y=-1,z=-1 WHERE name='$charname'";
$result = mysql_query($query);
if (!$result) {
echo "Update Error";
echo "<a href=\"PEQ-Char-Move.php\">Go back</a>";
exit;
}


?>
<table width='300' cellpadding='0' cellspacing='2' border='0' align='center'>
<tr>
<td colspan=2 bgcolor='#006600' align="center">
<font size="+2" color='ffffff'><b> STEP 3 OF 3</B></font>
</td>
</tr>
<tr>
<td> <?echo $charname; ?> has been moved to <? echo $zone; ?></td>
</tr>
</table>
<a href="http://www.projecteq.net">Back</a> to Projecteq.net
<?php
}
}
?>

Last edited by trevius; 04-19-2011 at 09:56 AM..
Reply With Quote
  #4  
Old 04-19-2011, 10:06 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

the character browser (aka Magelo) works fine on a windows machine and includes a character moving tool.

never tried to load the PEQ mover.
Reply With Quote
  #5  
Old 04-22-2011, 09:57 PM
Grebbin
Sarnak
 
Join Date: Apr 2011
Posts: 32
Default Hmmm.

I tried installing the pew character mover and magelo clone to my website and spent a lot of time trying to get it to connect via the php script online to my sql database on the local machine. Still can't get it to work. I think it has something to do with the settings used on mysql to allow remote connections and permissions to ise the database. I find some info on allowing remote access, but most of the info I have found pertains to running an sql database on linnux. Oh well. If I ever figure it out I may write a guide.
Reply With Quote
Reply


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

Forum Jump

   

All times are GMT -4. The time now is 02:40 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3