开发者

writing to log file causes error 704

Does anyone know what this error means FATAL: Autorisation no longer valid.704

It happens when I try to wri开发者_Python百科te to this file, but the permissions are set to 755 and 0644 The temp folder is in the rootfolder of this subdomain.

if ($handle = fopen( 'temp/mylog.log'"a+") )
                {
    if( !fwrite( $handle, $json ) )
    {
    throw new Exception("can't write to ...");
    }
    fclose( $handle );
    }

thanks, Richard


Does the user who run that script own that folder/file?

do a list

# ls -l /rootfolder/temp/

to get the user who has privileges to modify the file, I suppose it is root

do from your shell the following to allow your user to access the file (change user with your username)

# chown user /rootfolder/temp/mylog.log

also use the full path in fopen.

UPDATE:
use this simple steps to write file, if you get errors then it may be something related to permissions

$myFile = "/home/woonbel/public_html/tsa.nl/temp/tsa.log";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Some of your text...bla bla\n";
fwrite($fh, $stringData);
fclose($fh);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