#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    2
    Rep Power
    0
    Hi there,
    I desperately try to execute an external perl script from PHP.

    $e = /prg/test.pl
    exec($e) or exec("$e")

    the script is a test script only to see how exec works. it copies a file to an another directory.
    The script works on its own, the authorizations are ook we the user of Apache.
    PHP is not compiled in safe mode.
    exec("whoami") works without any problem.

    I got the same problem with system, passthru ...

    Does anybody have an idea ,
    Thankx,
    McTux

    nicolas.boseret@mail.be
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Did you try exec("/path/2/test.pl")? If that didn't work, try using virtual(). It's the PHP equiv. of Apache's SSI <!--#include virtual=""-->. That might be what you need.

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    2
    Rep Power
    0
    I do not understand what the problem is.
    I checked the authorizations, the paths etc etc ...

    It does not want to work ... I'm getting mad .

    Since the script I want to launch is not generating html, how coud i use virtual ???

Similar Threads

  1. php script won't work inside "cgi-local" directory
    By Volitics in forum PHP Development
    Replies: 5
    Last Post: April 26th, 2004, 11:50 PM
  2. Perl script converting GIF and JPG images to BMP ???
    By Deanna475 in forum Perl Programming
    Replies: 20
    Last Post: February 17th, 2004, 07:35 PM
  3. Replies: 2
    Last Post: February 11th, 2004, 12:03 AM
  4. mod_rewrite and Apache 2 cgi script not working
    By jroamo in forum Apache Development
    Replies: 0
    Last Post: February 10th, 2004, 01:22 PM
  5. How can I enable a power user to run this script?
    By Yamadatroy in forum Visual Basic Programming
    Replies: 2
    Last Post: January 19th, 2004, 10:39 PM

IMN logo majestic logo threadwatch logo seochat tools logo