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] php command

2005-03-23 Thread Mikey
I think what you need to do is look at the sockets section of the manual. Regards, Mikey > -Original Message- > From: D A GERM [mailto:[EMAIL PROTECTED] > Sent: 23 March 2005 14:46 > To: php-general@lists.php.net > Subject: [PHP] php command > > is there a comma

[PHP] php command

2005-03-23 Thread D A GERM
is there a command that will allow me to connect to another box and execute commands? for instance, I want to create an automated php script that will connect to a unix box and run a series of commands. I believe that ssh2_exec() and ssh2_shell() are not supported in the 4.3.4 version of php I

Re: [PHP] php command to open a url?

2004-10-31 Thread Lists
header ("Location: ./"); exit; I use the above at the end of a authorization script, to direct back to a page. On Oct 31, 2004, at 12:03 PM, Ken Tozier wrote: I've been looking around in the php documentation for a couple of hours now but can't seem to find any functions to open a url in the

[PHP] php command to open a url?

2004-10-31 Thread Ken Tozier
I've been looking around in the php documentation for a couple of hours now but can't seem to find any functions to open a url in the current browser window. Does php allow this? If so, could someone point me to a link? Basically what I'm trying to do is loop back in a login form until a user

Re: [PHP] PHP Command Line Scripts 'Aborting' at end ...

2004-10-27 Thread Curt Zirzow
* Thus wrote Marc G. Fournier: > > Note that the following is based on php installed via the FreeBSD ports > system ... > > > > I'm getting a core file, but if I try: > > gdb /usr/local/bin/php php.core ... its definitely not looking good: > > s# gdb /usr/local/bin/php php.core > ... > > Co

Re: [PHP] PHP Command Line Scripts 'Aborting' at end ...

2004-10-27 Thread Marc G. Fournier
I just did a reinstall from ports, and it works now as well ... maybe a stale library for one of hte modules :( thanks ... On Wed, 27 Oct 2004, Greg Donald wrote: On Wed, 27 Oct 2004 13:44:54 -0300 (ADT), Marc G. Fournier <[EMAIL PROTECTED]> wrote: I have a really simple PHP script that, when you

Re: [PHP] PHP Command Line Scripts 'Aborting' at end ...

2004-10-27 Thread Greg Donald
On Wed, 27 Oct 2004 13:44:54 -0300 (ADT), Marc G. Fournier <[EMAIL PROTECTED]> wrote: > > I have a really simple PHP script that, when you run it, generates an > Abort at the end of it: > > ams# /tmp/test.php > testAbort (core dumped) I just installed php4-cgi on a FreeBSD 4.10 system I have. T

Re: [PHP] PHP Command Line Scripts 'Aborting' at end ...

2004-10-27 Thread Greg Donald
On Wed, 27 Oct 2004 13:44:54 -0300 (ADT), Marc G. Fournier <[EMAIL PROTECTED]> wrote: > > Not sure how to debug ... help? You said you installed in via ports, so did you happen to check the 'debug' option when you installed it? [ ] DEBUG Enable debug Just a question.. as that might help exp

[PHP] PHP Command Line Scripts 'Aborting' at end ...

2004-10-27 Thread Marc G. Fournier
Note that the following is based on php installed via the FreeBSD ports system ... I have a really simple PHP script that, when you run it, generates an Abort at the end of it: ams# /tmp/test.php testAbort (core dumped) ams# cat /tmp/test.php #!/usr/local/bin/php Even if I change the script sl

Re: [PHP] PHP command line vars

2003-11-18 Thread Shawn McKenzie
Thanks! The link was just what I needed. -Shawn "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Shawn McKenzie wrote: > > > I have a script that I want to run on the windows command line, and it is > > working fine. What I want to do is pass vars to the script wh

Re: [PHP] PHP command line vars

2003-11-18 Thread Marek Kilimajer
Shawn McKenzie wrote: I have a script that I want to run on the windows command line, and it is working fine. What I want to do is pass vars to the script when I run it, example: php script.php $var=hello The example will not work, command line arguments are traditionaly passed in the form of:

[PHP] PHP command line vars

2003-11-18 Thread Shawn McKenzie
I have a script that I want to run on the windows command line, and it is working fine. What I want to do is pass vars to the script when I run it, example: php script.php $var=hello I have read the docs but can't find the syntax to pass these in. Also, how to retrieve them in the script? argv

[PHP] PHP & Command Line

2002-07-08 Thread Gedma
Hej Forum, i've a big problem! I must start from PHP a shell command. In particular the java command. If i run only the command "java" ex: system("/usr/bin/java/jdk1.1.3/bin/java") i can see the results. If i append to the command few parameter ex: system("/usr/bin/java/jdk1.1.3/bin/java -vers

Re: [PHP] PHP command for redirect?

2002-05-29 Thread Miguel Cruz
On Wed, 29 May 2002, Tim Thorburn wrote: > The error the header() command is giving me now is: > > Warning: Cannot add header information - headers already sent by (output > started at \registrations\reg_mudfling.php:5) > > I've moved the header command around (line position) and still nothing

Re: [PHP] PHP command for redirect?

2002-05-29 Thread Tim Thorburn
The error the header() command is giving me now is: Warning: Cannot add header information - headers already sent by (output started at \registrations\reg_mudfling.php:5) I've moved the header command around (line position) and still nothing ... not sure why its suddenly not working. I've bee

Re: [PHP] PHP command for redirect?

2002-05-29 Thread Jason Wong
On Wednesday 29 May 2002 15:37, Tim Thorburn wrote: > Hi, > > I'm setting up an error checking element to a registration site and would > like to redirect the user to a certain page if they missed any fields on > the previous registration page ... the problem is I can't seem to find a > redirect c

[PHP] PHP command for redirect?

2002-05-29 Thread Tim Thorburn
Hi, I'm setting up an error checking element to a registration site and would like to redirect the user to a certain page if they missed any fields on the previous registration page ... the problem is I can't seem to find a redirect command for PHP. I was using the header command, but its giv

[PHP] php command line

2002-04-30 Thread Ezra Nugroho
I was trying to compile php command line and got some problem. Maybe some of you can help. version: 4.1.2 I did: ./configure --with-ldap --with-oracle --with-oci8 --with-mysql=/usr/src/mysql-3.23.43-pc-linux-gnu-i686 --enable-track-vars --disable-debug --prefix=/usr/local/apache/php --with-con

[PHP] PHP command line scripting multiple process forking

2002-03-21 Thread Walker, Roy
I have been playing with this for a couple of days and have run into a few issues: I am wanting to run a set number of multiple processes (ie 25 at a time). I can't use the exec command since it will not wait for the output (this is a delayed response - network based). $cmd = "/path.to/some.cmd

Re: [PHP] PHP command for issuing UNIX command???

2001-12-14 Thread J.F.Kishor
hello scott, Yes..! you can use system() comand It goes like this system("touch filename.ext"); // creates a file and file will be owned by nobody If you want to change the file permission do the following chmod("filepath/filename", 755); decimal; probably

Re: [PHP] PHP command for issuing UNIX command???

2001-12-14 Thread Dan McCullough
can > - Original Message - > From: "Scott Fletcher" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, December 14, 2001 10:54 AM > Subject: [PHP] PHP command for issuing UNIX command??? > > > > Hi! > > > > I wanted t

Re: [PHP] PHP command for issuing UNIX command???

2001-12-14 Thread R'twick Niceorgaw
ember 14, 2001 10:54 AM Subject: [PHP] PHP command for issuing UNIX command??? > Hi! > > I wanted to know if there is a PHP code or function that would allow the > PHP to issue the UNIX command. > > What I'm doing here is I'm trying to tell PHP to create a file

[PHP] PHP command for issuing UNIX command???

2001-12-14 Thread Scott Fletcher
Hi! I wanted to know if there is a PHP code or function that would allow the PHP to issue the UNIX command. What I'm doing here is I'm trying to tell PHP to create a file by issuing hte UNIX command then I can use the PHP to open the file to enter the data. Once I'm done with the file,