From:             weife01 at ca dot com
Operating system: Windows2000
PHP version:      4.3.2
PHP Bug Type:     Filesystem function related
Bug description:  On windows2000, only Unix EOF works

Description:
------------
I have a client who runs PHP on Windows and use the PHP script calling my
program, which it initialize the DB connection. My initialization will
fail if one of the text file my program reads is in Windows format with
EOL as \r\n. If I feed it with Unix format as EOL(\n only), the
initialization is succeed. By debugging my own code, I found that my
fgets, when calling by PHP script, always return one more byte than it
should, means it doesn't recognize the \r on Windows as part of EOL. I
have my client set the auto_detect_line_endings in his php.ini, but it
didn't help.
I have seen that you have similar bug 16708 reported, but this bug sounds
reverse. I wonder if the fgets alters runtime library, and cause my fgets
gets altered?

Reproduce code:
---------------
My program breaks only when calling by PHP, but I was unable to attach it
here because of it's size.


-- 
Edit bug report at http://bugs.php.net/?id=24991&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24991&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24991&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24991&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24991&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24991&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24991&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24991&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24991&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24991&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24991&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24991&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24991&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24991&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24991&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24991&r=gnused

Reply via email to