Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
> > This is the official PHP 4.0.6 version. After line 448 insert: > > #if MEMORY_LIMIT > AG(allocated_memory) -= REAL_SIZE(ptr->size); > #endif > > If you'll take a good look at the diff file the first half is what you're > supposed to have and the second half is what it's supposed to change to. > You probably missed the second half. Thank you very much for your suggestion. I followed it. -Stathis. > > Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
At 10:49 PM 7/1/2001 +0300, Rouvas Stathis wrote: >Andi Gutmans wrote: > > > > At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote: > > >It is indeed strange, since in the sources I have (downloaded about a > > >week ago), I already have the exact source that the patch presents > > >(without the lines prefixed with +). > > >I'm looking at $PHPHOME/Zend/zend_alloc.c file. > > > > > >Am I to suppose that there is no need to patch anything? > > > > The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does > > not have this patch. Are you sure you are looking at the release version? > > Maybe you are using a snapshot or CVS version? > >I do not use the CVS version, mainly because I do not know how to handle >CVS :-) >These are the lines from $PHPHOME/Zend/zend_alloc.c that I have. > > >443 if (1 || clean_cache) { >444 zend_mem_header *ptr; >445 >446 for (i=1; i447 for (j=0; j448 ptr = (zend_mem_header *) >AG(cache)[i][j]; >449 REMOVE_POINTER_FROM_LIST(ptr); >450 free(ptr); >451 } >452 AG(cache_count)[i] = 0; >453 } >454 } > > >What do you think? This is the official PHP 4.0.6 version. After line 448 insert: #if MEMORY_LIMIT AG(allocated_memory) -= REAL_SIZE(ptr->size); #endif If you'll take a good look at the diff file the first half is what you're supposed to have and the second half is what it's supposed to change to. You probably missed the second half. Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
Andi Gutmans wrote: > > At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote: > >It is indeed strange, since in the sources I have (downloaded about a > >week ago), I already have the exact source that the patch presents > >(without the lines prefixed with +). > >I'm looking at $PHPHOME/Zend/zend_alloc.c file. > > > >Am I to suppose that there is no need to patch anything? > > The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does > not have this patch. Are you sure you are looking at the release version? > Maybe you are using a snapshot or CVS version? I do not use the CVS version, mainly because I do not know how to handle CVS :-) These are the lines from $PHPHOME/Zend/zend_alloc.c that I have. 443 if (1 || clean_cache) { 444 zend_mem_header *ptr; 445 446 for (i=1; i What do you think? -Stathis. PS: Thank you for your time. I know how precious it is. > > Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote: >It is indeed strange, since in the sources I have (downloaded about a >week ago), I already have the exact source that the patch presents >(without the lines prefixed with +). >I'm looking at $PHPHOME/Zend/zend_alloc.c file. > >Am I to suppose that there is no need to patch anything? The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does not have this patch. Are you sure you are looking at the release version? Maybe you are using a snapshot or CVS version? Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
It is indeed strange, since in the sources I have (downloaded about a week ago), I already have the exact source that the patch presents (without the lines prefixed with +). I'm looking at $PHPHOME/Zend/zend_alloc.c file. Am I to suppose that there is no need to patch anything? -Stathis. Andi Gutmans wrote: > > Very strange. I just checked it and it worked for me with GNU patch 2.5. > Do you know how to apply it yourself? You just need to add those three > lines (without the leading +). > > Andi > > At 07:48 PM 7/1/2001 +0300, Rouvas Stathis wrote: > >Patch cannot be successfully applied. Any suggestions ? > > > >Output from patch application: > > > > > >rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >patch -i > >patch.zend_alloc.c > >patching file zend_alloc.c > >Hunk #1 FAILED at 446. > >1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej > >rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >cat > >zend_alloc.c.rej > >*** > >*** 446,451 > > for (i=1; i > for (j=0; j > ptr = (zend_mem_header *) > >AG(cache)[i][j]; > > REMOVE_POINTER_FROM_LIST(ptr); > > free(ptr); > > } > >--- 446,454 > > for (i=1; i > for (j=0; j > ptr = (zend_mem_header *) > >AG(cache)[i][j]; > >+ #if MEMORY_LIMIT > >+AG(allocated_memory) -= > >REAL_SIZE(ptr->size); > >+ #endif > > REMOVE_POINTER_FROM_LIST(ptr); > > free(ptr); > > } > > > > > > > >-Stathis. > > > >Andi Gutmans wrote: > > > > > > There is a bug in PHP 4.0.6 which affects PHP users who use the memory > > > limit option. (i.e. developers who include --enable-memory-limit in their > > > configure line). > > > The patch is posted at http://www.php.net/downloads.php. If you don't use > > > this option there is no need for you to download and apply the patch. > > > > > > Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
Very strange. I just checked it and it worked for me with GNU patch 2.5. Do you know how to apply it yourself? You just need to add those three lines (without the leading +). Andi At 07:48 PM 7/1/2001 +0300, Rouvas Stathis wrote: >Patch cannot be successfully applied. Any suggestions ? > >Output from patch application: > > >rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >patch -i >patch.zend_alloc.c >patching file zend_alloc.c >Hunk #1 FAILED at 446. >1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej >rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >cat >zend_alloc.c.rej >*** >*** 446,451 > for (i=1; i for (j=0; j ptr = (zend_mem_header *) >AG(cache)[i][j]; > REMOVE_POINTER_FROM_LIST(ptr); > free(ptr); > } >--- 446,454 > for (i=1; i for (j=0; j ptr = (zend_mem_header *) >AG(cache)[i][j]; >+ #if MEMORY_LIMIT >+AG(allocated_memory) -= >REAL_SIZE(ptr->size); >+ #endif > REMOVE_POINTER_FROM_LIST(ptr); > free(ptr); > } > > > >-Stathis. > >Andi Gutmans wrote: > > > > There is a bug in PHP 4.0.6 which affects PHP users who use the memory > > limit option. (i.e. developers who include --enable-memory-limit in their > > configure line). > > The patch is posted at http://www.php.net/downloads.php. If you don't use > > this option there is no need for you to download and apply the patch. > > > > Andi > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted
Patch cannot be successfully applied. Any suggestions ? Output from patch application: rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >patch -i patch.zend_alloc.c patching file zend_alloc.c Hunk #1 FAILED at 446. 1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend >cat zend_alloc.c.rej *** *** 446,451 for (i=1; isize); + #endif REMOVE_POINTER_FROM_LIST(ptr); free(ptr); } -Stathis. Andi Gutmans wrote: > > There is a bug in PHP 4.0.6 which affects PHP users who use the memory > limit option. (i.e. developers who include --enable-memory-limit in their > configure line). > The patch is posted at http://www.php.net/downloads.php. If you don't use > this option there is no need for you to download and apply the patch. > > Andi > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Patch for PHP 4.0.6 memory limit problem posted
There is a bug in PHP 4.0.6 which affects PHP users who use the memory limit option. (i.e. developers who include --enable-memory-limit in their configure line). The patch is posted at http://www.php.net/downloads.php. If you don't use this option there is no need for you to download and apply the patch. Andi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]