Dynadot — .com Registration $8.99

This Cron Job isn't running

Spaceship Spaceship
Watch

user-7256

VIP Member
Impact
111
This:

Code:
/usr/bin/php -q /home/{username omitted}/public_html/grabber.php?AccessCode={omitted for security reasons}

I'm 100% positive the path is correct... but what does that -q do? I just want it to run the PHP script, nothing special... just execute the file...
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I just ran the same script with and without -q on a linux Debian. and both work.
Code:
Usage: php [options] [-f] <file> [args...]
       php [options] -r <code> [args...]
       php [options] [-- args...]
  -a               Run interactively
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse <file>.
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -r <code>        Run PHP <code> without using script tags <?..?>
  -s               Display colour syntax highlighted source.
  -v               Version number
  -w               Display source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.

  args...          Arguments passed to script. Use -- args when first argument
                   starts with - or script is read from stdin
I dont see any -q here....
 
0
•••
you dont need to run the q to execute a php on a system root, also for added secruity move the php script out side of your public_html folder into your account root. this will mean it cant be accessed from the web then.
 
0
•••
I'm almost certain you can't pass variables in a query string when running PHP from the shell/cron.

Either hard code the $AccessCode variable into your script, or write a small php script that sets the variable you need and includes() the old script.
 
0
•••
Well that AccessCode is used so others don't run the query and mess up my website, it quits if the access code does not match the one in the code...
 
0
•••
compuXP said:
Well that AccessCode is used so others don't run the query and mess up my website, it quits if the access code does not match the one in the code...


Then put the cronjobs in your root directory, below public_html like normal people :)
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back