Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Can PHP force a server to run a program

Options
  • 15-03-2005 11:02pm
    #1
    Closed Accounts Posts: 22,479 ✭✭✭✭


    can php make a server run a application that is hosted on it instead of just downloading it


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    I'm not sure what you mean?

    You can use the popen() handler to run a process on the server where the PHP is installed, but whether it will do it depends on what the access rights of the httpd/apache process are.


  • Registered Users Posts: 102 ✭✭cormy


    You can also use system() to run a program/command on the server (with the same limitation mentioned by seamus)...

    http://ie.php.net/manual/en/function.system.php

    ... The last part of your question about "...just downloading it..." is confusing - can you provide more info?


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Jakkass wrote:
    can php make a server run a application that is hosted on it instead of just downloading it
    If you call an application in the Web root that has exec rights, then it will execute rather than be downloaded, regardless of the scripting technology.

    If you mean can PHP force a client to execute an application on their own machine, then no - it can't.


Advertisement