problem in using system to run a program.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fAnSKyer

    #1

    problem in using system to run a program.

    I am using

    system('GPA.exe ' . $filename);

    to run a program GPA.exe

    this program do the following things.
    ../GPA.exe filename.txt
    and will generate another file

    HOWEVER, the problem is, there is no new file generated and I doesn't
    get an exception.
    I don't know why. Can somebody give me a clue?

    Sorry for posting such silly questions, I am really new to PHP.

    Thanks a lot

  • pittendrigh

    #2
    Re: problem in using system to run a program.

    It is possible the exe expects to deposit the newly
    created file in "the current directory"
    .......which in the web-server context ends up undefined,
    or perhaps defaulting to an illegal area.

    exe sounds like windows stuff, which I try hard to know
    little about. But that sort of trouble often happens on
    a unix-like system.

    (when you run the program the user is you.
    When the webserver runs the program the 'user'
    has another definition and another permission set)

    Comment

    • fAnSKyer

      #3
      Re: problem in using system to run a program.

      That make sense.I am currently using linux to implement this.
      but do you know how to solve this?

      Thanks a lot
      Cheers

      fAnS.
      pittendrigh wrote:
      It is possible the exe expects to deposit the newly
      created file in "the current directory"
      ......which in the web-server context ends up undefined,
      or perhaps defaulting to an illegal area.
      >
      exe sounds like windows stuff, which I try hard to know
      little about. But that sort of trouble often happens on
      a unix-like system.
      >
      (when you run the program the user is you.
      When the webserver runs the program the 'user'
      has another definition and another permission set)

      Comment

      • Colin Fine

        #4
        Re: problem in using system to run a program.

        fAnSKyer wrote:
        That make sense.I am currently using linux to implement this.
        but do you know how to solve this?
        >
        Thanks a lot
        Cheers
        >
        fAnS.
        pittendrigh wrote:
        >It is possible the exe expects to deposit the newly
        >created file in "the current directory"
        >......which in the web-server context ends up undefined,
        >or perhaps defaulting to an illegal area.
        >>
        >exe sounds like windows stuff, which I try hard to know
        >little about. But that sort of trouble often happens on
        >a unix-like system.
        >>
        >(when you run the program the user is you.
        > When the webserver runs the program the 'user'
        > has another definition and another permission set)
        >
        You're running a .exe file on Linux?

        This might be a silly question, but do you know that
        ../GPA.exe filename.txt
        actually works?

        Colin

        Comment

        Working...