Edit report at https://bugs.php.net/bug.php?id=55712&edit=1
ID: 55712
User updated by: ken at simplecommerce dot com
Reported by: ken at simplecommerce dot com
Summary: FastCGI causes event 1000 application error when
using number_format(0)
Status: Open
Type: Bug
Package: IIS related
Operating System: Windows server 2008 R2
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
Thanks for the link.
It is a good alternative, but if possible I would prefer a solution to my
current problem without having to go through all my files and re-code using
this new method.
Previous Comments:
------------------------------------------------------------------------
[2011-09-18 15:29:43] [email protected]
I would go with intl, see http://www.php.net/manual/en/class.numberformatter.php
number_format depends on the system API and can be very buggie.
------------------------------------------------------------------------
[2011-09-18 15:19:34] ken at simplecommerce dot com
I just wanted to add that I opened up a thread on iis.net forum to see if I Can
get assistance on that end also.
http://forums.iis.net/p/1181683/1996258.aspx
I am desperately trying to find a fix to this issue.
------------------------------------------------------------------------
[2011-09-18 13:38:09] ken at simplecommerce dot com
I also tried the following:
<?php
echo "Number Format:" . number_format(0.00,2) . '<br />';
echo sprintf("%01.2f", 0).'<br />';
?>
The 2nd one works fine when used with my database query.
But number format causes an error.
Number format works with 0.01 but not 0 or 0.00.
It is really weird.
------------------------------------------------------------------------
[2011-09-18 11:48:53] ken at simplecommerce dot com
We just tried updating the windows server 2008 R2 with all updates to make sure
that none of the updates missing we're part of the problem.
The error still occurs.
------------------------------------------------------------------------
[2011-09-16 16:42:58] ken at simplecommerce dot com
Hi,
The test script I have provided is infact the same one I am using.
The only thing I removed was the login information.
The database I am using is Acomba which is a accounting software.
I have the same setup on PHP 5.2.13 which works flawlessly, except for the
number errors that we are getting ".:" which seems to be fixed in the latest
version of PHP.
Also, the error occurs when using this simple script:
<?php echo number_format(0); ?>
The only difference is that it occurs less frequently than the other script
which queries a database.
I have tried everything I could find online about IIS7 and 500 error messages.
Setup the fastcgi settings like it was mentionned.
Even used the windows installer which is supposed to do it all for you.
No php error is returned to the logs, always the 500 on the browser every 2
refreshes if you account for the ODBC link, if not, it happens once in a while.
The issue, is that our application uses number format and the ODBC link
intensively, so we need to get the 500 error resolved or at least need to
figure out what is causing it.
I do know that when running the same scripts using command line, I do not get
the 500 error but running it in the webpage I do.
Also, when switching from fastcgi to cgi, the error does not occur, but other
problems arises, like 502 errors.
Oh and to add, we also tried 5.3.6 at first, and get the same event errors,
talking about php-cgi.exe and kernelbase.dll.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=55712
--
Edit this bug report at https://bugs.php.net/bug.php?id=55712&edit=1