First line of config files being written to

I have a fresh install of Piwik on Ubuntu 16.04 running PHP 7. Everything seems like it’s working, but about every 5 minutes or so, my global.php, global.ini.php, and config.ini.php files all have a single line of php written to the beginning of the file, like so:

When that line is there, the install is borked with php errors along the lines of “Unable to read INI file {/path/to/file/piwik/config/global.ini.php}: Syntax error in INI configuration: Your host may have disabled parse_ini_file”
I can remove the line and Piwik comes back up. But then the line gets written back in, and it goes down again.
Any thoughts? Thanks!!

Hi there,

unfortunately it looks like your server has been hacked and it has infected piwik as well. What other software do you run on the server? you need to upgrade them and if possible restore from backup

Thanks. I thought it was odd behaviour. It must be Wordpress :frowning:

I very much appreciate the response!