|
Emanuel Gugustiuc - 2017-03-16 17:16:24
Hello Mr. Ulloa,
i try to run this script on the esmnis PHP Server Andoid app (details here: https://play.google.com/store/apps/details?id=com.esminis.server.php)
I can't get any results. I guess that it won't or cannot execute the *shell_exec* command (and the other related commands.)
From termux terminal all runs fine, but it's quite useless for me.
Any idea on how to run this over the server in a browser?
Best regards,
Emanuel
Luis Martinez Ulloa - 2017-03-16 19:48:37 - In reply to message 1 from Emanuel Gugustiuc
Hello Emmanuel:
Android is a special kind of Linux distro. the apps don't share libraries and executable paths as a normal distro.
Every app in Android have its own execution environment. So, Termux have its own set of binaries, including php executable, libraries, etc. Esminis PHP Server must have another one; this is the way Android encapsulates and isolates apps.The Termux Plugin, Termux:API itself, have the permissions to access some Android functions, accessible only from Termux executables, including PHP7.
A solution for this case may be run a script in Termux as json api server or similar, running PHP in http server mode, accessing it using http pointing to localhost:port, from your php application behind Esminis. A sort of distributed computing and interoperativity between php environments, all inside your device.
But, do you can run all your php app inside Termux? Take a look for Termux's PHP extensions; also, Termux have a lighttpd package if you need a full http server, a launcher widget plugin (Termux:Widget) to start scripts from the phone's screen.
Please test some of this ways to access Termux:API within your php app and comment your results.
Thanks!
Emanuel Gugustiuc - 2017-03-17 09:57:58 - In reply to message 2 from Luis Martinez Ulloa
Hello Mr. Ulloa
Tank you for this extended support response.
I will try running so soon as possible all over Termux server, so as you advised, to see if i get all another web stuff as expected (all runs fine under esminis PHP Server), then i will post my conclusions.
Best regards,
Emanuel
|