I'm having memory problems running a script in PHP 5 Beta on WINNT SP6a. I am trying to generate 600 static HTML pages each containing a table of data. I've taken out all the table formatting routines out the code below, but it still replicates the same fault. The loop appends the SQL string with the loop value and then calls ODBC_DO.
When I run it, PHP.exe shows up in task manager, eating away at memory fast - about 1 meg every second gets consumed and it generates about 7000 page faults every second too. [I've no idea what page faults are but there's lots of them...]. But it still works, and the information comes out as expected. The memory is then freed when PHP exits. Here's the code. $dbCon = odbc_connect('Test2', '', ''); for ($nval=1;$nval<=700;$nval++) { $query = "SELECT * from [tablename] where ID = ".$nval; odbc_do($dbCon, $query); } odbc_close($dbCon); I've run this code not only from a web page, but also from the command line with some additional code which waits for a user keystroke before continuing to the next loop iteration, to slow down the process. But the same problem occurred, so I think I've ruled out some kind of bottleneck. I expected the memory to remain fairly constant throughout execution, but it keeps on rising and not always at a constant rate. Can anyone shed any light on this? Is this a bug in PHP? Kind regards, Chris Neale Contract Developer Somerfield Stores Ltd. If you are not the intended recipient of this e-mail, please preserve the confidentiality of it and advise the sender immediately of any error in transmission. Any disclosure, copying, distribution or action taken, or omitted to be taken, by an unauthorised recipient in reliance upon the contents of this e-mail is prohibited. Somerfield cannot accept liability for any damage which you may sustain as a result of software viruses so please carry out your own virus checks before opening an attachment. In replying to this e-mail you are granting the right for that reply to be forwarded to any other individual within the business and also to be read by others. Any views expressed by an individual within this message do not necessarily reflect the views of Somerfield. Somerfield reserves the right to intercept, monitor and record communications for lawful business purposes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php