Welcome, Guest. Please Login or Register.
July 10, 2020, 01:12:37 PM
Home Help Search Login 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  |  Topic: 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 1235 times)
percherie
Full Member
***
Posts: 177


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


WWW
I found A error in file install.php
« on: April 19, 2003, 11:15:14 AM »
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

Code: [Select]
         {
            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


Code: [Select]
         {
               $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



WWW
Re:I found A error in file install.php
« Reply #1 on: April 19, 2003, 12: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  |  Topic: 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.0.15 | SMF © 2017, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.126 seconds with 19 queries.