One possibility should be to let the SSI-files be parsed by PHP. You can achieve this with the .htaccess-file:
AddType application/x-httpd-php .ssi
SSI only includes the file. This is done before it is parsed by PHP. So, only the source is included (unparsed). You have to parse the file now to get the result of the script.
I hope this will help you
wurstbrot