Re: [PHP] PHP Command line script

2007-05-02 Thread Richard Lynch
On Tue, May 1, 2007 3:13 pm, Nathaniel Hall wrote: > $mysqli = new mysqli('localhost', 'root', 'abc123', 'mydb'); > if (mysqli_connect_errno()) { > echo "Unable to connect to database.\n"; > exit; > } else { > $login = date('m

Re: [PHP] PHP Command line script

2007-05-02 Thread Nathaniel Hall
Greg Donald wrote: On 5/1/07, Nathaniel Hall <[EMAIL PROTECTED]> wrote: > I am attempting to run a script that will run from the command line > nightly to update a field in a database. I already created a script > that would access the database and insert most of the information when a > webpag

RE: [PHP] PHP Command line script

2007-05-02 Thread Peter Lauri
[EMAIL PROTECTED] > Sent: Tuesday, May 01, 2007 10:13 PM > To: php-general@lists.php.net > Subject: [PHP] PHP Command line script > > I am attempting to run a script that will run from the command line > nightly to update a field in a database. I already created a script > that wo

Re: [PHP] PHP Command line script

2007-05-01 Thread Greg Donald
On 5/1/07, Nathaniel Hall <[EMAIL PROTECTED]> wrote: I am attempting to run a script that will run from the command line nightly to update a field in a database. I already created a script that would access the database and insert most of the information when a webpage is visited and I had no pr

Re: [PHP] PHP Command line script

2007-05-01 Thread Nathaniel Hall
Daniel Brown wrote: First and foremost, it's a VERY BAD idea to use root for MySQL. If your code isn't perfect (and even sometimes if it is), arbitrary commands and SQL injection attacks could lead to migraines that no Tylenol will ever be able to alleviate. I changed the user I was conn

Re: [PHP] PHP Command line script

2007-05-01 Thread Daniel Brown
First and foremost, it's a VERY BAD idea to use root for MySQL. If your code isn't perfect (and even sometimes if it is), arbitrary commands and SQL injection attacks could lead to migraines that no Tylenol will ever be able to alleviate. Secondly, what error is the CLI kicking out when yo

[PHP] PHP Command line script

2007-05-01 Thread Nathaniel Hall
I am attempting to run a script that will run from the command line nightly to update a field in a database. I already created a script that would access the database and insert most of the information when a webpage is visited and I had no problems with it. The command line script appears to

Re: [PHP] Command Line Script

2004-10-30 Thread - Edwin -
Hi, On Sat, 30 Oct 2004 09:42:13 -0400 "Steve Douville" <[EMAIL PROTECTED]> wrote: > > > > If you want to stick with PHP, you're better off using an > > ssh key, so that you're not prompted for the password. > > > > Ahh, okay thanks. If anyone can point me to some useful > docs, I'd appreciate i

Re: [PHP] Command Line Script

2004-10-30 Thread Steve Douville
> > If you want to stick with PHP, you're better off using an ssh key, so that > you're not prompted for the password. > Ahh, okay thanks. If anyone can point me to some useful docs, I'd appreciate it. I've been looking on google but not really sure what's right and what's not. Thanks, Steve --

Re: [PHP] Command Line Script

2004-10-29 Thread Chris Shiflett
--- Steve Douville <[EMAIL PROTECTED]> wrote: > I'm trying to write something to run as a cron job that will > perform an sftp command and then run a batch file. I was trying > to use: > > system("sftp [EMAIL PROTECTED]") > > But that stalls and waits for a password before continuing with > the s

[PHP] Command Line Script

2004-10-29 Thread Steve Douville
I'm trying to write something to run as a cron job that will perform an sftp command and then run a batch file. I was trying to use: system("sftp [EMAIL PROTECTED]") But that stalls and waits for a password before continuing with the script. Any ideas on how to pass the password when it's prompte