문제

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

It happens when I try to write 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);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top