Question

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

Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top