You can enable PHP as CGI in HTTP Server powered by Apache server.
To enable PHP as CGI do these steps:
- Make sure Server for PHP app is installed
- Launch HTTP Server powered by Apache app
- Open settings (button with gear icon on toolbar)
- Open "CGI" setting
- Enable option "com.esminis.server.php (Server for PHP)" and press "OK"
- If Apache HTTP server is not running press "Start server" button (if it was running it will restart automatically)
- That`s all, now you can put PHP files to Apache HTTP server document root (by default /sdcard/htdocs/public)
What you should know
! It might take some time for server to start with CGI enbaled especially first time or when you change enabled modules in Server for PHP application.
! When you change enabled modules in Server for PHP app and restart HTTP server it will update it`s PHP settings and modules (which takes some time).
How this all works
Once you enable CGI from other app (like Server for PHP) then every time Apache HTTP server is started it will request all needed files (binaries, configuration, ...) from that app and download if they have changed, then it will simply enable required Apache CGI configurations and start Apache HTTP server.