PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 22nd, 2003, 02:42 AM
samman79 samman79 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: tledo, ohio usa
Posts: 9 samman79 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sql Database crashes

Okay I have a game written in php
I can log on add users and such to the database but when someone else logs on and registers the database crashes and all data is lost and i have to use the table file to recreate it...Help Help Help...Thank you

Reply With Quote
  #2  
Old September 22nd, 2003, 01:36 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
RE: Sql Database crashes

what database is it, what version, what happens when it crashes, be as specific as possible and provide as much information as possible...

Reply With Quote
  #3  
Old September 22nd, 2003, 09:11 PM
samman79 samman79 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: tledo, ohio usa
Posts: 9 samman79 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Sql Database crashes

Okay im using
PHPDEV423
w/Apache 1.3.27
w/PHP 4.2.3
Mysql Database ~ Phpmyadmin
Windows 98
-------------
The database is stores user info and game stats...
But when ever someone else gets on the database dies...
Its still there in phpmyadmin but all tables are inaccessible, the files are still there under the my sql data folder...


Reply With Quote
  #4  
Old September 22nd, 2003, 10:22 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
RE: Sql Database crashes

OK, now post the code that is inserting this data into the database. This will be the next step in determining what might be going wrong

Reply With Quote
  #5  
Old September 22nd, 2003, 10:23 PM
samman79 samman79 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: tledo, ohio usa
Posts: 9 samman79 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Sql Database crashes

<?php include("head.php"); ?> Register to get your Indocron City account now, and begin the game. Password
will be Sent to E-mail.
<?php
$nump = mysql_num_rows(mysql_query("select * from players"));
print " <b>$nump</b> people already have.";
?>
<form method=post action=register.php?action=register>
<table>
<tr><td>Username:</td><td><input type=text name=user></td></tr>
<tr><td>Email:</td><td><input type=text name=email></td></tr>
<tr><td>Verify Email:</td><td><input type=text name=vemail></td></tr>
<tr><td>Referral ID:</td><td><input type=text name=ref> <i><br>If you don't know what this is, leave it blank.</i></td></tr>
<tr><td colspan=2 align=center><input type=submit value=Register></td></tr>
</form>

<?php
if ($action == register) {
if (!$user || !$email || !$vemail ) {
print "You must fill out all fields.";
include("foot.php");
exit;
}
$dupe1 = mysql_num_rows(mysql_query("select * from players where user='$user'"));
if ($dupe1 > 0) {
print "Someone already has that username.";
include("foot.php");
exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from players where email='$email'"));
if ($dupe2 > 0) {
print "Someone already has that email.";
include("foot.php");
exit;
}
if ($email != $email) {
print "The emails do not match.";
include("foot.php");
exit;
}
$ref = strip_tags($ref);
$user = strip_tags($user);
$pass = strip_tags($pass);
if ($ref) {
mysql_query("update players set refs=refs+1 where id=$ref");
}
$pass = rand(10000 , 90000);
$message = "welcome to $gamename your pass is $pass login now and change it. have fun playing at $gamename. Webmaster";
mysql_query("insert into players (user, email, pass) values('$user','$email','$pass')") or die("Could not register.");
mail("$email", "$gamename", $message,
"From: webmaster@{$_SERVER['SERVER_NAME']}rn"
."Reply-To: webmaster@{$_SERVER['SERVER_NAME']}rn"
."X-Mailer: PHP/" . phpversion()) or die("could not send mail");

print "You are now registered to play, $user. Please check your e-mail for your pass and login now.";
}
?>
<?php include("foot.php"); ?>

Reply With Quote
  #6  
Old September 22nd, 2003, 10:44 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
RE: Sql Database crashes

I don't see anything that jumps out at me,in fact it looks fine, but if you would like to do a dump of the DB and email it to me, I will try recreating it here and see if I can't reproduce the problem. If you would like me to give it a try, let me know and I will send you a Private Message that will include my email address.

Reply With Quote
  #7  
Old September 22nd, 2003, 11:04 PM
samman79 samman79 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: tledo, ohio usa
Posts: 9 samman79 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Sql Database crashes

Sure that is 1 of many filez...I can send u the entire db
my email is samman@endzone-electronics.NOSPAM.com

U know y
email me and ill send it to ya

Reply With Quote
  #8  
Old September 22nd, 2003, 11:30 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
RE: Sql Database crashes

I tried responding to your email address and it was rejected by your server...please provide a working address

Reply With Quote
  #9  
Old September 23rd, 2003, 12:20 AM
samman79 samman79 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: tledo, ohio usa
Posts: 9 samman79 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Sql Database crashes

Remove .NOSPAM
or click here

samman@endzone-electronics.com

i use the .NOSPAM so i dont get spam scanned

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Sql Database crashes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek