kormie Posted October 13, 2009 Share Posted October 13, 2009 I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaWiki on my site and I'm trying to install some extensions. In order to install the Search functionality extension I have to run some scripts. Since it's not my server I wanted to use php to execute these Unix Executable Files that came with the package. Do I use system('file_name')? and browse to the site I have with this php within it? These are probably really lame questions, and I apologize design is more my forte and I'm just now learning the language. Thanks for any help! Quote Link to comment Share on other sites More sharing options...
gizmola Posted October 13, 2009 Share Posted October 13, 2009 Let me see if I understand you correctly: -You have some programs on server A. -On server B you need to run a program on server A, as if it was local to server A. Is that the question? If so, no, that can not be done by PHP or any other language. Quote Link to comment Share on other sites More sharing options...
kormie Posted October 13, 2009 Author Share Posted October 13, 2009 No, everything is on the same server. All I'm trying to do is execute the program. Quote Link to comment Share on other sites More sharing options...
trq Posted October 13, 2009 Share Posted October 13, 2009 system should be fine providing the server has permissions to execute the programs. This is pretty unlikely however. Quote Link to comment Share on other sites More sharing options...
gizmola Posted October 13, 2009 Share Posted October 13, 2009 Along with system() there's also the backtic, which allows you get back the results from standard out into a php variable. $ret = `someprog`; But as thorpe stated, you will only be able to execute programs that the php user can execute, unless you're using the command line php interpreter, but to do that you'd need to be in a shell, where, if that was the case, there's typically not a reason for you to write a php script to run them, when you could just run them directly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.