From: [EMAIL PROTECTED] Operating system: Linux 2.4.25 PHP version: 4.3.4 PHP Bug Type: Filesystem function related Bug description: fopen() does no longer create non-existant files when issued with "w"
Description: ------------ I just switched linux kernels from 2.4.10 to 2.4.25, and now a script like this: <?php $fp = fopen("./test.txt", "w"); fputs($fp, "lalala"); fclose($fp); ?> tells me: Warning: fopen(./test.txt): failed to open stream: Invalid argument in /var/wwwroot/test.php on line 3 Warning: fputs(): supplied argument is not a valid stream resource in /var/wwwroot/test.php on line 4 Warning: fclose(): supplied argument is not a valid stream resource in /var/wwwroot/test.php on line 5 I then switched from PHP 4.3.1 to 4.3.4, with the same result. Apache ist 1.3.27. Ran smooth since month. Apache process runs as user "wwwadmin", creating the file via commandline with "touch ./test.txt" works. Safe mode definitifely not enabled. No error messages in Apache error log or system logs. When I create the file on the command line, the error does not occur and fopen() works as expected. When I boot with Linux kernel 2.4.10, the error does not occur. -- Edit bug report at http://bugs.php.net/?id=27382&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27382&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27382&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27382&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27382&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27382&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27382&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27382&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27382&r=support Expected behavior: http://bugs.php.net/fix.php?id=27382&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27382&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27382&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27382&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27382&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27382&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27382&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27382&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27382&r=float