Change the owner of that file to apache, chown apache:apache test.php
and make sure it has rw access to that file.
The permission can be something like:
-rw-r--r--
You can get this permission with chmod 644 test.php
When you access this page through a browser, apache reads that file...and if you make apache the owner of that file it must have read access to it. If you are the owner of that file you must make the 'others' group have read access to that file...like dalecosp suggests.