Welcome, Guest. Please Login or Register.
November 28, 2024, 03:39:30 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  General Category  |  Feedback  |  I found A error in file install.php « previous next »
Pages: [1] Reply Ignore Print
Author Topic: I found A error in file install.php  (Read 2128 times)
percherie
Full Member
***
Posts: 177


Si t'en perd trops tu risque de ressembler à ça

percherie@tiscali.fr WWW
I found A error in file install.php
« on: April 19, 2003, 04:15:14 PM »
Reply with quote

Hello, (scuse my english)

I found a bothering enough mistake in file install.php  
 
Line 437:  
               $fp = fopen($filename, ' w');  
 
This method creates of lines supplementary emptiness has the creation of files and increase their size of Ko plusieur but most annoying is that this mistake prevents the normal use of mod and their installation  
 
Instead me uses:  
               $fp = fopen($filename, ' wb');  
 
the variable b is ignored automatic when there is not need of it  

http://www.php.net/manual/fr/function.fopen.php


         {
            if (in_array(substr($filename, -4), array('.php', '.lng', '.txt')))
               $fp = fopen($filename, 'wb');
            else
               $fp = fopen($filename, 'wb');
            fputs($fp, fread($ya, $data[2]), $data[2]);
            fclose($fp);

            chmod($filename, 0666);
            touch($filename, $data[3]);
            echo '
      Ecriture de <i>' . $filename . '</i> réussie.<br />';
         }



Is now



         {
               $fp = fopen($filename, 'wb');
            fputs($fp, fread($ya, $data[2]), $data[2]);
            fclose($fp);

            chmod($filename, 0666);
            touch($filename, $data[3]);
            echo '
      Ecriture de <i>' . $filename . '</i> réussie.<br />';
         }


But i am a novice in PHP langage,
I can make mistakes  
 
If I explained myself badly contact me, so possible in French,
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:I found A error in file install.php
« Reply #1 on: April 19, 2003, 05:07:58 PM »
Reply with quote

Errm... it should be in text mode.

There is an error though, it should close the file...

-[Unknown]
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  General Category  |  Feedback  |  I found A error in file install.php « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.043 seconds with 21 queries.