ID: 37300 User updated by: astinky at lycos dot com Reported By: astinky at lycos dot com Status: Open Bug Type: Feature/Change Request Operating System: Windows Server 2003 PHP Version: 5.1.3 New Comment:
Well, using this code to test: <?php $shipdatarow = array(); $shipcount = 0; $filename = "shiplist.txt"; $fp=fopen("$filename","rt"); while (($shipdata = fgetcsv($fp, 1569, chr(9))) !== FALSE) { if ($shipdata[0] == "Mirak") { $shipdatarow[$shipcount] = $shipdata; $shipcount++; } } echo $shipdatarow[0][2]; echo '<br><br>'; echo $shipdatarow[$shipcount-1][2]; unset($shipdatarow); ?> I cannot reproduce the crash on either our server or my home PC. However the output of the full script is still truncated on our server. I am using identical configurations on the two machines, the only difference being that our server is running Windows Server 2003 and Symantec Corporate AV (not my choice, I hate Norton with a passion) and I'm running WinXP SP2 at home with no virus scanner. This is still php 5.1.4. I'll now test that snapshot at home and on the server to see the effect on my script and whether or not I can set the memory limit. Its starting to look like I've sent you on a wild goose chase. Previous Comments: ------------------------------------------------------------------------ [2006-05-11 14:46:39] astinky at lycos dot com Will do... just gimme a bit to download it, I'm on dial-up here. Extensions in use: extension=php_mbstring.dll extension=php_gd2.dll extension=php_mysql.dll (compiled against libMySQL 5.0.21) extension=php_sockets.dll extension=php_pspell.dll zend_extension_ts="eAccelerator.dll" I get the same result without my build of eAcclerator 0.9.5-b2 (php 5.1.4) loaded, so that is not the cause. Here is the memory intensive portion of the script in question: $shipdatarow = array(); $shipcount = 0; $filename = "shiplist.txt"; $fp=fopen("$filename","rt"); while (($shipdata = fgetcsv($fp, 1569, chr(9))) !== FALSE) { if ($shipdata[0] == $shiprace[$WONlogonsubRace]) { $shipdatarow[$shipcount] = $shipdata; $shipcount++; } } The file shiplist.txt is ~2.9MB in size. I optimised it on an apache-php build on QNX I produced myself a few years ago, as it was originally developed on a windows server when there was no memory limit in php on windows and it needed on optimisation to run in a reasonable memory space under my apache-php build for QNX. Here is the application in place: http://www.dynaverse.net/webmap_op_sql/ however you will not be able to see the shipyards page without a forums login on our site and a character account on the game server. I will zip up the works for you to look at (db passwords and some hostnames and paths removed) Much of the code is from when I first started with php (3.x) so don't laugh too hard... here it is: http://www.dynaverse.net/webmap_op_sql/webmap_togo.zip I must emphasise that I did not have this problem with exactly the same config on php 5.0.5 so I know it is not the script or the extensions I am using. Nevertheless, I will test a stripped down version at home that just opens the text file and loads a portion of it into an array. I'll do this with no extensions loaded. Again it will take me some time to download as I'm on dial-up at home here. To test it on our server I'll need to compile eAccelerator and php_mysql against this snapshot (and it seems you've saved me compiling an apache 2.2 module) However the stripped down test on my home PC will get priority. ------------------------------------------------------------------------ [2006-05-11 14:09:18] [EMAIL PROTECTED] And please tell me what PHP extensions do you have enabled. Try with a minimal config to see if the problem disappears. I rather suspect crash has nothing to do with memory limit. Also if possible please provide reproducing script. ------------------------------------------------------------------------ [2006-05-11 14:04:36] astinky at lycos dot com Sorry, I missed your last comment before my last post. I will indeed give that snapshot a try and report back as soon as I get it tested! ------------------------------------------------------------------------ [2006-05-11 14:02:00] astinky at lycos dot com Perhaps whatever Dmitry did here: http://bugs.php.net/bug.php?id=36568 Changed memory use on windows, without actually enabling the memry limit I assume that the intention is that there should be no memory limit at all on windows? If that is the case, then there is one now, I just can't change it. I know my script is not using the entire 1GB of system ram on this server (12 MB maybe...). When my script stopped working corresponds to the time of the change in bug ID 36568. I'd rather not rollback to php 5.0.5 or have to compile 5.1.4 myself but ultimately I'll have to if the old behaviour is not restrored or the memory limit fully enabled. I'm not meaning to nag here, just filling in more info that I hope will be helpful. I'll find a solution one way or another but it is my hope that the old behaviour of memory use on windows will be restored or the memory limit will be fully enabled, whatever you guys think is appropriate. ------------------------------------------------------------------------ [2006-05-11 13:55:32] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Default php does not have any memory limit. Please use php5handler2_2.dll if you're using apache 2.2 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/37300 -- Edit this bug report at http://bugs.php.net/?id=37300&edit=1