Re: [PHP] problems with system() call
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
RE: [PHP] problems with system() call
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
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
[PHP] problems with system() call
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
[PHP] problems with system()
Hello, I am in a bit of a pickle and would greatly appreciate any help. I have code which writes inputs to a txt file. These inputs are used as inputs to a c program. What I am trying to do is use the redirect command < to run the code from php. The command is: ./a.outjunk"); it does write the first couple of lines of the code output to the file. Can anyone see anything wrong? Any help would be great, thanks again John _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]