Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1950 | minor | always | 08-20-07 02:01 | 08-20-07 12:20 | |
|
|||||
Reporter: | ntherning | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.2 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.3 | ||
|
|||||
Summary: | 0001950: Bug in FileInputOutput.isEOF() | ||||
Description: |
I tried to install drupal 5.2. There's a while-loop in includes/install.inc around line 181 which never terminates. It looks something like this: if ($fp = @fopen($settings_file, 'r+')) { // Step line by line through settings.php. while (!feof($fp)) { $line = fgets($fp); ... } } Apparently feof($fp) always returns false even if the file has been consumed. I found an issue with the isEOF() methid in FileInputOutput. The line return _stream.getFilePointer() == _stream.getLength() - 1; should be return _stream.getFilePointer() == _stream.getLength(); since filePointer will point at the position right after the last byte in the stream when the file has been consumed. After applying this fix drupal installed nicely without any other problems. |
||||
Steps To Reproduce: | |||||
Additional Information: |
I'm using quercus from svn revision 2959. The com.caucho.(util|config|vfs) sources are from the resin 3.1.2 sources. More system info: apache-tomcat-5.5.23 java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Ubuntu 7.04 Linux 2.6.20-15-generic 0000002 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|