PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Submissions

Reply
 
Thread Tools
Old 02-10-2004, 07:48 PM   #1
bsw114
Green Mole
 
Join Date: Feb 2004
Posts: 3
Angry argc and argv empty when running spider.php from the shell

When trying to index from the shell by passing in a file of URLs the engine bails without indexing. I realized that the $argc and $argv values were empty. Perhaps the implementation depends on some PHP setting such as register_argc_argv=on. Regardless of why this happens, an easy fix is to just assign them from the $_SERVER array and all appears to work fine... Can somebody roll this into the spider.php script?

$argc = $_SERVER["argc"];
$argv = $_SERVER["argv"];
bsw114 is offline   Reply With Quote
Old 02-20-2004, 07:52 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Yes, register_argc_argv should be set to on for $argc and $argv to be available from shell. From php.net is the following:

$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the webserver. There is no guarantee that every webserver will provide any of these; servers may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the CGI 1.1 specification, so you should be able to expect those.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spider.php in shell don't work TikkY Troubleshooting 1 03-25-2006 06:02 PM
Permissions when running phpdig from shell ! ipguy Troubleshooting 0 01-17-2006 02:33 PM
trouble running the spider bforsyth Troubleshooting 2 12-20-2004 03:33 PM
Problem running spider from Command Line joshuag200 Troubleshooting 17 09-13-2004 07:57 PM
Empty index.php screen after install BebopBogo Troubleshooting 6 08-17-2004 09:14 PM


All times are GMT -8. The time now is 04:59 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.