> > Here is the php I've created, fairly simple:
> > <?php
> > exec("/var/www/html/myprog -E 123456789098.dat sample1.txt
> > sample1.new");
> > phpinfo();
> > ?>

> > From the command line it runs perfectly

A PHP script runs with the permissions of the user that Apache 
runs as, usually "nobody".  When run from the command line, it 
inherits a different set of permissions (i.e., root).

One option would be to put a copy of the executable in another 
directory, but OUTSIDE of your DOCROOT, and give it the same
ownership and perms as "nobody" (or whatever Apache runs as).

Of course, this makes your script 100% non-portable, if that 
matters.  It is also possible that the executable may not run, if it 
depends on compiled libraries elsewhere on the server.

************************************************************
WebDesigns Internet Consulting
E-commerce Solutions
Application Development

Sandy Keathley
Zend Certified Engineer
[EMAIL PROTECTED]
972-569-8464

http://www.KeathleyWebs.com/
************************************************************

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

Reply via email to