Re: [PHP] exec and system do not work

2013-08-27 Thread Daniel Brown
On Sun, Aug 25, 2013 at 11:41 PM, Ethan Rosenberg wrote: > Dear List - > > I'm lost on this one - > > This works - > > $out = system("ls -l ",$retvals); > printf("%s", $out); > > This does - > > echo exec("ls -l"); > > This does not - > > if( !file_exists("/var/www/orders.txt")); > { >$out = s

Re: [PHP] exec and system do not work

2013-08-27 Thread Jim Giner
On 8/26/2013 5:01 PM, Ethan Rosenberg, PhD wrote: On 08/26/2013 03:28 PM, Jim Giner wrote: On 8/26/2013 2:41 PM, Ethan Rosenberg wrote: On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: Tamara Temple hat am 26. August 2013 um 08:33 geschrieben: On Aug 25, 2013, at 10:41 PM, Ethan Rosenb

Re: [PHP] exec and system do not work

2013-08-26 Thread David Robley
"Ethan Rosenberg, PhD" wrote: > > > Ethan Rosenberg, PhD > /Pres/CEO/ > *Hygeia Biomedical Research, Inc* > 2 Cameo Ridge Road > Monsey, NY 10952 > T: 845 352-3908 > F: 845 352-7566 > erosenb...@hygeiabiomedical.com > > On 08/26/2013 07:33 PM, David Robley wrote: >> Ethan Rosenberg wrote: >> >>

Re: [PHP] exec and system do not work

