[ka-Map-users] precache from a web page

percy percyd at pdx.edu
Sat Aug 5 20:31:41 EDT 2006

We struggled for quite a while to get the precache2.php script to run 
from the command line.

Since we are in a university setting, we have less control over actual 
server settings without going through a lengthy request process. Plus, 
php really isn't intended to be run as CLI.

By modifying the top of the script as follows we were able to get the 
script to run from a web browser. The time limit is the obvious factor, 
as most servers have a maximum of 30 or 60 seconds for a script.
In addition, we wrapped an echo "<pre>"; and the closing version around 
the script to get processing details.

Hope this helps someone else!
PSU Geology


//if(!isset($argv)) {
//    exit('This is a command line utility');


echo "<pre>";
--- rest of script here ---
echo "</pre>";

More information about the ka-Map-users mailing list