On Sat, January 19, 2008 11:24 am, Apple wrote:
> Richard Lynch l-i-e.com> writes:
>
>> They also won't have your same environment, e.g., home directory
>> $HOME.
>>
>> Check permissions on all files/directories.
>>
>> Use complete pathnames from the root hard drive:
>> /home/apple/path/to/$
Nathan Nobbe gmail.com> writes:
> have you tried a trivial call to mencoder, like i suggested?
> it looks like you were passing a lot of parameters to it in the code you
> first
> posted. try starting out w/ something simple and get that working before
> going
> for the full blown finished versi
On Jan 19, 2008 12:24 PM, Apple <[EMAIL PROTECTED]> wrote:
> Richard Lynch l-i-e.com> writes:
>
> > They also won't have your same environment, e.g., home directory $HOME.
> >
> > Check permissions on all files/directories.
> >
> > Use complete pathnames from the root hard drive:
> > /home/ap
Richard Lynch l-i-e.com> writes:
> They also won't have your same environment, e.g., home directory $HOME.
>
> Check permissions on all files/directories.
>
> Use complete pathnames from the root hard drive:
> /home/apple/path/to/$outputFile
I do that. All permissions (files and directories) a
On Fri, January 18, 2008 4:49 pm, Apple wrote:
> I wonder is it possible to run system() command, so mencoder will run
> as from
> root (user "500") and not PHP (user "43").
No.
system() versus exec() has nothing to do with which user runs it.
They only differ in how they handle input/output
When you run it from the shell, you are you.
When you run it from a PHP web-server, you are not you. You are
whatever user is configured in httpd.conf
That user will not have the same rights/permissions as you do.
They also won't have your same environment, e.g., home directory $HOME.
Check pe
On Jan 18, 2008 5:49 PM, Apple <[EMAIL PROTECTED]> wrote:
> Daniel Brown gmail.com> writes:
>
> >
> > On Jan 17, 2008 6:48 PM, Apple gmail.com> wrote:
> > > Another strange thing is I run ImageMajick with system() in a lot
> of scripts on
> > > the same server and everything works fine.
>
Daniel Brown gmail.com> writes:
>
> On Jan 17, 2008 6:48 PM, Apple gmail.com> wrote:
> > Another strange thing is I run ImageMajick with system() in a lot
of scripts on
> > the same server and everything works fine.
> >
> > What is the problem? Do you have any idea?
>
> Does the UID (
Daniel Brown gmail.com> writes:
> Does the UID (or at least GID) under which PHP is being executed
> have permissions to write to the area you're trying to save the file?
>
> Similar to above, does it have the correct permissions to read the
> incoming file?
Daniel, I'm not sure about U
On Jan 17, 2008 6:48 PM, Apple <[EMAIL PROTECTED]> wrote:
> Another strange thing is I run ImageMajick with system() in a lot of scripts
> on
> the same server and everything works fine.
>
> What is the problem? Do you have any idea?
Does the UID (or at least GID) under which PHP is being
Richard Lynch l-i-e.com> writes:
>
> Try writing a 2-line .sh (shell) script that does what you want, and
> call that 2-liner from exec().
Thanks for idea, Richard. But it doesn't work.
I wrote code as you said:
$first = "/usr/local/bin/mencoder -vf scale=448:-3,expand=4
Try writing a 2-line .sh (shell) script that does what you want, and
call that 2-liner from exec().
On Thu, January 17, 2008 6:46 am, Apple wrote:
> Daniel Brown gmail.com> writes:
>
>> Try replacing system() with die() and letting it print out the
>> information full command string. Tha
Daniel Brown gmail.com> writes:
> Try replacing system() with die() and letting it print out the
> information full command string. That may give you an idea of a
> variable that's either incorrect or undefined. If you copy and paste
> it and run the command from the command line and it wor
Take a look at SQLite
Darren Whitlen wrote:
Hi,
I have a PHP script that reads and updates either a small file or a
mysql database. This script is called from several places every .5 seconds.
I would like to move this file to a variable for extra speed as the file
is causing a few problems
Darren Whitlen wrote:
Hi,
I have a PHP script that reads and updates either a small file or a
mysql database. This script is called from several places every .5 seconds.
I would like to move this file to a variable for extra speed as the file
is causing a few problems being accessed so many
On Mon, August 14, 2006 12:25 pm, Michael Jonsson wrote:
> I can run any external program like ls, cp, uptime...
> But if a try to run my shell script a get error.
>
> $passwdexe = "sudo /usr/bin/webpasswd";
> $user=$_POST[name];
> $passwd="$passwdexe $user 123456";
>
Quoting Adam Zey <[EMAIL PROTECTED]>:
>
> Looking at your $command, there is no path in front of it. It's likely
> that PHP's shell doesn't have the program in its PATH. Try manually
> specifying the full path to the command:
>
> $command="/home/peter/myprog $arg1 $arg2 > textfile.txt";
>
> (
Yes, that is a similar problem and sounds very much like
what I am experiencing.
Peter
Quoting Michael Jonsson <[EMAIL PROTECTED]>:
> Hi,
>
> I can run any external program like ls, cp, uptime...
> But if a try to run my shell script a get error.
>
> $passwdexe = "sudo /usr/bin/webpa
No, it not on...
safe_mode Off Off
safe_mode_exec_dir no valueno value
safe_mode_gid Off Off
safe_mode_include_dir no valueno value
.M
Adam Zey wrote:
Michael Jonsson wrote:
Hi,
I can run any external program like ls, cp, uptime...
But if a try to run
Michael Jonsson wrote:
Hi,
I can run any external program like ls, cp, uptime...
But if a try to run my shell script a get error.
$passwdexe = "sudo /usr/bin/webpasswd";
$user=$_POST[name];
$passwd="$passwdexe $user 123456";
echo $passwd;
$result = s
Hi,
I can run any external program like ls, cp, uptime...
But if a try to run my shell script a get error.
$passwdexe = "sudo /usr/bin/webpasswd";
$user=$_POST[name];
$passwd="$passwdexe $user 123456";
echo $passwd;
$result = system($passwd);
Resulta
[EMAIL PROTECTED] wrote:
Hello,
I am trying the run an external application with
command line arguments using PHP under linux.
ie:
$command="myprog $arg1 $arg2 > textfile.txt";
system("echo \"$command\" > test.txt");
system($command);
$handle=fopen("textfile.txt","r");
if($handle!=NULL)
{
Or that... :P
On 7/24/05, Joe Wollard <[EMAIL PROTECTED]> wrote:
> As always, look for someone else's existing project and see how they
> did it. ;-)
>
> http://phpsysinfo.sourceforge.net/
>
> Good Luck!
> -Joe
>
> On Jul 23, 2005, at 9:25 AM, André Medeiros wrote:
>
> > First of all, you want
As always, look for someone else's existing project and see how they
did it. ;-)
http://phpsysinfo.sourceforge.net/
Good Luck!
-Joe
On Jul 23, 2005, at 9:25 AM, André Medeiros wrote:
First of all, you want to have the two values in seperate variables.
After reading the contents from the fil
First of all, you want to have the two values in seperate variables.
After reading the contents from the file, do something like:
-8<-
function parseUptimeSeconds( $seconds ) {
$resultArray = Array( 'weeks' =>
On 7/23/05, Vidyut Luther <[EMAIL PROTECTED]> wrote:
> Ok,
> If I use the file_get_contents.. how do I actually parse the
> contents on /proc/uptime
> cat /proc/uptime
> 1400293.13 1317047.64
The first number is the total uptime in seconds, the second number is
the total idle time.
--
Ok,
If I use the file_get_contents.. how do I actually parse the
contents on /proc/uptime
cat /proc/uptime
1400293.13 1317047.64
What do I do with those two numbers ?
man uptime doesn't really talk about that file.. :/
On Jul 22, 2005, at 2:42 AM, Jasper Bryant-Greene wrote:
Vidyut Luth
Vidyut Luther wrote:
Hello,
I have a question on how to get Server side system specific
information via PHP, or just general direction on how to parse some of
the information found in /proc
I just use file_get_contents() on the files in /proc. I would expect
that would be a lot faster tha
maybe you should check your php safe_mode config
cheers
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ok, I solved... It was so easy, I am trying to find the solution since
yesterday. I added the apersand (&) at the end of command line. It works
in background.
Thanks anyway! Have a nice day! :)
En3pY
Sebastian Konstanty Zdrojewski wrote:
Hi everybody,
I am attempting to run in background a sc
Hello Darren,
Something quick is like that?
for($i = 0; $i < 10; $i++) {
print $i."\n";
flush();
sleep(3);
};
Yeah? There it is:
www.xemi.info/flush.php
DG> Then I'm not sure. Perhaps someone in-the-know will respond to your
DG> question. Else, file a bug report. Your script runs fine on my
2001 3:57 PM
To: Darren Gamble
Cc: PHP General List
Subject: Re[8]: [PHP] Re: system(), flush() and so on...
Hello Darren,
It's quick because of the fact that it's tracing a host near to my
server. If you have noticed - ping from my server to login.icq.com
that is being traced by defaul
Hello Darren,
It's quick because of the fact that it's tracing a host near to my
server. If you have noticed - ping from my server to login.icq.com
that is being traced by default is only 10ms.
Try that: www.xemi.info/test.php?host=www.google.com
or something like that
I waited too long...
l Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948
-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 3:32 PM
To: Darren Gamble
Cc: [EMAIL PROTECTED]
Subject: Re[6]: [PHP] Re: system(), flush()
Hello Darren,
You can try it yourself : www.xemi.info/test.php
What do you think?
Server config:
RedHat 7.1, Apache 1.3.20, PHP 4.0.6 loaded as a module.
PS. I tried everything. Simply everything.
DG> I am not sure what the problem is, then. I presume that you installed these
DG> via RPMs, an
ECTED]]
Sent: Friday, November 30, 2001 3:01 PM
To: Darren Gamble
Cc: [EMAIL PROTECTED]
Subject: Re[4]: [PHP] Re: system(), flush() and so on...
Hello Darren,
Linux RedHat 7.1, Apache 1.3.20, PHP 4.0.6
DG> Oops, you're right. I did not read that line nor was I aware of that.
DG> I just tr
Hello Darren,
Linux RedHat 7.1, Apache 1.3.20, PHP 4.0.6
DG> Oops, you're right. I did not read that line nor was I aware of that.
DG> I just tried . It works
DG> exactly as it says it should- outputs the lines as they come in. I also
DG> know flush() works fine (at least for me).
DG> Perhap
le
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [PHP] Re: system(), flush() and so on...
Hello Darren,
-- manual cut
The system() call also tries to automatically flush the web server's
output buffer after each line of output if PHP is running as a server
module.
-- manual cut
Hello Darren,
-- manual cut
The system() call also tries to automatically flush the web server's
output buffer after each line of output if PHP is running as a server
module.
-- manual cut
Hehe. The problem is not in flushing ability of system() foo, but
flush() itself
ren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948
-Original Message-
From: faeton [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 30, 2001 2:21 PM
To: Julio Nobrega Trabalhando
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP]
Hello Julio,
Hm... I don't even know what to specify :)
The exact problem is using system("traceroute host.com"), but it
should've returned its results line by line, instead of executing the
whole command and then outputting its result.
That is done by flush(), which is executed by system() foo
Hi, please be more specific. Including what error you are getting, what is
the tools being used, and their versions.
Here's a quick help for producing better questions, wich will in turn make
us answer faster and with more quality:
http://www.tuxedo.org/~esr/faqs/smart-questions.html
PS:
> The system() call will flush the headers to the client while exec() won't,
Yes.
> but exec() won't wait until the system call is over.
Huh? Exec waits unless the call itself forks using & to do something in the
background.
> Is there a way to make a system call, and wait until it ends, but
43 matches
Mail list logo