Re: Scheduling a PHP script
| From: | Dennis Freise | Date: | Mon, 14 Jun 2004 12:20:22 +0000 |
| Subject: | Re: Scheduling a PHP script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188208@lists.php.net to get a copy of this message | ||
On Mon, 14 Jun 2004 12:10:30 +0100
"Phil Ewington - 43 Plc" <phil.ewington@43plc.com> wrote:
> PHP
> ---------
> /usr/bin/php /home/sites/home/web/schedules/index.php arg1 arg2 arg3
>
> After resolving include path issues using ini_set() I get... Call to
> undefined function: mysql_connect().
> I assume that all mysql functions are unavailable??
Is your commandline php executable compiled --with-mysql ?
> curl
> ---------
> /usr/bin/curl -u username:password
> http://www.domain.com/script.php?arg1=a&arg2=b&arg3=c
When issuing commands through bash (or alike) you need to surround the string
with double-quotes ("), because & is a bash-operator, meaning "put into
background". With the command above you will execute "/usr/bin/curl -u
username:password http://www.domain.com/script.php?arg1=a"
in the background,
"arg2=b" in the background, and "arg3=c" in the foreground ;)
The correct command is:
/usr/bin/curl -u username:password
"http://www.domain.com/script.php?arg1=a&arg2=b&arg3=c"
This also applies to wget, lynx and all other commandline tools you can imagine
;-)
--
Dennis Freise <cat@final-frontier.ath.cx>
GnuPG key: 2DE8 CCEF 6E20 11D4 3B27 21EC B0BA 1749 D2C8 38ED
Available at: http://www.final-frontier.ath.cx/?key-plain
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]