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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Can PHP force a server to run a program

  • 15-03-2005 10: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,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, 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