go to bug id or search bugs for
If you read a (binary) file character by character with fgetc() you can't read the whole file because you get the EOF before the end of the file. If you try to read the file further with fgetc() you always get the EOF and the variable you read the character into is not set or empty (I don't know which of these, but I think is empty).
This appears in the Windows-version (PWS/isapi-PHP and also
Apache/apache-PHP-module) but not in the Linux-version (Apache/apache-PHP-module DSO).
Add a Patch
Add a Pull Request
I'm very sorry:
fgetc IS bin-safe also on Windows OS, you only have to open the file with fopen(<filename>, "rb") instead of fopen(<filename>, "r"). In PHP3 this don't make a difference but with PHP4 there is this big difference on Windows OS.