Jump to content

kingb00zer

Members
  • Posts

    128
  • Joined

  • Last visited

Everything posted by kingb00zer

  1. Nevermind, I went for a re install and now all of the things I did to get wamp past the point of no phpmyadmin access wont work which now leaves me several steps behind where I was when I originally made this thread. Im just going to stick with xampp (which has actually stopped working recently) as I am getting far too much downtime at the moment. Thank you for trying to help but I think I need to prioritize and work on finding a solution for my recent xampp issue, which incase your wondering what that scenario is. I was working on my site for a while when I went to edit my database in order to test out a few changes made to a script im working on (which I may add that I had done several times that day and had no problem) when all of a sudden clicking on a table in my database would leave the main page blank and un accessable, thus leaving me unable to manually insert data. I tried to re install xampp, I even tried upgrading to the latest xampp and it doesn't matter what I do I cant view any tables of any database. Also like to add that once I click on a table there is no more navigating phpmyadmin as I think there is some sort of crash. I tried googling the issue and so far I cant find anything. Also better add that I uninstalled wamp before installing xampp.
  2. The code works fine, It works perfectly both with xampp and with my old online web host. It's only now that I try to use wamp server pack to get my work done that it doesn't work. What happens is the index page appears as per usual, but I can not log in even though everything is the exact same. I'm thinking that maybe it is an sql issue however I can view everything in my database via phpmyadmin.
  3. I only tried xampp as a last resort these problems with wamp occurred before hand. I had to remove the :8080 in order to access the file and the results are pasted in the quote below I'm not exactly sure what I'm supposed to be looking for.
  4. Just like to add that I now realize I can use xampp with windows 8, this whole time I thought xampp was for xp only lol. however I would still like to know why wamp wont work.
  5. Hi I recently upgraded to windows 8 which means I now have to make the switch form xampp to wamp. When I run my website I can not log in anymore. I get as far as index.html but my log in wont work. I do not have this issue with xampp In fact my web app is near completion and log in issues are something that haven't bugged me for over a year now lol. I did originally have a problem with not being able to acess phpmyadmin until I commented out "deny from all" in phpmyadmin.conf but now I have hit this road block and do not know what to do. Any suggestions?
  6. Hi my mouse recently died and now I am forced to use a laptop with windows 7 as aposed to my pc with xp with which I ran xampp. I downloaded Wamp today and tried to use it in the same way that I would have xampp however I can not connect, the icon remains orange. What can I do as I wont be able to buy a new mouse for at least a week and really want to get some work done? Also: I have googled this and many responses have something to do with changing ports or something like that.
  7. Hi I am attempting to strip the letters from certain input boxes within my website and seem to have a hard time understanding how preg_replace works. Here is the code I have; $x= $_POST['inputdata'];$y= preg_replace("[^0-9]", "", $x); The letters wont strip from the input box and I cant work out why.
  8. I dont understand but just a day later without any changes to what is supposed to be working log in scripts I am back to where I was and this time even my xampp wont run it.... here is the code below checklogin.php <?php session_start();include("connection.php");$username= $_POST['username'];$password= $_POST['password'];// check if username and passwords match$checkuser= "SELECT * FROM users WHERE username = '$username' and password = '$password'";$result=mysql_query($checkuser);$count=mysql_num_rows($result);if ($count == 1){$_SESSION["$username"];$_SESSION["$password"];header("location:login_success.php");}else {include('loginfail.php');}?> login_success.php <?php session_start();if(isset($_SESSION['username'])){header("location:welcome.php");} else {echo "session not registering";}?> I get the session not registering echo happening when I log in. And liek I said before it was working a day earlier...
  9. Thank you after a big weekend of working and staff partes I finally got around to readin this, and it works fine now
  10. I had the version downgraded a couple of days ago to 5.2.0 but I am looking to remove depreciate functions where I can this is what I ahve now and the same thing is happeningchecklogin.php <?phpinclude("connection.php");$username= $_POST['username'];$password= $_POST['password'];// check if username and passwords match$checkuser= "SELECT * FROM users WHERE username = '$username' and password = '$password'";$result=mysql_query($checkuser);$count=mysql_num_rows($result);if ($count == 1){$_SESSION['$username'];$_SESSION['$password'];header("location:login_success.php");}else {include('loginfail.php');}?> login_success.php <?session_start();if(!$_SESSION['$username']){header("location:welcome.php");} else {echo "session not registering";}?> I originaly had it the other way than !$_SESSION['$username'] and that just sent me to my not registering echo so I threw in the ! to see and it logs me i as a nameless user
  11. Ok I have this thing running perfect on xampp and on my old server. Now I have a private server and when I log into my site it doesnt recognise the session at all. I dont get it... here is the log in scripts this is checklogin.php <?phpinclude("connection.php");$username= $_POST['username'];$password= $_POST['password'];// check if username and passwords match$checkuser= "SELECT * FROM users WHERE username = '$username' and password = '$password'";$result=mysql_query($checkuser);$count=mysql_num_rows($result);if ($count == 1){session_register($username);session_register($password);header("location:login_success.php");}else {include('loginfail.php');}?> this is login_success.php <?session_start();if(session_register($username)){ // I also used session_is_registered($username) and $_SESSION['username']header("location:welcome.php");} else {echo "session not registering";}?> I log in just fine and makeit all the way to the welcome page (even further) but no session related variables appear. for example on the welcome page it should say "hello admin, wlecome.... etc" instead it says "hello , welcome.... etc" I cant work out why xampp runs it but my server doesnt.
  12. Ok I managed to find some basic examples of all of these shtml files and now I get "Error: HTTPd: malformed header from script\ checklogin.php" No idea what this means or why it is happening, it works just fine when i use it in my xampp server.I should add, this is what I get form my error log [Mon Feb 06 01:18:30 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:18:30 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"503.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:18:30 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:18:30 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"404.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:18:30 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:18:30 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"401.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:17:33 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:17:33 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"404.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:17:33 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:17:33 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"503.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:17:33 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:17:33 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"401.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:03:45 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:03:45 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"404.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:03:45 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:03:45 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"503.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:03:45 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:03:45 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"401.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:02:31 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:02:31 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"404.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:02:31 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:02:31 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"503.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:02:31 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:02:31 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"401.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:35 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:35 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"401.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:18 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:18 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"503.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:18 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:18 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"404.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:18 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/404.shtml, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url][Mon Feb 06 01:01:18 2012] [error] [client 115.69.41.57] File does not exist: /home/druglord/public_html/"401.gif, referer: [url="http://drug-lords.com/checklogin.php"]http://drug-lords.com/checklogin.php[/url] There is nothing wrong with checklogin.php it works perfectly when I run the site through xampp. I am lost..
  13. Hey it doesnt seem to work, I assume because on my server I have to do these 5 pages individually. And if they arent all that important how would I go about fixing them or better yet knowing what the problem is so I can isolate it and fix it. I suspect it is in my connection file but I am almost certain I have those details correct (might not be server= localhost.)
  14. Hi when I tried to login to my site for the first time I got a message that said I could find the errors in my error logs. I checked it and the error is that I have no 500.shtml and no 404.shtml I also had no favicon.ico but I looked into that and made one (which is good I didnt know what the url icon i wanted to eventually add was called until now) but I dont know what to do about 500 and 404.shtml, shouldnt it usually come with my host and server package?
  15. Oh, lol I have been stressing about losing quality for nothing. Thank you for your help, you have saved me a trip to my friends tomorrow. Which means more time for code
  16. funny you mention that, I decided that I might have to go to my friends and sue his printer and break out the ruler. I hope it isnt 3.96875 cm when I print and measure. If this does turn out to be the case how much do you think I could multiply these pixels for my friend to draw in then reduce back to the pixels I require without damaging the quality too much? (i hope that makes sense lol)
  17. Hi I have some art being created soon for my website, however my art guy doesnt have a printer or a scanner on hand. I know that the images need to fit into the following dimensions: 150x330 pixels and 300x165 pixels. Since sending him templates to draw within pre measured dimensions wont be an easy task without a printer I now need to convert these measurements into centimetres so he can rule the dimensions onto his paper and draw within those lines, but I dont know how to do this conversion. I also recently tried a converting website and it said that 150 pixels = 3.96875 centimeter, surely this can not be right (3.96875 inches might be closer to what I would assume is correct but I want centimeters is more acurate and easier to use.) Also if it helps my monitor is a 42" tv screen. it seems by all these hard to understand tutorials I find that diferent monitors alter the conversion formulas.
  18. Nevermind a friend of mine has informed me that I need to look into unix timestamps.
  19. well lets say for instance a user runs this script at 3:22pm, at 3:25pm the number entered at first is decremented, at 3:30pm decremented again, then 3:35pm decremented again this only equals 13 minutes. And getting it to be an exact 15 minutes (exact to the minute not second) regardless of what time the script is run is where I have trouble. See what I want to do is abolish the current system I am using as it is inacurate to what I want it to do, it was just a temporary solution to test out the main parts to what makes this attack. My site is a game and the initial script is an attack which if succesful gives you 15 minutes to kill that person in order to gain a larger reward.
  20. Hi I have a script that when run inserts data into a row in my sql database but what I want to follow that action, is a timer that countsdown 15 minutes from that record being inserted and if when that 15 minutes is up replace that row with the value "none" (which is what it was previous to the insertion.) I currently have a sister row that i insert the number 3 into when the script is run and evry 5 minutes that number is decremented until the sister row = 0 then the row changes back to "none", however that does not technically equal 15 minutes and I want to do something more precise. I just dont know what look up to study how to do this.
  21. ohhh I see it says "Duplicate entry '2012-01-19 14:12:21' for key 'PRIMARY'". So I commented lined out the first insert and the second insert worked just fine, but it is important that I get both inserted as a result of this script being run. I'm going to play around with a few ideas that came to mind just now and see how I go. Thanks guys, always a great help
  22. It has no error, thats the part that confuses me. I had trouble with the first quote of the "attacks out" section but it turned out that i needed to put \\ next to my apostraphies. EDIT: A friend of mine pointed out that in perl you can trap mysql errors, Im trying to find soething like that in php but so far havig no luck. But this does sound like the way to pinpoint this problem. Any suggestions on how to trap the error?
  23. Hi I have got the first part (attacks out) to insert but the part under "target details" where I try to insert the attacks in bit will not insert into the database. I cant understand why it is basically the same as the attacks out part which inserts just fine. // add message to attacks out $message= " You win! Your <b>$thuga</b> thugs with <b>$ak47a</b> AK47's and <b>$pistola</b> pistols killed <b>$deadthugs</b> thugs of your targets <b>$thugb</b> thugs. <br /> You lost <b>$dead3</b> thugs during the battle... <br /> Your thugs stole <b>$$loot</b> from your target. <br /> $win "; $msg= " You Invaded $target\\'s house and won, Your $thuga thugs with $ak47a AK47s and $pistola pistols killed $deadthugs thugs of your targets $thugb thugs. You lost $dead3 thugs during the battle... Your thugs stole $$loot from your target. $win ";$query2 = mysql_query("SELECT * FROM messages WHERE category='attacksout' AND sender='$username'");$rowcount= mysql_num_rows($query2);$rowcount++ ;mysql_query("INSERT INTO messages (recipient, sender, message, category, count) VALUES ('$target', '$username', '$msg', 'attacksout', '$rowcount')");// add to wanted levelinclude('wantedup.php'); // - ---TARGET DETAILS---$newthugsb= $thugb - $deadthugs;$newcashb= $cashb - $loot ; mysql_query("UPDATE playerstats SET thugs= '$newthugsb' WHERE username='" . $_POST['target'] . "'"); mysql_query("UPDATE playerstats SET money= '$newcashb' WHERE username='" . $_POST['target'] . "'");// - kills: $thugkillsb= thugkills + $dead3 (stats)// - thugs dead: $deadcountb= thugsdead + $deadthugs (stats) // - check to see if target was claiming turf from player, if so turf war ends // add message to attacks in... THE ATTACKS IN WILL NOT INSERT!$msg2= " $username invaded your house with $thuga thugs armed with $ak47a AK47s and $pistola pistols. $deadthugs of your $thugb thugs died in the battle. You managed to kill $dead3 of $username\\'s thugs during the battle... $username stole $$loot from you. ";$query3 = mysql_query("SELECT * FROM messages WHERE category='attacksin' AND recipient='$target'");$rowcount2= mysql_num_rows($query3);$rowcount2++ ;mysql_query("INSERT INTO messages (recipient, sender, message, category, count) VALUES ('$target', '$username', '$msg2', 'attacksin', '$rowcount2')");
  24. Nevermind guys, I spoke with a friend and it turns out that i cant use the word "to" for a field name asit is a reserved word in sql.
  25. hmmmm... the AND is already in there and I removed the 2nd where and I am still getting the same error. This is what my code is now. echo "<table class='centrepage' width='600px' align='center'>";echo "<tr><td class='seven' align='center' colspan='8'> Inbox - Sent - Alliance - Message Board - Attacks In - Attacks Out <br /></td></tr>"; $count= 0 ;$query = mysql_query("SELECT * FROM messages WHERE to='" . $_SESSION['username'] . "' AND category='personal' ");$rowcount= mysql_num_rows($query); // LINE 95while ($count <= $rowcount){while($row = mysql_fetch_array($query2)) {$from= $row['from'];$message= $row['message'];$date= $row['date'];}echo "<tr bgcolor='#006622'><td colspan='8' class='seven'><b>From: $from</b> $date</td></tr>";echo "<tr><td colspan='8' class='seven'>$message</td></tr>"; $count++;}
×
×
  • Create New...