There are two options.
Access the php file through a local webserver(ie thru a local website). The web-server will deal with the requested php file. It will use either,
- Inbuilt PHP module to interpret the php file, or
PHP through CGI (eg.CGI, FastCGI)
If your apache(check if apache is running using
service apache2 status!!) is set to the default configuration, this could be as simple as
Remember by default, the base directory for apache is
/var/www/html/, so you need not include this in the url.
Use the php binary directly from a terminal.