Jump to content

Recommended Posts

Ok, I have a web site that was once functional, but now nothing works.

Most of links only refresh the main page, with the exception of the direct links which lead to their respective "placements".

I host my own site using WAMP5, I also recently switched from XP to Vista.

I gave my USB HDD that held this site, to a friend who is going to host it on his "Dedicated" Linux box.

When I received the HDD back, this was the outcome.

 

This is what it was like before.

web2so3.th.jpg

 

This is the page now.

web1ch0.th.jpg

 

Web Address

 

WAMP Info:

WampServer 2.0 [11/21/2007]

Includes :

- Apache 2.2.6

- MySQL 5.0.45

- PHP 5.2.5

 

If anymore information is needed please ask.

 

 

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/
Share on other sites

In all honesty I don't think you should be asking for help on a public forum about your Private Runescape server.  Especially since you've ripped the design and graphics.  Not to mention you have SQL code showing:

 

<?php

'; $mysql = mysql_query("SELECT * FROM uber3_players WHERE sitelastaction >= '".$time15."' ORDER BY mgroup ASC") or die(mysql_error()); while($row = mysql_fetch_assoc($mysql)){ $color = "#33ff00"; if($row['mgroup'] == 4 || $row['mgroup'] == 6) $color = "yellow"; if($row['mgroup'] == 7) $color = "white"; echo ''.$row['name'].', '; } echo '
'; ?>
Logout)'; $mysql = mysql_query("UPDATE `runescape`.`uber3_players` SET `sitelastaction` = ".$time." WHERE `uber3_players`.`id` ='".$_SESSION['dbid']."' LIMIT 1 ;"); } echo '
';?>

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458614
Share on other sites

i found something like "Login or Register.'; } return false; } ?>" on the top of the main page this might be cause

 

Cheers !

 

I do not know how it jumped up there, but if I remove it then the Login function (if I wasn't having this problem) wouldn't work.

In all honesty I don't think you should be asking for help on a public forum about your Private Runescape server.  Especially since you've ripped the design and graphics.  Not to mention you have SQL code showing:

 

<?php

'; $mysql = mysql_query("SELECT * FROM uber3_players WHERE sitelastaction >= '".$time15."' ORDER BY mgroup ASC") or die(mysql_error()); while($row = mysql_fetch_assoc($mysql)){ $color = "#33ff00"; if($row['mgroup'] == 4 || $row['mgroup'] == 6) $color = "yellow"; if($row['mgroup'] == 7) $color = "white"; echo ''.$row['name'].', '; } echo '
'; ?>
Logout)'; $mysql = mysql_query("UPDATE `runescape`.`uber3_players` SET `sitelastaction` = ".$time." WHERE `uber3_players`.`id` ='".$_SESSION['dbid']."' LIMIT 1 ;"); } echo '
';?>

 

I did use the site layout and some of the "fan site" images from runescape yes. but it is not a complete rip of the site.. i think as soon as my problem is solved, I will change the layout a bit more so that it is not so confusing. And as for the SQL code I don't know why it's showing on the page at all.

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458654
Share on other sites

remove " (double quote)from the start of the file

 

Where do you see this double quote or are you assuming it's in there somewhere because of the received error.

 

Also isn't there some site or software I could run my php files through to see what the source of my troubles are?

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458885
Share on other sites

Yes, install the PHP engine and a webserver.

 

I already have WAMP5 V2.0 installed. the link that is in my post leads to my locally hosted site.

 

I know there is the site to see if there are any error's in *.css files, I would have thought there was one for PHP also.

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458892
Share on other sites

Yes, install the PHP engine and a webserver.

 

I already have WAMP5 V2.0 installed. the link that is in my post leads to my locally hosted site.

 

I know there is the site to see if there are any error's in *.css files, I would have thought there was one for PHP also.

PHP has a builtin debugger. Make sure you have enabled a setting called display_errors within the php.ini and that the error_reporting directive is to E_ALL

Save your php.ini and restart WAMP. When PHP processes scripts it'll now display errors during runtime.

 

Also when I goto the following link: http://thatoneserver.sytes.net/ and view the Source code via my browser I can see your PHP code - This is the reason why your page isn't displaying at it should. The reason for this is because you're using short tags (<? ?> or <?= ?>) these tags are not enabled by default. Either convert the short tags to full tags (<?php ?>) or enable a setting called short_open_tag within the php.ini

 

No PHP code should ever be returned to the browser. PHP is parsed server side, what is sent back to the browser is the output of the parsed script. Web browsers do not understand PHP code.

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458899
Share on other sites

Nice, I thought that I already had that set, but I guess WAMP5 saves the PHP.ini file in two separate places. and my error reporting was set to strict

I searched google for WAMP5 and php.ini and found that I could change it through the toolbar icon.

 

Atleast now I can receive my errors.

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458941
Share on other sites

I recieve several undefined veriables all over the page now, which is not really a problem I can just set the PHP.ini to hide error's, but now the major thing is this.

 

<?


if(loggedIn()) {
if($playerClan != 0) {
echo 'You are already in a clan!';
} else {

if($_POST['submit'] == 'Submit') {
$mysql = mysql_query("SELECT * FROM uber3_clans ORDER BY ID DESC LIMIT 1") or die(mysql_error());
while($row = mysql_fetch_assoc($mysql)){
$total = $row['ID'];
echo ($total+1);
}
echo '<center>Your query has been recieved and is being handled accordingly. <br><a href="index.php?action=manageclan">Manage your new clan.</a></center>';
$mysql = mysql_query("insert into `runescape`.`uber3_clans` SET
`ID` = ".($total+1).",
`Name` = '".$_POST['ClanName']."',
`Message` = '".$_POST['Message']."',
`Owner` = ".$_POST['whoid'].",
`ff` = 0,
`description` = '".$_POST['ClanDescription']."'");
$mysql = mysql_query("UPDATE `runescape`.`uber3_players` SET `ClanID` = '".($total+1)."' WHERE `uber3_players`.`id` =".$whoid."");
} else {
echo '<form action="index.php?action=createclan" method="post">';
echo '<table>';
echo '<tr><td>Clan Name:</td><td><input name="ClanName" value=""></td></tr>';
echo '<tr><td>Login Message:</td><td><input name="Message" value=""></td></tr>';
echo '<tr><td>Description:</td><td><input name="ClanDescription" value=""></td></tr>';

echo '</td><td></td></tr>';

echo '<tr><td><input name=submit type="Submit" value="Submit"></td><td><font color=red>Create your new clan</font></td></tr>';

echo '</table>';
echo '</form>';
}
}


$i = 0;
}?>

 

Now the two involved tables.

uber3_clans
Field		Type		Collation	Attributes	Null	Default		Extra
ID		int(10)				UNSIGNED	No			auto_increment
Name	       varchar(255)	latin_swedish_ci		No
MEssage		varchar(255)	latin_swedish_ci		No
Owner		varchar(255)	latin_swedish_ci		No
ff		varchar(255)	latin_swedish_ci		No
description	varchar(255)	latin_swedish_ci		No



uber3_players

id		int(10)				UNSIGNED	No			auto_increment
ClanID		int(10)						No
Status		int(10)						No

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-459799
Share on other sites

Sorry, I didn't finish I guess, I was preoccupied. When I fill in the form from the *.PHP page and submit, the two involved tables do not update or create.

I.e. If I create a new "clan" the owner ID should be that of the "Creator" but instead it is -1. also the "Players" table does not update to show that they own that "clan" or their rank in said "clan".

Link to comment
https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-459836
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.