Blackcarnage Posted February 5, 2008 Share Posted February 5, 2008 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. This is the page now. Web Address http://thatoneserver.sytes.net 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. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/ Share on other sites More sharing options...
pdkv2 Posted February 5, 2008 Share Posted February 5, 2008 i found something like "Login or Register.'; } return false; } ?>" on the top of the main page this might be cause Cheers ! Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458613 Share on other sites More sharing options...
PHP Monkeh Posted February 5, 2008 Share Posted February 5, 2008 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 ' ';?> Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458614 Share on other sites More sharing options...
Blackcarnage Posted February 5, 2008 Author Share Posted February 5, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458654 Share on other sites More sharing options...
vidyadoiphode Posted February 5, 2008 Share Posted February 5, 2008 You can get some good links here. http://php-infosource.blogspot.com/ Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458839 Share on other sites More sharing options...
sasa Posted February 5, 2008 Share Posted February 5, 2008 remove " (double quote)from the start of the file Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458860 Share on other sites More sharing options...
Blackcarnage Posted February 5, 2008 Author Share Posted February 5, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458885 Share on other sites More sharing options...
revraz Posted February 5, 2008 Share Posted February 5, 2008 Yes, install the PHP engine and a webserver. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458890 Share on other sites More sharing options...
Blackcarnage Posted February 5, 2008 Author Share Posted February 5, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458892 Share on other sites More sharing options...
sasa Posted February 5, 2008 Share Posted February 5, 2008 if you look source code of your page you can see that your server doesn't pharse php at all try to change short php tag '<?' to regular '<?php' Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458895 Share on other sites More sharing options...
revraz Posted February 5, 2008 Share Posted February 5, 2008 Post all the code and then it will be easier to see where it's broke. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458898 Share on other sites More sharing options...
wildteen88 Posted February 5, 2008 Share Posted February 5, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458899 Share on other sites More sharing options...
Blackcarnage Posted February 5, 2008 Author Share Posted February 5, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-458941 Share on other sites More sharing options...
Blackcarnage Posted February 6, 2008 Author Share Posted February 6, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-459799 Share on other sites More sharing options...
revraz Posted February 6, 2008 Share Posted February 6, 2008 The major thing is what? 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. Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-459807 Share on other sites More sharing options...
Blackcarnage Posted February 6, 2008 Author Share Posted February 6, 2008 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". Quote Link to comment https://forums.phpfreaks.com/topic/89535-what-am-i-doing-wrong/#findComment-459836 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.