php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42975 PHP fatal error in date function
Submitted: 2007-10-15 14:42 UTC Modified: 2007-10-23 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: shany at zend dot com Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 5.2.4 OS: PPC Darwin 8.9.0
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-10-15 14:42 UTC] shany at zend dot com
Description:
------------
When running the script below I received error message:
PHP Fatal error:  Balloc() allocation exceeds list boundary in /usr/local/Zend/apache2/htdocs/date_test.php on line 2

This error was reproduced using php-cgi and php-cli scripts.
The error was not reproduced on iMac with Darwin 8.10.1, or on Linux RHEL5, Windows (XP, VISTA 64bit and Server03).

I'm using ZendCore 2.5.0 with bundled appache (2.2.4)
Build configuration: ./configure' '--prefix=/usr/local/Zend/Core' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--enable-fastcgi' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--disable-all' '--enable-ctype' '--enable-dom' '--enable-libxml' '--with-libxml-dir=/usr/local/Zend/Core' '--with-openssl=/usr/local/Zend/Core' '--with-pcre-regex' '--enable-session' '--enable-simplexml' '--enable-spl' '--enable-wddx' '--enable-xml' '--enable-hash' '--enable-reflection' '--with-zlib=/usr/local/Zend/Core' '--with-pear' '--with-apxs2=/usr/local/Zend/apache2/bin/apxs' '--with-layout=GNU' '--enable-json' '--enable-filter' '--enable-pdo' 

Changes in php.ini: 
short_open_tag = On
max_execution_time = 3000    
max_input_time = 600 
register_argc_argv = On
<auto_globals_jit = On> (missing)
<allow_url_include = Off> (missing)
<session.cookie_httponly = >(missing)
ingres.allow_persistent = On
ingres.max_persistent = -1
ingres.max_links = -1
pfpro.defaulthost = "test-payflow.verisign.com"
pfpro.defaultport = 443
pfpro.defaulttimeout = 30
sockets.use_system_read = On
extension_dir="/usr/local/Zend/Core/lib/php/20060613"
include_path=".:/usr/local/Zend/Core/share/pear"



Reproduce code:
---------------
Script sample: 
<?php
 $d = date("l");
 echo "d is: $d\n";
?>
(I also tried other possible strings as date() input)


Expected result:
----------------
d is: Monday

Actual result:
--------------
PHP Fatal error:  Balloc() allocation exceeds list boundary in /usr/local/Zend/apache2/htdocs/date_test.php on line 2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-15 15:52 UTC] johannes@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

And please also make sure you'Re having no Zend Extension enabled (/usr/local/Zend/Core let's me think there might be the Zend Optimizer enabled...) and please test at least without --enable-inline-optimization, and, if it still fails then, also with a minimal configure line.
 [2007-10-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-03-24 03:25 UTC] crquan at gmail dot com
I also met this problem with php-5.2.9

'./configure' '--host=powerpc-linux' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-cli' '--disable-ipv6' '--disable-all' '--enable-fastcgi'

the index.php file only contains one phpinfo(), and it tells

...

date

Fatal error: Balloc() allocation exceeds list boundary in /vra/www/index.php on line 1
date/time support 	enabled
"Olson" Timezone Database Version 	2009.1
Timezone Database 	internal
 [2009-04-16 04:25 UTC] crquan at gmail dot com
I have tried the CVS snapshot today,

  http://snaps.php.net/php5.2-latest.tar.gz
 
it still have the problem, with the phpinfo() output, the date function still have the fatal error:

PHP Version 5.2.10-dev

System 	Linux canyonlands 2.6.25 #2 Mon Apr 13 11:16:43 CST 2009 ppc
Build Date 	Apr 16 2009 12:16:06
Configure Command 	'./configure' '--host=powerpc-linux' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-cli' '--disable-ipv6' '--disable-all' '--enable-fastcgi'
Server API 	CGI/FastCGI
Virtual Directory Support 	disabled 

date

Fatal error: Balloc() allocation exceeds list boundary in /root/index.php on line 1
date/time support 	enabled
"Olson" Timezone Database Version 	2009.6
Timezone Database 	internal
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC