I have a real newbie-level question here.
Recently I have been developing a small PHP-MySQL database on my $12/month webhosting service. Last night at 5AM while testing this application, the server went down. I went to sleep assuming they were doing maintenance. The site has been down for brief periods in the past so I didn't think much of it.
This morning I received the following email from the admin, who has been very helpful in the past:
"ok... I give up. what happened this morning with mySQL and that database
contraption? You were the last one on there before it blew up. Can you fill
me in on exactly what you did? and why on earth didn't you call me when it
blew up? apache and mysql were in a loop for 3 hours !!!!"
I apologized and said it might have been a query I attempted. He said my database was not that big and that it was probably an infinite loop in my code. He suggested I debug this at home before uploading it.
I am no master programmer but it appears as if the only loops in my code are of the type:
while($row=mysql_fetch_array($result))
Is that a likely culprit?
Regardless, isn't the operating system supposed to protect other processes from that kind of thing?
Basically I am afraid if I continue to experiment with this program I risk bringing down the server and having my account yanked.
My question is: it is common to have to debug PHP scripts offline? One of the main reasons I got this account was so I could fool around with databases.
Thanks in advance,
Bobby
Recently I have been developing a small PHP-MySQL database on my $12/month webhosting service. Last night at 5AM while testing this application, the server went down. I went to sleep assuming they were doing maintenance. The site has been down for brief periods in the past so I didn't think much of it.
This morning I received the following email from the admin, who has been very helpful in the past:
"ok... I give up. what happened this morning with mySQL and that database
contraption? You were the last one on there before it blew up. Can you fill
me in on exactly what you did? and why on earth didn't you call me when it
blew up? apache and mysql were in a loop for 3 hours !!!!"
I apologized and said it might have been a query I attempted. He said my database was not that big and that it was probably an infinite loop in my code. He suggested I debug this at home before uploading it.
I am no master programmer but it appears as if the only loops in my code are of the type:
while($row=mysql_fetch_array($result))
Is that a likely culprit?
Regardless, isn't the operating system supposed to protect other processes from that kind of thing?
Basically I am afraid if I continue to experiment with this program I risk bringing down the server and having my account yanked.
My question is: it is common to have to debug PHP scripts offline? One of the main reasons I got this account was so I could fool around with databases.
Thanks in advance,
Bobby