sometimes Apache is running, but php is not.
now to check if php is running or not, run this command in your console or puTTy if you use it:
if it is restarted with Green OK, then yes php is running on your server. if not, then you need to fix that issue.
you need to test php file on your server using the php code here:
save the php file and upload it to your server root /www/ and then in the browser see it if working or not...