Back

Technologies:

javascriptjavascript
htmlhtml
phpphp
avatar
Tolerim
a month ago

Running a Busybox PHP script using httpd on Debian Linux.

My Raspberry PI is up and running with busybox, and I can access the service on my browser using the IP address. Despite installing both php 7.3 and php cgi 7.3, the Configuration page php script doesn't execute and instead displays code on the webpage. Could I have missed something while mounting the external drive for my Raspberry PI at /media/velchro? Alternatively, is it possible that my version of PHP is incompatible with busybox? I've tried researching for a solution, but I'm at a loss. Can you kindly assist me in running the PHP code and displaying the Configuration page?

Answers(2)
avatar
Vogi
a month ago
Verified Answer
It seems that the problem could be due to the fact that exec is not a stand-alone executable but rather a built-in command of the bash shell. It won't work in PHP or the rest of the webserver modules. You could try to resolve the atomicity in the PHP script itself. Another possibility is that you might have installed a wrong version of PHP that doesn't support the version for busybox. I hope this helps. Let me know if you have any other questions.

Sources

exec in busybox shell script fails when called from phpBusybox running PHP script with httpd on debian linuxlinux - Busybox init does not start /etc/init.d/rcS - Stack Overflow
avatar
Tolerim
a month ago
It sounds like you may need to configure your web server to properly handle PHP files. Depending on what web server you are using, this could involve installing or configuring PHP modules, setting up file permissions, or modifying your web server's configuration files. You may also want to double-check that your PHP file is in the correct directory and that the file permissions are set correctly. Without more information about your specific setup, it's difficult to provide a more detailed answer. However, some general troubleshooting tips include checking your web server logs for errors, verifying that your PHP installation is working correctly by running a simple test script, and making sure that your web server is correctly set up to handle PHP files (e.g. by ensuring that files with a .php extension are associated with the PHP interpreter).
;