FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Messed up my private message file...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: I'm fixing to have to travel away from the computer for a while... [message #13987 is a reply to message #13985] Sun, 02 November 2003 20:24 Go to previous messageGo to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma:
Senior Member
Administrator
Core Developer
1) In the future please do not paste files into messages, attach them instead it makes my life much easier.

As for the fix try the following, replace this:
<?php
unction write_pmsg_body
($text)
{
$fp = fopen($GLOBALS['MSG_STORE_DIR'].'private', 'ab');

if( !(
$s = ftell($fp)) ) $s = __ffilesize($fp);

fwrite($fp, $text);
fflush($fp);
$len = (ftell($fp)-$s);
fclose($fp);

if( !
$s ) chmod($GLOBALS['MSG_STORE_DIR'].'private', 0600);

return array(
$s,$len);
}
?>


with

<?php
$fp
= fopen($GLOBALS['MSG_STORE_DIR'].'private', 'ab');

        
fseek($fp, 0, SEEK_END);
        if (!(
$s = ftell($fp))) {
                
$s = __ffilesize($fp);
        }

        if ((
$len = fwrite($fp, $text)) !== strlen($text)) {
                exit(
"FATAL ERROR: system has ran out of disk space
\n"
);
        }
        
fclose($fp);

return array(
$s, $len);
?>


However, I'd strongly recommend upgrading your FUDforum version.


FUDforum Core Developer
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message icon14.gif
Read Message
Previous Topic: Multiple FUDforum fron single install
Next Topic: Member account activity question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Sep 09 07:30:23 GMT 2024

Total time taken to generate the page: 0.07456 seconds