Bug #52141 [NEW]: little problem

From: Date: Tue, 22 Jun 2010 10:05:53 +0000
Subject: Bug #52141 [NEW]: little problem
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-8406@lists.php.net to get a copy of this message
From: Operating system: ubuntu PHP version: Irrelevant Package: Website problem Bug Type: Bug Bug description:little problem Description: ------------ Beispiel #1 Ein einfaches Beispiel für fwrite: does not work, because is_writeable is before fopen i had to change to: 1. fopen and than: 2. is_writeable and 3. fwrite otherwise an error occurs, saying file xy is not writeable greetings.h. Test script: --------------- this works on my webspace (already changed from the php.net.example) //--bildtexte-einschreiben $filename = "upload_anonym/" . $name.".txt"; if (!$handle = fopen($filename, "w")){ print "Kann die Datei $filename nicht öffnen"; exit; } if (is_writable($filename)) { if (!fwrite($handle, $bildtext)) { print "Kann in die Datei $filename nicht schreiben"; exit; } print "<span style=\"background-color:#ad8; font-size:0.9em;\">Bildtexte gespeichert in: ".$filename."</span>"; fclose($handle); }else{ print "Die Datei $filename ist nicht beschreibbar."; } //-------------------------- Expected result: ---------------- text file containing a picture description Actual result: -------------- kk -- Edit bug report at http://bugs.php.net/bug.php?id=52141&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52141&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52141&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52141&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52141&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52141&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52141&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52141&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52141&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52141&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52141&r=support Expected behavior: http://bugs.php.net/fix.php?id=52141&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52141&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52141&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52141&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52141&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52141&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52141&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52141&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52141&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52141&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52141&r=mysqlcfg

« previous php.webmaster (#8406) next »