Re: [PHP] problems with system() call

2004-06-25 Thread Jason Wong
On Friday 25 June 2004 13:20, Jim Rainville wrote:

 system(write_port 0x);

 When I call this from the script the port does not get written to.

1) Enable FULL error reporting
2) Use /full/path/to/write_port

-- 
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
--
/*
A bachelor is a selfish, undeserving guy who has cheated some woman out
of a divorce.
-- Don Quinn
*/

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



[PHP] problems with system() call

2004-06-24 Thread Jim Rainville
Hi -
 
I'm writing a php script that will result in the parrellel port being
written to. I wrote a program in C that will actually do the writing.
This program has to be run as root so that it can write to the hardware
address. I have the permissions on the file set to u+s so that the
program is always run as root no metter who runs it. If I open a shell
on the machine and login as a regular user I can invoke the program and
pass it the value I want to write to the port and it will work fine. So,
I should be able to invoke it from my php script by doing something
 
like this:
 
system(write_port 0x);
 
When I call this from the script the port does not get written to.
 
Anybody have any ideas why that would be?
When I invoke the script from a web server who's context is it running
in?
 
I'm running PHP 4.2.2 on a Linux Redhat 9 box (kernal 2.4.20-6) and
apache 2.0.
 
Thanks in advance for any help you can give.
Jim
 
 
 
 
 


Re: [PHP] problems with system() call

2004-06-24 Thread His Dudeness
 system(write_port 0x);

Do you get any output from this command?

$text = system(write_port 0x);
echo $text;

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



RE: [PHP] problems with system() call

2004-06-24 Thread Jim Rainville
Nope - no output.


-Original Message-
From: His Dudeness [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 24, 2004 10:28 PM
To: Jim Rainville
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] problems with system() call

 system(write_port 0x);

Do you get any output from this command?

$text = system(write_port 0x);
echo $text;

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