NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugging with large arrays


Joined: 02 Jan 2004
Posts: 6
Reply with quote
I have a text file that I read into a large string so that I can parse the data records within. The file is around 240,000 characters and it is a tab delimited data file.

It seems to copy fine from the file:

if (file_exists($target))
{
$contents = file_get_contents($target);
}

but when I try to move the characters as I convert from strings to ASCII numbers as so:

$j=strlen($contents)-1;

for($i = 0;$i <=$j; $i++)
{
$c1[$i] = ord($contents{$i});
}

The debugger never comes back, it just goes on forever. If I replace the limiting parameter $j with constant numbers and work my way up until it fails, I can go to around 50000 bytes of transfer before it hangs up. The conversion and array copy are accurate until this happens, then then all local variables values are no longer shown in the debugger locals window, and it must be restarted. This is acting exactly like a memory problem, like writing past an array boundary and writing over program memory. I can not find anywhere that a size limit is placed on an array in PHP, so I presume there is one in PHPEd.

OR, I am just overlooking something stupid that's so obvious I can't see it.

Any help with large arrays appreciated.
Charles
View user's profileFind all posts by charlesonthegoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7881
Reply with quote
It is a problem that may happen in DBG 2.16.3 and all versions before.
Has been fixed in DBG 2.16.5 which is a part of phped 3.3 hotfix 1.
Phped 3.3 hotfix 1 is avaialable to NuSphere customers for many weeks.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
DBG version


Joined: 02 Jan 2004
Posts: 6
Reply with quote
Can PHPEd V 3.2.1 be fixed by adding this newer debugger component?

C
View user's profileFind all posts by charlesonthegoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7881
Reply with quote
I have some doubts if PhpED-3.2.1 will work with dbg-2.16.5... At least it's not supported. I'm sorry, I have very little to do there. 3.2.1 is a service pack #1 for phped 3.2 and closes almost all the problems discovered in the this version. By now it is in the frozen state. I can only suggest to apply to sales and you will get a good discount for upgrade. Contact our sales, they are well trained, prompt and highly responsive.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Debugging with large arrays
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic