0
Under review

events script

Marc 3 weeks ago updated 3 weeks ago 2

Hello,

I tried the upload event script in your example and result was fine.

I add some lines to be able to look a $data like this :

<?php
chmod($data['full_path'], 0666);
$s = print_r($data,true);
$f = fopen('/madam/my.log','w');
fwrite($f,$s);
fclose($f);
?>

That was ok too.

I removed the chmod line and duplicate the file to metadata_changed.php like this:

[admin@madam events]$ ll /var/www/html/cora/customizables/events/

-rwxrwxrw-. 1 apache apache 128 Nov 18 17:15 metadata_changed.php
-rwxrwxrw-. 1 apache apache 128 Nov 18 17:18 upload.php

But nothing happened. What's wrong ?

Under review

Just to make sure I understand correctly. In case of a file upload, the script works, the chmod gets applied, the log written. But in the case you are chaning metadata, even though the action gets logged to the FileRun user activity log, the script does not run? (add a print_r($data); and see if this gets printed out when you are making the metadata change on a file)

I added a print_r($data) as suggested. But nothing was printed and no log file generated by the script.

Looking at user activity log the metadata change is not there.

here is metadata_changed.php

<?php
print_r($data);
$s = print_r($data,true);
$f = fopen('/cora/datas/my.log','w');
fwrite($f,'METADATA\n');
fwrite($f,$s);
fclose($f);
?>