RE: [PHP] using exec/system function within php/apache app

2004-07-22 Thread David Robley
On Thu, 22 Jul 2004 12:05, Bruce wrote:

> ok...
> 
> if i simply use the shell commands "exec/system/passthru" without
> specifying a dir, ie exec("ls"), then it works. however, if i specify
> "exec('ls /foo')" where foo is another dir, then i don't get a response.
> is there someplace where i can open up the dirs/locations that the shell
> commands can operate on...

Unless /foo is a directory immediately under the root directory, this won't
work. Remember taht if you are issuing a filesystem command, you need to
use the filesystem path, not the location relative to your server document
root. If you check the shell commands, you'll find that at least some of
them have a facility to check the return value from the command, which may
be useful for debugging.

-- 
David Robley

Change is inevitable, except from a vending machine.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] using exec/system function within php/apache app

2004-07-21 Thread Jason Wong
On Thursday 22 July 2004 10:35, bruce wrote:

> if i simply use the shell commands "exec/system/passthru" without
> specifying a dir, ie exec("ls"), then it works. however, if i specify
> "exec('ls /foo')" where foo is another dir, then i don't get a response. is
> there someplace where i can open up the dirs/locations that the shell
> commands can operate on...

Have enabled FULL error reporting?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Today is a good day to bribe a high-ranking public official.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] using exec/system function within php/apache app

2004-07-21 Thread bruce
ok...

if i simply use the shell commands "exec/system/passthru" without specifying
a dir, ie exec("ls"), then it works. however, if i specify "exec('ls /foo')"
where foo is another dir, then i don't get a response. is there someplace
where i can open up the dirs/locations that the shell commands can operate
on...

thanks

-bruce


-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 5:01 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] using exec/system function within php/apache app


there's no setting for
safe_mode/safe_mode_exec_dir/safe_mode_gid/safe_mode_include is either
off/no value

if you're running "exec" from within a php app.. what are the settings of
your web site within apache...

-thanks

-bruce


-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 4:46 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] using exec/system function within php/apache app


On Wed, 21 Jul 2004 16:15:00 -0700, bruce <[EMAIL PROTECTED]> wrote:
> hi...
>
> i'm trying to track down issues that i seem to be having with using
> exec/system shell functions within web/php apps on apache. i'm running
> php-5/apache2/rh8.0.
>
> i'd like to talk with anybody who's gotten the exec/system functions to
> work, to try to compare your setup vs. what i have...
>
> i can create a command line test that illustrates that php/exec works.
> however, when i try to create a short web test to trigger the exec,
nothing
> is happening.
>
> i suspect that i might have a priv/permissions issue, although i have no
> real idea where to look to resolve the issue.
>
> any thoughts/pointers/assistance would be helpful... searching through
> google/apach/php hasn't given any solid leads
>

Look in phpinfo() or php.ini for safe mode and friends.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] using exec/system function within php/apache app

2004-07-21 Thread bruce
there's no setting for
safe_mode/safe_mode_exec_dir/safe_mode_gid/safe_mode_include is either
off/no value

if you're running "exec" from within a php app.. what are the settings of
your web site within apache...

-thanks

-bruce


-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 21, 2004 4:46 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] using exec/system function within php/apache app


On Wed, 21 Jul 2004 16:15:00 -0700, bruce <[EMAIL PROTECTED]> wrote:
> hi...
>
> i'm trying to track down issues that i seem to be having with using
> exec/system shell functions within web/php apps on apache. i'm running
> php-5/apache2/rh8.0.
>
> i'd like to talk with anybody who's gotten the exec/system functions to
> work, to try to compare your setup vs. what i have...
>
> i can create a command line test that illustrates that php/exec works.
> however, when i try to create a short web test to trigger the exec,
nothing
> is happening.
>
> i suspect that i might have a priv/permissions issue, although i have no
> real idea where to look to resolve the issue.
>
> any thoughts/pointers/assistance would be helpful... searching through
> google/apach/php hasn't given any solid leads
>

Look in phpinfo() or php.ini for safe mode and friends.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] using exec/system function within php/apache app

2004-07-21 Thread Justin Patrin
On Wed, 21 Jul 2004 16:15:00 -0700, bruce <[EMAIL PROTECTED]> wrote:
> hi...
> 
> i'm trying to track down issues that i seem to be having with using
> exec/system shell functions within web/php apps on apache. i'm running
> php-5/apache2/rh8.0.
> 
> i'd like to talk with anybody who's gotten the exec/system functions to
> work, to try to compare your setup vs. what i have...
> 
> i can create a command line test that illustrates that php/exec works.
> however, when i try to create a short web test to trigger the exec, nothing
> is happening.
> 
> i suspect that i might have a priv/permissions issue, although i have no
> real idea where to look to resolve the issue.
> 
> any thoughts/pointers/assistance would be helpful... searching through
> google/apach/php hasn't given any solid leads
> 

Look in phpinfo() or php.ini for safe mode and friends.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] using exec/system function within php/apache app

2004-07-21 Thread Ed Lazor
Use the PHP passthru function.  The manual has examples of how you can get
the output from your commands in order to test things.



> -Original Message-
> hi...
> 
> i'm trying to track down issues that i seem to be having with using
> exec/system shell functions within web/php apps on apache. i'm running
> php-5/apache2/rh8.0.
> 
> i'd like to talk with anybody who's gotten the exec/system functions to
> work, to try to compare your setup vs. what i have...
> 
> i can create a command line test that illustrates that php/exec works.
> however, when i try to create a short web test to trigger the exec,
> nothing
> is happening.
> 
> i suspect that i might have a priv/permissions issue, although i have no
> real idea where to look to resolve the issue.
> 
> any thoughts/pointers/assistance would be helpful... searching through
> google/apach/php hasn't given any solid leads
> 
> thanks
> 
> -bruce
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php