Is there a tutorial for custom post processing scripts? My script is triggered but doesn't seem to receive variables

I switched to develop to use the custom post processing method but I’m not sure how it works exactly. I entered the path to a PHP-script (this being the language I am most fluent in) and the script is triggered but the §_ENV array which should hold the environment variables is empty. Is there a a guide that explains how to use this feature? I found this but it’s just a list of variables. Are they all passed onto the script automatically or do you have to configure it somehow in Settings => Connect? I noticed that there is an “Arguments” field but adding something there will also add it in the “Path” field and then the script won’t run.

This is my test script btw:

#!/usr/bin/php

<?php

file_put_contents('/tmp/test.txt', print_r($_ENV, true));

?>

TIA
SoWhy

Someone else put something together for PHP as a PoC:

1 Like

Thanks for the link. I’m always confused what problems PHP seems to have. The solution you posted works indeed, so thanks for the Post-Processing feature. It makes switching from SB much easier :smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.