Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Can PHP force a server to run a program

  • 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, Registered Users 2 Posts: 68,173 ✭✭✭✭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, Registered Users 2 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