View Single Post
Old 03-01-2004, 08:14 AM   #8
paullind
Orange Mole
 
Join Date: Jan 2004
Posts: 30
apache mod no argv passing - getting closer though

Hi

Settings: register_argc_argv=on

I've discovered that an Apache mod install of php does not permit the passing of variables from a a shell command to a php script argv variable.

My isp host suggested this fix to be placed in the spider.php, I placed it just inside the first if statement of spider.php:
foreach ($_GET as $name=> $value)
{
$argv = explode("+", $name);
array_shift ($argv);
}
///this to print out whats passed
foreach ($argv as $key=> $value)
{
echo "the key is $key the value is $value ";
}

It prints out the following in a log file:
-----------------
the key is 1 the value is http:www.yahoo.com Usage: php -f spider.php [option]
Opts: all (default)
forceall
http://something
filename [containing list of urls]
--------------------


So it now seems to be passing the website url to spider but unfortunteltly is doing nothing with it as it does not show up on the list of spidered sites in the admin page.

Should I place this code elsewhere in the script? Or modify it?

Thanks again,
paullind is offline   Reply With Quote