PHP: using from the shell command line (use php-cli)

A long-running project uses PHP for the somewhat slow creation of some databases tables and dynamic javascript arrays.

The shell script that calls the PHP uses curl to make the scripts work. Alas the hosting provider offers a shared service and the PHP scripts often time out.

A way to run your scripts that rely on HTTP $_GET, is to use php-cli as the engine and not the normal PHP processor. In this way, you can test your PHP scripts from the command line as if they are pulled using HTTP.

Be aware that this needs to be enabled for your system and that there is normally a separate php.ini file for it.

The original post has gone, but more info here.