[advanced search]
Results from the most recent live auction are here.
13 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read

System Maintenance: NamePros will be offline for 20 minutes at the top of the hour (4AM EST)

Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 06-03-2008, 10:16 AM   · #1
Maurizio1230
NamePros Regular
 
Maurizio1230's Avatar
 
Trader Rating: (0)
Join Date: Jan 2007
Posts: 315
NP$: 2250.00 (Donate)
Maurizio1230 is on a distinguished road
php command line

Hi all,

What is the command and the imput (if it exist)?

php -q -f /path/file.php

Thank you very much


Please register or log-in into NamePros to hide ads
Maurizio1230 is offline   Reply With Quote
Old 06-03-2008, 10:39 AM   · #2
Peter
NamePros Staff
 
Peter's Avatar
 
Name: Peter
Location: Scotland
Trader Rating: (45)
Join Date: Nov 2003
Posts: 4,169
NP$: 1032.15 (Donate)
Peter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud ofPeter has much to be proud of
Child Abuse Save The Children Save The Children
The following should help greatly. It is the official documentation for using phpin the command line:-

http://uk2.php.net/features.commandline
Peter is offline   Reply With Quote
Old 06-03-2008, 05:57 PM   · #3
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 
Name: Eric
Location: Kentucky
Trader Rating: (142)
Join Date: Mar 2005
Posts: 4,239
NP$: 409.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
I'm assuming you're using that in cron?

-q tells cron basically to "be quiet"
-f tells php to parse and execute the file, which in this case, is: /path/file.php


Code:
[root@manbearpig ~]# php -h Usage: php [options] [-f] <file> [--] [args...] php [options] -r <code> [--] [args...] php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...] php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...] php [options] -- [args...] php [options] -a -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 and execute <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 <?..?> -B <begin_code> Run PHP <begin_code> before processing input lines -R <code> Run PHP <code> for every input line -F <file> Parse and execute <file> for every input line -E <end_code> Run PHP <end_code> after processing all input lines -H Hide any passed arguments from external tools. -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 --ini Show configuration file names --rf <name> Show information about function <name>. --rc <name> Show information about class <name>. --re <name> Show information about extension <name>. --ri <name> Show configuration for extension <name>.
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.2 now available!!
MetaCreator.com - Free Meta Tag Creator
CodingPlanet.com - Coming soon...
SecondVersion is offline   Reply With Quote
Old 06-05-2008, 10:07 AM   · #4
Maurizio1230
NamePros Regular
 
Maurizio1230's Avatar
 
Trader Rating: (0)
Join Date: Jan 2007
Posts: 315
NP$: 2250.00 (Donate)
Maurizio1230 is on a distinguished road
Yes, it is for cronjob but now I tried all like a command and it works.
Maybe because "Input to command" is something to be piped into the command...my command is the whole thing. e.g.: Command: php -q -f /your/path/to/awbs/tools/master_cron.php
And the input field should be empty, as there is nothing to pipe into the command. The input field is usually used for email text or some other bunch of text to inject into a particular command.

Thank you very much
Maurizio1230 is offline   Reply With Quote
Reply

NamePros is a revenue sharing forum.

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

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


Site Sponsors
http://www.mobisitetrader.com/ YUPPADS http://www.mobisitetrader.com/
Advertise your business at NamePros
All times are GMT -7. The time now is 12:41 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0