Utilising local php and MariaDB (=MySql) locally

281 views
Skip to first unread message

Paul Norman

unread,
Apr 4, 2016, 5:55:55 AM4/4/16
to DroidScript
Hi,

(Btw loving the new phone based editor!)

Just recently experimented with using local PHP server with DroudScript.

Thought to share in case any use to any one else.


Its free, add free; and get the same developer's MariaDB if you need MySql.

This will show you which PHP libraries are available:

Point the PHP server root directory to where you've installed the attached very simple .spk to, and the subfolder /php there.

Set PHP server to 0.0.0.0 port 8080

Turn PHP server on.

Run attached DroidScript app.

Enormous implications for using what PHP can do (some additional image/graphic handling etc...) and recycling any PHP libraries you may be able to use.

Paul
try php.spk
Screenshot_2016-04-04-21-38-31.png
Screenshot_2016-04-04-21-38-00.png

Dave Smart

unread,
Apr 4, 2016, 6:59:34 AM4/4/16
to DroidScript
Thanks Paul,

That's very interesting. It would also be interesting to know if it is possible to run a DroidScript service 'underneath' the PHP server to allow remote access to the device's hardware.  You might be able to talk to the DS service via localhost web sockets from the PHP.

Regards
David

Paul Norman

unread,
Apr 4, 2016, 8:34:41 AM4/4/16
to DroidScript
Yes Dave,

I'm absolutely sure that'll work Dave.

Also, here's an update showing checking MySql version if the MariaDB server was also installed and is running.

Paul
Screenshot_2016-04-05-00-21-44.png
try php.spk

Paul Norman

unread,
Apr 4, 2016, 10:33:34 PM4/4/16
to DroidScript
Here are a couple of screenshots showing which GD and EXIF features come with the autoloaded extensions.
Screenshot_2016-04-05-13-31-27_20160405_143153.jpg
Screenshot_2016-04-05-13-32-17_20160405_143152.jpg
Screenshot_2016-04-05-13-32-49_20160405_143151.jpg
Message has been deleted

Paul Norman

unread,
Jun 5, 2016, 5:15:15 AM6/5/16
to DroidScript
Was answering another post about LocalHost databases, and thought to update this Post as well:– 

Now including ImageMagick! 

If you want something slim running directly on Android you could check out: 

Php (any versions of 5.x or 7.x - latest also available) 

https://play.google.com/store/apps/details?id=com.esminis.server.php 

And (MariaDB ~ MySql) 

https://play.google.com/store/apps/details?id=com.esminis.server.mariadb 

Both open source, free, and no adds, plus an impressive array of PHP extensions including now Berkeley DB (for flat files out of the box) and full on ImageMagick! 

Andrikys is just today, adding the ability for apps like DroidScript to control the PHP Server via Intents — 

"Support for Intents from other applications, to: 

- Start server, Stop server, Restart server 

- Support get/set Server status, ip, port, document root 

- Remember permission for all actions separately 

- Dialog to allow/disallow server control with intents" 

https://bitbucket.org/esminis/server 

No other local webserver needed - PHP Server does it all, synchorous request queue processing – excellant for development purposes; good for small local intranet, or if you've configured it, small WAN usage. 

I use it a lot, has made up for no stable distributible Node.Js backend. 

Paul

Syed Munawer Hassan

unread,
Aug 27, 2017, 4:41:34 PM8/27/17
to DroidScript
Why This app is getting mobile model?

Chris

unread,
Aug 27, 2017, 5:25:30 PM8/27/17
to DroidScript
Paul,

If you want an all in one web IDE, try:

https://play.google.com/store/apps/details?id=com.twoseventwodev.icodego

And install the web IDE. 7.1 PHP is included. MySQL. Lightppd.

Also, I have nodejs working, and am trying to get npm working 'properly' then it will also be available for ICG as a module as well.

Reply all
Reply to author
Forward
0 new messages