View Full Version : issue with Quercus 4.0.1 and long numbers

11-12-2009, 12:14 PM
I found an issue with Quercus with really long numbers. Consider this input file:



print("location 1: var1=$var1");


Under Glassfish, running on a 64 bit JVM under MacOSX, I get a "500 server error" with exception:

java.lang.NumberFormatException: For input string: "9999999999999999999999999"

In the log file (this is trimmed to the items most relevant, I have the whole stack trace if anybody is interested):

[#|2009-11-09T13:49:40.251-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web |_ThreadID=30;_ThreadName=httpSSLWorkerThread-9080-0;_RequestID=d76033e0-104d-4d55-99e5-02a7c92ac6f4;|StandardWrapperValve[Quercus Servlet]: PWC1406: Servlet.service() for servlet Quercus Servlet threw exception
java.lang.NumberFormatException: For input string: "9999999999999999999999999"
at java.lang.NumberFormatException.forInputString(Num berFormatException.java:48)
at java.lang.Long.parseLong(Long.java:422)
at java.lang.Long.parseLong(Long.java:468)
at com.caucho.quercus.parser.QuercusParser.parseTermB ase(QuercusParser.java:3090)
at com.caucho.quercus.parser.QuercusParser.parseTerm( QuercusParser.java:2760)
at com.caucho.quercus.parser.QuercusParser.parseAssig nExpr(QuercusParser.java:2610)
at com.caucho.quercus.parser.QuercusParser.parseMulEx pr(QuercusParser.java:2582)
at com.caucho.quercus.parser.QuercusParser.parseAddEx pr(QuercusParser.java:2554)

Whereas under Apache:

location 1: var1=1.0E+25

My goal is to get phpMyFAQ 2.5.2 running under Quercus 4.0.1. We've run phpMyFAQ 2.0.15 with Quercus 3.1.6. This particular issue exists with Quercus 3.1.6 as well, but we just discovered it.

Thanks for your help.

Ari Shamash

11-12-2009, 05:51 PM
PHP converts numbers larger than 32-bit to floats.

I've reported this as a bug at:

03-23-2010, 11:10 AM
nam thanks for helping i was having same problems

03-31-2010, 06:58 PM
Fixed for 4.0.6