Execute Bash Script Using PHP

I’m about to use rapidweaver to build a control panel for my Raspberry Pi :slight_smile:

https://www.brandoncorlett.com/blog/article/execute-bash-script-using-php

3 Likes

I’ve been wanting to get into Raspberry Pi - this is very intriguing. Thanks for sharing!

1 Like

I love Raspberry Pi. I’ve been working with it for about a year and a half and it’s completely upped my software and hardware development skills. There is a lot more you can do when you have complete control of your server.

Once I get BetaStacks switched over to EchoStacks I may build some Stacks that are specifically designed for use with the Raspberry Pi.

1 Like

This sounds really cool. If there’s anything we can add to Stacks that would help your Pi development, just say the word. :slight_smile:

3 Likes

Will do! :slight_smile:

Right now I’m trying to work out how to successfully setup phpseclib so I can use ssh sessions to execute commands rather than opening up holes in security with www-data having sudo privileges.

If it works out then I’ll make some phpseclib stacks.

You are opening secury holes nevertheless :smiley: but as long as it is your server and only reachable in your network, no worries. Happy New Year :confetti_ball:

Lol I had the same thought. I’m trying to work out the best way to lock things down for a open network network.

It’s not that big of deal for my current project as the the site it only accessable when on the WiFi network being broadcasted by the Pi. It allows the user to set a Eddystone-url broadcast from the Pi.

Happy New Year! :grin::fireworks:

I think you could mitigate the security at least partially by ensuring the UNIX user that the web server is running as, only has a very limited access to the file system and no access to most executables.

And, of course, doing the same tasks in Rails or node.js, even if it’s theoretically just another executable scripting language – those scripting languages have been purpose built and well tested as web-back-ends – so will suffer from fewer real-world security holes.

BASH is a lot more fun, tho. :stuck_out_tongue:

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.