2013-08-26 Thread Jasper Kips
Ethan, A return code of not 0 means an error occured. Probably /var/www is not writable. Test that one by doing this: $a = is_writable("/var/www); var_dump($a); If that says anything else than (boolean) TRUE, you can't write in the directory. Sincerely, Jasper Kips Op 27 aug. 2013, om 02:32

Re: [PHP] exec and system do not work

2013-08-26 Thread Ethan Rosenberg, PhD
Ethan Rosenberg, PhD /Pres/CEO/ *Hygeia Biomedical Research, Inc* 2 Cameo Ridge Road Monsey, NY 10952 T: 845 352-3908 F: 845 352-7566 erosenb...@hygeiabiomedical.com On 08/26/2013 07:33 PM, David Robley wrote: Ethan Rosenberg wrote: On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: Tamara

Re: [PHP] exec and system do not work

2013-08-26 Thread David Robley
Ethan Rosenberg wrote: > > On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: >> >> >>> Tamara Temple hat am 26. August 2013 um 08:33 >>> geschrieben: >>> >>> >>> >>> On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg >>> wrote: >>> Dear List - I'm lost on this one - This works

Re: [PHP] exec and system do not work

2013-08-26 Thread Ethan Rosenberg, PhD
On 08/26/2013 03:28 PM, Jim Giner wrote: On 8/26/2013 2:41 PM, Ethan Rosenberg wrote: On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: Tamara Temple hat am 26. August 2013 um 08:33 geschrieben: On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg wrote: Dear List - I'm lost on this one -

Re: [PHP] exec and system do not work

2013-08-26 Thread Tamara Temple
On Aug 26, 2013, at 1:41 PM, Ethan Rosenberg wrote: > On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: >>> Tamara Temple hat am 26. August 2013 um 08:33 >>> geschrieben: >>> >>> >>> >>> On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg >>> wrote: >>> Dear List - I'm lost on this

Re: [PHP] exec and system do not work

2013-08-26 Thread ma...@behnke.biz
> Ethan Rosenberg hat am 26. August 2013 um > 20:41 geschrieben: > >  > Please show the output of the directory listing. >  > Please us "ls -la" > > echo exec('ls -la orders.txt'); > > -rw-rw-rw- 1 ethan ethan 43 Aug 25 23:50 orders.txt Please supply the complete output. Especially the rights

Re: [PHP] exec and system do not work

2013-08-26 Thread Jim Giner
On 8/26/2013 2:41 PM, Ethan Rosenberg wrote: On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: Tamara Temple hat am 26. August 2013 um 08:33 geschrieben: On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg wrote: Dear List - I'm lost on this one - This works - $out = system("ls -l ",$retva

Re: [PHP] exec and system do not work

2013-08-26 Thread Ethan Rosenberg
On 08/26/2013 11:36 AM, ma...@behnke.biz wrote: Tamara Temple hat am 26. August 2013 um 08:33 geschrieben: On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg wrote: Dear List - I'm lost on this one - This works - $out = system("ls -l ",$retvals); printf("%s", $out); This does - echo ex

Re: [PHP] exec and system do not work

2013-08-26 Thread ma...@behnke.biz
> Tamara Temple hat am 26. August 2013 um 08:33 > geschrieben: > > > > On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg > wrote: > > > Dear List - > > > > I'm lost on this one - > > > > This works - > > > > $out = system("ls -l ",$retvals); > > printf("%s", $out); > > > > This does - > > > > echo

Re: [PHP] exec and system do not work

2013-08-25 Thread Tamara Temple
On Aug 25, 2013, at 10:41 PM, Ethan Rosenberg wrote: > Dear List - > > I'm lost on this one - > > This works - > > $out = system("ls -l ",$retvals); > printf("%s", $out); > > This does - > > echo exec("ls -l"); > > This does not - > > if( !file_exists("/var/www/orders.txt")); > { > $ou

Re: [PHP] exec and system do not work

2013-08-25 Thread Robert Cummings
On 13-08-25 11:41 PM, Ethan Rosenberg wrote: Dear List - I'm lost on this one - This works - $out = system("ls -l ",$retvals); printf("%s", $out); This does - echo exec("ls -l"); This does not - if( !file_exists("/var/www/orders.txt")); { $out = system("touch /var/www/orders.txt", $re

Re: [PHP] exec and system do not work

2013-08-25 Thread Sorin Badea
*/var/www* is usually under *www* user. It may be a permissions problem. On Mon, Aug 26, 2013 at 6:41 AM, Ethan Rosenberg < erosenb...@hygeiabiomedical.com> wrote: > Dear List - > > I'm lost on this one - > > This works - > > $out = system("ls -l ",$retvals); > printf("%s", $out); > > This does

Re: [PHP] exec to launch putty.exe for telnet

2012-07-10 Thread Hans Åhlin
2012/7/3 Devang Patel > Hello Experts, > > I have putty.exe on my desktop so if I will go to command prompt and then > to C:\Documents and Settings\user\Desktop location and execute following > command it will launch the Putty window of telnet connection to server > specified: > > putty.exe tel

Re: [PHP] exec to launch putty.exe for telnet

2012-07-03 Thread Matijn Woudt
On Tue, Jul 3, 2012 at 8:24 PM, Devang Patel wrote: > Hello Experts, > > I have putty.exe on my desktop so if I will go to command prompt and then > to C:\Documents and Settings\user\Desktop location and execute following > command it will launch the Putty window of telnet connection to server >

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Richard Quadling
On 14 January 2011 18:48, Nicholas Kell wrote: > > On Jan 14, 2011, at 12:41 PM, Kai Renz wrote: > >> Hi guys and thanks for your answers... >> >> @Nicholas: >> Yes, you are right. The first socket is only used if a new clients >> connects, thats why the script generates a new port so the client c

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Nicholas Kell
On Jan 14, 2011, at 12:41 PM, Kai Renz wrote: > Hi guys and thanks for your answers... > > @Nicholas: > Yes, you are right. The first socket is only used if a new clients > connects, thats why the script generates a new port so the client can > connect to the new socket. After that socket1 shoul

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Nicholas Kell
On Jan 14, 2011, at 12:41 PM, Kai Renz wrote: > Hi guys and thanks for your answers... > > @Nicholas: > Yes, you are right. The first socket is only used if a new clients > connects, thats why the script generates a new port so the client can > connect to the new socket. After that socket1 shoul

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Kai Renz
Hi guys and thanks for your answers... @Nicholas: Yes, you are right. The first socket is only used if a new clients connects, thats why the script generates a new port so the client can connect to the new socket. After that socket1 should continue its work and wait for new clients. @Daniel: Yeh

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Daniel Brown
On Fri, Jan 14, 2011 at 13:28, Kai Renz wrote: (Putting this back on the list. Please use Reply-All.) > @Daniel: > Yeh i tried sending it to the background, this works but still it does > wait for the other script to finish. It shouldn't. In fact, just to see if I somehow completely f

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Daniel Brown
On Fri, Jan 14, 2011 at 11:56, Kai Renz wrote: > > Now here is the problem: > it all works fine, but the client can't send a quit message to socket1 > because socket1.php waits until socket2.php is finished. socket2.php > is working properly, and if i connect to the new socket and quit the > conne

Re: [PHP] Exec Script in the background, don't wait till it finishes

2011-01-14 Thread Nicholas Kell
On Jan 14, 2011, at 10:56 AM, Kai Renz wrote: > Hi there, > > i'm currently working on a socket project. It consists of two scripts. > The first script (socket1.php) creates a socket on a specified port > and waits for a client to connect. If a client connects, they exchange > some informations,

Re: [PHP] exec output to mySQL, How?

2010-07-21 Thread Per Jessen
Nilesh Govindarajan wrote: > On Wed, Jul 21, 2010 at 12:29 PM, Per Jessen wrote: >> Tom Sparks wrote: >> >>> How do I take the output from a command line program and update a >>> MYSQL database with it? >> >> | mysql -u user -p -Ddatabase >> > > I don't think this is what he needs? Otherwise wh

Re: [PHP] exec output to mySQL, How?

2010-07-21 Thread Ashley Sheridan
On Wed, 2010-07-21 at 12:57 +0530, Nilesh Govindarajan wrote: > On Wed, Jul 21, 2010 at 12:29 PM, Per Jessen wrote: > > Tom Sparks wrote: > > > >> How do I take the output from a command line program and update a > >> MYSQL database with it? > > > > | mysql -u user -p -Ddatabase > > > > > > > >

Re: [PHP] exec output to mySQL, How?

2010-07-21 Thread Nilesh Govindarajan
On Wed, Jul 21, 2010 at 12:39 PM, Tom Sparks wrote: > --- On Wed, 21/7/10, Nilesh Govindarajan wrote: >> On Wed, Jul 21, 2010 at 8:49 AM, Tom >> Sparks >> wrote: >> > How do I take the output from a command line program >> and update a MYSQL database with it? >> > >> > tom_a_sparks >> > Light tr

Re: [PHP] exec output to mySQL, How?

2010-07-21 Thread Nilesh Govindarajan
On Wed, Jul 21, 2010 at 12:29 PM, Per Jessen wrote: > Tom Sparks wrote: > >> How do I take the output from a command line program and update a >> MYSQL database with it? > > | mysql -u user -p -Ddatabase > > > > -- > Per Jessen, Zürich (22.6°C) > > > -- > PHP General Mailing List (http://www.php.

Re: [PHP] exec output to mySQL, How?

2010-07-21 Thread Tom Sparks
--- On Wed, 21/7/10, Nilesh Govindarajan wrote: > On Wed, Jul 21, 2010 at 8:49 AM, Tom > Sparks > wrote: > > How do I take the output from a command line program > and update a MYSQL database with it? > > > > tom_a_sparks > > Light travels faster then sound, which is why some > people appear brig

Re: [PHP] exec output to mySQL, How?

2010-07-21 Thread Per Jessen
Tom Sparks wrote: > How do I take the output from a command line program and update a > MYSQL database with it? | mysql -u user -p -Ddatabase -- Per Jessen, Zürich (22.6°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] exec output to mySQL, How?

2010-07-20 Thread Nilesh Govindarajan
On Wed, Jul 21, 2010 at 8:49 AM, Tom Sparks wrote: > How do I take the output from a command line program and update a MYSQL > database with it? > > tom_a_sparks > Light travels faster then sound, which is why some people appear bright, > until you hear them speak > > > > > -- > PHP General Mail

Re: [PHP] exec in different directory where PHP is Installed

2010-05-25 Thread loki
I have a begin of explanation When PHP is run as CGI it's work but with this header message : '\\xxx.xxx.xxx.xxx\scriptdir' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. Status: 200 OK X-Powered-By: PHP/5.2.8 Cont

Re: [PHP] exec in different directory where PHP is Installed

2010-05-24 Thread Kevin Kinsey
loki wrote: Hello, PHP is installed in c:\program files\php the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\ in the PHP script, we try to launch the command @exec(...) with a executable located in c:\program files\ourexecutable\ it's not work :( but if we move the PHP script f

RE: [PHP] exec in different directory where PHP is Installed

2010-05-24 Thread Bob McConnell
From: loki > On 5/24/2010 11:31 PM, Bob McConnell wrote: >> From: loki >> >>> PHP is installed in c:\program files\php >>> the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\ >>> in the PHP script, we try to launch the command @exec(...) with a >>> executable located in c:\program fil

Re: [PHP] exec in different directory where PHP is Installed

2010-05-24 Thread loki
On 5/24/2010 11:31 PM, Bob McConnell wrote: From: loki PHP is installed in c:\program files\php the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\ in the PHP script, we try to launch the command @exec(...) with a executable located in c:\program files\ourexecutable\ it's not work

Re: [PHP] exec in different directory where PHP is Installed

2010-05-24 Thread loki
the script is vbulletin function fetch_im_exec($command, $args, $needoutput = false, $dieongs = true) { if (!function_exists('exec')) { $this->error = array(fetch_error('php_error_exec_disabled')); return

RE: [PHP] exec in different directory where PHP is Installed

2010-05-24 Thread Bob McConnell
From: loki > PHP is installed in c:\program files\php > the PHP script are in network drive \\xxx.xxx.xxx.xxx\scriptdir\ > in the PHP script, we try to launch the command @exec(...) with a > executable located in c:\program files\ourexecutable\ > > it's not work :( > > but if we move the PHP sc

Re: [PHP] exec() problem [SOLVED]

2009-11-14 Thread A. Mannini
Ashley Sheridan ha scritto: On Sun, 2009-11-15 at 00:06 +0100, A. Mannini wrote: Ashley Sheridan ha scritto: Have you checked to ensure that the exec is actually running at all? Check the error logs to see what they say. There may be a problem with the string argument for exec(), like an unes

Re: [PHP] exec() problem

2009-11-14 Thread A. Mannini
Ashley Sheridan ha scritto: On Sun, 2009-11-15 at 00:06 +0100, A. Mannini wrote: Ashley Sheridan ha scritto: Have you checked to ensure that the exec is actually running at all? Check the error logs to see what they say. There may be a problem with the string argument for exec(), like an unes

Re: [PHP] exec() problem

2009-11-14 Thread Kim Madsen
Ashley Sheridan wrote on 2009-11-15 00:23: Looked to all log...nothing! :-( What other logs did you look at? Then do this from a command line: su - "the user apache runs as" copy the command from the ph script and run it from commandline and let us see the error you recieve... -- Kind

Re: [PHP] exec() problem

2009-11-14 Thread Ashley Sheridan
On Sun, 2009-11-15 at 00:25 +0100, A. Mannini wrote: > Ashley Sheridan ha scritto: > > On Sun, 2009-11-15 at 00:06 +0100, A. Mannini wrote: > > > >> Ashley Sheridan ha scritto: > >>> Have you checked to ensure that the exec is actually running at all? > >>> Check the error logs to see what they

Re: [PHP] exec() problem

2009-11-14 Thread A. Mannini
Ashley Sheridan ha scritto: On Sun, 2009-11-15 at 00:06 +0100, A. Mannini wrote: Ashley Sheridan ha scritto: Have you checked to ensure that the exec is actually running at all? Check the error logs to see what they say. There may be a problem with the string argument for exec(), like an unes

Re: [PHP] exec() problem

2009-11-14 Thread Ashley Sheridan
On Sun, 2009-11-15 at 00:06 +0100, A. Mannini wrote: > Ashley Sheridan ha scritto: > > > > Have you checked to ensure that the exec is actually running at all? > > Check the error logs to see what they say. There may be a problem with > > the string argument for exec(), like an unescaped charact

Re: [PHP] exec() problem

2009-11-14 Thread A. Mannini
Ashley Sheridan ha scritto: Have you checked to ensure that the exec is actually running at all? Check the error logs to see what they say. There may be a problem with the string argument for exec(), like an unescaped character that is causing an issue Thanks, Ash http://www.ashleysheridan.

Re: [PHP] exec() problem

2009-11-14 Thread Ashley Sheridan
On Sat, 2009-11-14 at 22:20 +0100, A. Mannini wrote: > Hi all, > > i've a problem using exec() on a Linux server with PHP 5.2.9 on Apache > 2.2.13. Safe mode is OFF and Apache isn't chrooted. > > I would run /usr/lib/mailman/bin/find_member -l so i used > exec("sudo run /usr/lib/mailman/bin/

Re: [PHP] exec() confused by a specially crafted string

2009-10-12 Thread Eddie Drapkin
On Mon, Oct 12, 2009 at 2:10 PM, Soner Tari wrote: > On Mon, 2009-10-12 at 13:21 -0300, Jonathan Tapicer wrote: >> Confirmed, it also happens to me on Linux, PHP version: >> >> PHP 5.2.4-2ubuntu5.7 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 >> 2009 19:52:39) >> Copyright (c) 1997-2007 The PHP

Re: [PHP] exec() confused by a specially crafted string

2009-10-12 Thread Soner Tari
On Mon, 2009-10-12 at 13:21 -0300, Jonathan Tapicer wrote: > Confirmed, it also happens to me on Linux, PHP version: > > PHP 5.2.4-2ubuntu5.7 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 > 2009 19:52:39) > Copyright (c) 1997-2007 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend

Re: [PHP] exec() confused by a specially crafted string

2009-10-12 Thread Jonathan Tapicer
Confirmed, it also happens to me on Linux, PHP version: PHP 5.2.4-2ubuntu5.7 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 2009 19:52:39) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies And adding a single character to the echoed string makes

Re: [PHP] EXEC and SYSTEM delay

2009-07-23 Thread Sam Stelfox
Well if the server your running on is linux based (and I haven't tried this) you could try adding a nohup and background the task for example rather than doing: system('updatedb'); try system('nohup updatedb &'); It should background the task and let it continue running even when the php sc

[PHP] Re: php exec()

2008-11-07 Thread Michelle Konzack
Am 2008-11-03 13:28:27, schrieb cheesiong: > hi Chris, > thank you. i change the path and change the httpd.conf LogLevel to debug > then restart apache. > but nothing is change from the output or the error log. > basically it is still not working. > > this is weird, isn't it. the apache is run

[PHP] Re: php exec()

2008-11-02 Thread cheesiong
i try to use the system() function, i found the the last line of the ifconfig is actually nothing. but i still cannot execute the ipkg-cl program. any idea? thank you. regards,-keo On Mon, Nov 3, 2008 at 11:31 AM, cheesiong <[EMAIL PROTECTED]> wrote: > hi all, > this is the first time i try out

Re: Re: [PHP] exec() Error

2008-06-30 Thread zhiqi pan
to:[EMAIL PROTECTED] > > Sent: Thursday, June 26, 2008 7:50 AM > > To: Boyd, Todd M.; php-general@lists.php.net > > Subject: RE: Re: [PHP] exec() Error > > > > Hi, Todd: > > > >It looks like I have some other errors in my Perl code, and I got > it &

RE: Re: [PHP] exec() Error

2008-06-27 Thread Boyd, Todd M.
> -Original Message- > From: Wei, Alice J. [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2008 7:50 AM > To: Boyd, Todd M.; php-general@lists.php.net > Subject: RE: Re: [PHP] exec() Error > > Hi, Todd: > >It looks like I have some other errors in

Re: Re: [PHP] exec() Error

2008-06-26 Thread Jason Murray
== > Alice Wei > MIS 2009 > School of Library and Information Science > Indiana University Bloomington > [EMAIL PROTECTED] > ____________ > From: Boyd, Todd M. [EMAIL PROTECTED] > Sent: Wednesday,

RE: RE: Re: [PHP] exec() Error

2008-06-26 Thread Per Jessen
Boyd, Todd M. wrote: >> >PHP or other programming languages? For example, C, Python, or Perl. >> >> And that works just fine using exec(). > > Well... if she was trying to execute *LOCAL* PHP code from within a > PHP script that was already running (which she was not), why would you > suggest th

RE: RE: Re: [PHP] exec() Error

2008-06-26 Thread Boyd, Todd M.
> -Original Message- > From: Per Jessen [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2008 1:11 AM > To: php-general@lists.php.net > Subject: RE: Re: [PHP] exec() Error > > Boyd, Todd M. wrote: > > >> > >> Well, "http://www.mysite.com

RE: Re: [PHP] exec() Error

2008-06-26 Thread Wei, Alice J.
net Subject: RE: Re: [PHP] exec() Error > -Original Message- > From: Wei, Alice J. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2008 3:31 PM > To: Boyd, Todd M.; Per Jessen; php-general@lists.php.net > Subject: RE: Re: [PHP] exec() Error ---8<--- snip > >

RE: Re: [PHP] exec() Error

2008-06-25 Thread Per Jessen
Boyd, Todd M. wrote: >> >> Well, "http://www.mysite.com/calculate.php"; is not an executable. >> Try this instead: >> >> exec("php /calculate.php"); > > I still don't think this is how exec() should be used when executing > remote PHP scripts via HTTP, since the web server is not going to give

RE: Re: [PHP] exec() Error

2008-06-25 Thread Boyd, Todd M.
> -Original Message- > From: Wei, Alice J. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2008 3:31 PM > To: Boyd, Todd M.; Per Jessen; php-general@lists.php.net > Subject: RE: Re: [PHP] exec() Error ---8<--- snip > > Well, "http://www.mysite.

RE: Re: [PHP] exec() Error

2008-06-25 Thread Wei, Alice J.
From: Boyd, Todd M. [EMAIL PROTECTED] Sent: Wednesday, June 25, 2008 4:25 PM To: Per Jessen; php-general@lists.php.net Subject: RE: Re: [PHP] exec() Error > -Original Message- > From: Per Jessen [mailto:[EMAIL PROTECTED] > Sent: Wednesday

RE: Re: [PHP] exec() Error

2008-06-25 Thread Boyd, Todd M.
> -Original Message- > From: Per Jessen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2008 2:48 PM > To: php-general@lists.php.net > Subject: Re: [PHP] exec() Error > > Wei, Alice J. wrote: > > > I have got a task from my clien

RE: [PHP] exec() Error

2008-06-25 Thread Wei, Alice J.
___ From: Per Jessen [EMAIL PROTECTED] Sent: Wednesday, June 25, 2008 3:47 PM To: php-general@lists.php.net Subject: Re: [PHP] exec() Error Wei, Alice J. wrote: > I have got a task from my client asking me to build something > that allo

Re: [PHP] exec() Error

2008-06-25 Thread Per Jessen
Wei, Alice J. wrote: > I have got a task from my client asking me to build something > that allows the variables in the PHP file passed to another > PHP file or a file in a different computer language to perform > some operations on another remote machine. According

Re: [PHP] exec return values

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 11:34 AM, Philip Thompson <[EMAIL PROTECTED]> wrote: > Is there a set list of return values/error codes returned by exec? I am > running this command on a windows box and getting the following error: > > exec ("net use /delete i: /y", $output, $ret); > print_r ($output);

SV: [PHP] Re: Php exec

2007-12-23 Thread mattias
Yes i have looked in that but not understadn anything -Ursprungligt meddelande- Från: Christophe Gosiau [mailto:[EMAIL PROTECTED] Skickat: den 23 december 2007 23:37 Till: php-general@lists.php.net Ämne: [PHP] Re: Php exec Try to configure courier te read his mailboxes/users from mysql

[PHP] Re: Php exec

2007-12-23 Thread Christophe Gosiau
Try to configure courier te read his mailboxes/users from mysql? mattias schreef: If i use courier-mta Can i create a php script wich create mailboxes? And users Hope any understand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] exec dont work for svn

2007-05-31 Thread Richard Lynch
On Wed, May 30, 2007 4:30 pm, Manolet Gmail wrote: > 2007/5/30, Richard Lynch <[EMAIL PROTECTED]>: >> >> >> On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote: >> > 2007/5/28, Greg Donald <[EMAIL PROTECTED]>: >> >> On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote: >> >> > but this doesnt work: >

Re: [PHP] exec dont work for svn

2007-05-30 Thread Manolet Gmail
2007/5/30, Richard Lynch <[EMAIL PROTECTED]>: On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote: > 2007/5/28, Greg Donald <[EMAIL PROTECTED]>: >> On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote: >> > but this doesnt work: >> > >> > exec("svn update",$out); exec("svn update", $out, $error)

Re: [PHP] exec dont work for svn

2007-05-30 Thread Richard Lynch
On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote: > 2007/5/28, Greg Donald <[EMAIL PROTECTED]>: >> On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote: >> > but this doesnt work: >> > >> > exec("svn update",$out); exec("svn update", $out, $error); if ($error) echo "OS Error: $error. Use perro

Re: [PHP] exec dont work for svn

2007-05-30 Thread Richard Lynch
Did 'nobody' do the initial checkout? If not, 'nobody' probably can't have permission to do the update. On Mon, May 28, 2007 5:34 pm, Manolet Gmail wrote: > hi, i want to do a svn update (subversion) from php using exec (or > system) > > now, this works: > > exec("ls; pwd",$out); > foreach($out a

Re: [PHP] exec dont work for svn

2007-05-29 Thread Manolet Gmail
Hi, thanks petter, now im getting this error... svn: Can't check path '/root/.svn': Permission denied using this: $cmd = "svn up"; $cmd .= " --username $user --password $pass --non-interactive --revision $rev"; $cmd .= " --no-auth-cache --config-dir ~/.svn/ 2>&1"; i try

RE: [PHP] exec dont work for svn

2007-05-29 Thread Peter Lauri
Hi, In many apps the messages comes as STDERR, so try: exec("svn update 2>&1", $out); Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free > -Original Message- > From: Manolet Gmail [mailto:[EMAIL PROTE

Re: [PHP] exec dont work for svn

2007-05-28 Thread Greg Donald
On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote: but this doesnt work: exec("svn update",$out); foreach($out as $line)echo"$line\n"; dont print anything... dont update the files Is it possible you need to provide some type of authentication? `svn update` may be asking for input your exec

Re: [PHP] exec() and redirect output of program [SOLVED]

2007-05-01 Thread Daniel Brown
Brad, The error_log file is written by httpd (Apache). It actually just sounds like they need to upgrade their Zend Optimizer, which is a cinch to do. On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Brad Fuller wr

RE: [PHP] exec() and redirect output of program [SOLVED]

2007-05-01 Thread Brad Fuller
Tijnema ! wrote: > On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Brad Fuller wrote: >>> Daniel Brown wrote: This way just lets it do it's own thing, with no output, and PHP won't hang. It'll continue from the CLI after the HTTP session is over. >>> exec('php t

Re: [PHP] exec() and redirect output of program

2007-05-01 Thread Tijnema !
On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Brad Fuller wrote: > Daniel Brown wrote: >> This way just lets it do it's own thing, with no output, and PHP >> won't hang. It'll continue from the CLI after the HTTP session is >> over. >> >> > exec('php test.php > /dev/null 2>&1 &'); ?> >>

RE: [PHP] exec() and redirect output of program

2007-05-01 Thread Brad Fuller
Brad Fuller wrote: > Daniel Brown wrote: >> This way just lets it do it's own thing, with no output, and PHP >> won't hang. It'll continue from the CLI after the HTTP session is >> over. >> >> > exec('php test.php > /dev/null 2>&1 &'); ?> >> >> >> On 5/1/07, Brad Fuller <[EMAIL PROTECTED]>

RE: [PHP] exec() and redirect output of program

2007-05-01 Thread Brad Fuller
Daniel Brown wrote: > This way just lets it do it's own thing, with no output, > and PHP won't hang. It'll continue from the CLI after the HTTP > session is over. > > exec('php test.php > /dev/null 2>&1 &'); ?> > > > On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> >> >> I found thi

Re: [PHP] exec() and redirect output of program

2007-05-01 Thread Daniel Brown
This way just lets it do it's own thing, with no output, and PHP won't hang. It'll continue from the CLI after the HTTP session is over. /dev/null 2>&1 &'); ?> On 5/1/07, Brad Fuller <[EMAIL PROTECTED]> wrote: I found this on PHP.net: http://us.php.net/manual/en/function.exec.php Note

RE: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Peter Lauri
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Friday, March 02, 2007 12:37 AM > To: [EMAIL PROTECTED] > Cc: Roman Neuhauser; 'PHP Mailing' > Subject: Re: [PHP] exec from process (deamon) without shell > > Add a nice clean l

RE: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Peter Lauri
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Friday, March 02, 2007 12:35 AM > To: [EMAIL PROTECTED] > Cc: Roman Neuhauser; 'PHP Mailing' > Subject: Re: [PHP] exec from process (deamon) without shell > > On Thu, March

Re: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Richard Lynch
Add a nice clean line to the end of your PHP scripts: exit 0; //exit cleanly If your PHP scripts' last function call returns, say, -1, and then PHP just passes that back on out, it's probably going to look like an error code to the outermost shell, if you see what I mean... I'm not promising thi

Re: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Richard Lynch
On Thu, March 1, 2007 12:56 pm, [EMAIL PROTECTED] wrote: > I tried with /bin/ls but still same thing. I just found out that the > exitcode is -1 but the $stdout actually gives correct answer. But that > doesn't make sense. How can I then control what action to take > depending on the exitcode? I *

RE: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Peter Lauri
- personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, March 02, 2007 12:29 AM To: Peter Lauri Cc: 'PHP Mailing' Subject: Re: [PHP] exec from process (deamon) without shell On Thu, March 1,

Re: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Richard Lynch
On Thu, March 1, 2007 10:28 am, Peter Lauri wrote: > I have a very complex script that is being called by a running deamon > that > doesn't have any shell. To simplify it I make this script, that is > also > failing: PHP also uses a mini non-shell thingie to run exec. As such, it has no home dire

Re: [PHP] exec from process (deamon) without shell

2007-03-01 Thread lists
Quoting Roman Neuhauser <[EMAIL PROTECTED]>: # [EMAIL PROTECTED] / 2007-03-01 18:28:35 +0200: #/thepathtophp echo "Command ls -lrt could not be executed correctly. Exit code: $exitcode\n"; } else { echo "Result:\n"; foreach($stdout AS $line) {

Re: [PHP] exec from process (deamon) without shell

2007-03-01 Thread lists
Quoting Roman Neuhauser <[EMAIL PROTECTED]>: # [EMAIL PROTECTED] / 2007-03-01 18:28:35 +0200: #/thepathtophp echo "Command ls -lrt could not be executed correctly. Exit code: $exitcode\n"; } else { echo "Result:\n"; foreach($stdout AS $line) {

Re: [PHP] exec from process (deamon) without shell

2007-03-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-03-01 18:28:35 +0200: > #/thepathtophp > > exec("ls -lrt", $stdout, $exitcode); > > if($exitcode!=0) { > echo "Command ls -lrt could not be executed correctly. Exit code: > $exitcode\n"; > } else { > echo "Result:\n"; > foreach($std

Re: [PHP] exec('make') Q

2007-01-23 Thread Richard Lynch
On Mon, January 22, 2007 5:45 pm, [EMAIL PROTECTED] wrote: > Here's a simple makefile I want PHP's exec to execute make on: > > KEYLIST := keylist.txt > DEPS := $(wildcard *.txt) > FILES := *.txt > > $(KEYLIST): $(DEPS) > grep ^keywords $(FILES) > $@ > > now when I use make from command line, it wo

Re: [PHP] exec('make') Q

2007-01-23 Thread james
Roman, On 23/1/2007, "Roman Neuhauser" <[EMAIL PROTECTED]> wrote: >> KEYLIST := keylist.txt >> DEPS := $(wildcard *.txt) >> FILES := *.txt >> >> $(KEYLIST): $(DEPS) >> grep ^keywords $(FILES) > $@ > >Why is it so roundabout about $(DEPS)/$(FILES)? The target *actuall* >depends on different files

Re: [PHP] exec('make') Q

2007-01-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-22 23:45:09 +: > Here's a simple makefile I want PHP's exec to execute make on: > > KEYLIST := keylist.txt > DEPS := $(wildcard *.txt) > FILES := *.txt > > $(KEYLIST): $(DEPS) > grep ^keywords $(FILES) > $@ Does that line in the real Makefile begin with a tab? I

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-26 Thread Richard Lynch
On Wed, October 25, 2006 2:41 pm, Gert Cuykens wrote: > i do not get any output from mysql except form echo $bin that displays > 1 ? > exec("mysql -h hhh -u uuu - print_r($out); > echo $bin; > ?> And what does 'perror 1' tell you on the command line? Or you could go whole-hog and install th

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread Gert Cuykens
ok thx all, works great now :) On 10/25/06, Stut <[EMAIL PROTECTED]> wrote: Gert Cuykens wrote: > BINGO :) Indeed. > ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] => > ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 > > Can you explain a bit more what this do ?

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread Stut
Gert Cuykens wrote: BINGO :) Indeed. ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] => ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 Can you explain a bit more what this do ? 2>&1 For example will i only get stderr or do i get stdout and stderr messages ?

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread Gert Cuykens
BINGO :) ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] => ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 Can you explain a bit more what this do ? 2>&1 For example will i only get stderr or do i get stdout and stderr messages ? On 10/25/06, Stut <[EMAIL PROTECT

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread David Giragosian
Can't say why you're not getting an error message, but when I have a valid user, password, host, and sql in a .txt file, I get the last record from the select statement I run output in the browser. Maybe start with getting it to work with everything used correctly, then work backwards. HTH, On

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread Stut
Gert Cuykens wrote: i do not get any output from mysql except form echo $bin that displays 1 ? I don't know for sure but chances are that mysql outputs errors on stderr not stdout, so you need to redirect stderr to stdout for exec to capture it... exec("mysql -h hhh -u uuu - < test.php

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread Gert Cuykens
when i do echo exec... i get a blank screen (print_r $out i get Array() echo $bin i get 1) On 10/25/06, David Giragosian <[EMAIL PROTECTED]> wrote: What do you get if you run: echo exec("mysql -h hhh -u uuu - wrote: > actually something like 'asdadsuiashdiasdh' :) test.php is just some >

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread David Giragosian
What do you get if you run: echo exec("mysql -h hhh -u uuu - wrote: actually something like 'asdadsuiashdiasdh' :) test.php is just some text file i maybe should have renamed it to test.txt sorry. But the thing is i dont get any feedback like 'cant connect to host' or 'invalid sql' etc.

Re: [PHP] exec("mysql -h hhh -u uuu -pppp

2006-10-25 Thread Gert Cuykens
actually something like 'asdadsuiashdiasdh' :) test.php is just some text file i maybe should have renamed it to test.txt sorry. But the thing is i dont get any feedback like 'cant connect to host' or 'invalid sql' etc. exec(mysqldump...) works but exec(mysql...) doesnt On 10/25/06, David Girag

  1   2   3   >