["solved", well, evaded] PHP's / Server's memory?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

Phenom wrote:Wow 7 posts in a row? Is that a record?

Cough cough Edit Button
I'm sorry, i dont want to cross any rocommended guidelines, it's just that if i'v posted a topic, i want it to reach a conclusion.... So i must post to it until I or somebiody else can tell me and teh other readers whats it all about...

Edit... good for the ones who read it the first time, bad for ones who already read the start of it... Whats official recommendation to this?

(and i tend to run in very strange errors with all languages i use... cant say whats it about... I do quite complex stuff, but i'm self learned...(and it's usually not OS or outside related))
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

He didn't mean edit the original post as in the text, just edit it by adding more to it instead of posting again.. and again.. etc :P

also, did you find anything yet?
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

No, i just came, but i'll let you know soon as i figure it out
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

When php is run, does it create a actual real file, or somekind of direct stream to the browser who requested it?

If it uses a file, then this might be somekind of fileaccess problem?

************************************

Another thing (in same post :wink: )

If i hit stop in my browser the page is only half complete.

If i kill php.exe with taskmanager, the page comes complete.

*************************************

Ok this has become more a personal journal than a thread.... But i need to clear my thoughts somewhere ;)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

show us your updated code now...
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

I think i found the guilty line:

# $temp1=nations($row['to']);

That passing a null (acidently entered into database by hand made adjustments) to nations-function. Anyway shouldnt that give somekind of an error? and why the page shows as complete when php is killed?
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

No, its not that either...

maybe me echoeing variable containing ' s
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

How is it even possible the php.exe to remain as as an open process? I coud have 100 of them in my process list! They use no CPU, or have no anykind of activity.

Some server- or php settings must be wrong... Woudnt all servers be full of these "processes" if this was possible due to code-error?
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

why did you make 2 topics anyways..?

and still, the only idea i have is infinite loop..
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

LiLpunkSkateR wrote:why did you make 2 topics anyways..?

and still, the only idea i have is infinite loop..
I wasnt sure where to put it, so i later added another one to the clientside forum. (yes a bit crossposting, sorry)

It's basicly:

Code: Select all

<?php
IF a
 {
 While B
 {
 echo's
 }
 }
?>
If i had infinite loop, would it show the whole page after killing the php.exe?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Yes because php runs through the server and once it is done processing then it will display the data... so if a loop is infinite it will keep on going until you manually kill it.
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

OK!

Other possible places i have commented out, and still had the problem, so it cant be them right?

If its loop, then this is my main suspect!

while ($row = mysql_fetch_array($haku, MYSQL_ASSOC))

So what $row actually is when it has row from query in it? And what's it when the query's lat row has been processed?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

On a side note change

Code: Select all

<?php
$mailreaad=fetch_query("update users_mail set isread=1 where isread=0 and userid=$Player and gameid=$GameNumber"); 
?>
to

Code: Select all

<?php
$mailread=fetch_query("update users_mail set isread=1 where isread=0 and userid=$Player and gameid=$GameNumber"); 
?>
you mispelled $mailread
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

ou mispelled $mailread

Thanks.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Help me understand what exackly you want this script to do?

Some of the logic in this doesn't seem right... gimme a step by step list plz then I will probably know what's wrong
Post Reply