Who knows the AppWeb HTTP server and embedded PHP?

in my search for a fast but convenient web server, I went to the EmbedThis (TM) HTTP server home page. It has 2 licencse models, GPLv2 and commercial with support.

At first glance, it looks good: the track is not too large, it is fast, and it has a lot of settings. Most important would be the fast execution of PHP using the built-in PHP library. Unfortunately, this PHP library does not include every option, especially the "gettext" I need for I18N.

My target platform is Linux on an embedded device with an ARM processor. Does anyone have any experience with the issues mentioned above?

Regards, Andi

+4
source share
4 answers

Their frequently asked question broadly covers replacing the built-in library with another flavor of PHP, as well as the inclusion of additional functions of the built-in PHP handler. This is not obvious in the default documents (html) that go into docroot (localhost: 7777 after installation).

Just have a look at the mentioned git repo, edit the Makefile (basically a wrapper for Zend) and include mbstring or whatever else you need. The default string is very simple bones.

This will create a new libphp.so for using Appweb.

Nice to see another Appweb fan, this is a very useful tool.

+1
source

Doesn't lighttpd work on embedded platforms? It supports PHP through FastCGI. If this is not the case, then thttpd may be a viable solution (works through PHP through CGI).

Alternatively, you can just take a look at the servers mentioned in the Lightweight Web servers article and see if it suits you best.

+2
source

The binary distribution includes PHP, but there is no source distribution. Appweb includes a PHP handler that relies on the libphp5 distribution.

You must download php and create it yourself. Here are the php settings used by Embedthis:

 --disable-debug --disable-rpath --disable-cli --enable-bcmath --enable-calendar \ --enable-maintainer-zts --enable-embed=shared --enable-ftp \ --enable-inline-optimization --enable-magic-quotes --enable-safe-mode \ --enable-sockets --enable-wddx --sysconfdir=/etc/appweb \ --with-pic --with-exec-dir=/etc/appweb/exec --with-regex=system --with-pear \ --with-xmlrpc --with-zlib 

If you create it yourself, copy libphp5 to the bin / lib directory and restart.

Finally, Embedthis maintains a repository with packages taken snapshot https://github.com/embedthis/packages . This includes all packages used by Appweb and Ejscript.

+2
source

I am checking the source code and PHP is not included in it (only a handler for the web server itself). I assume you downloaded the binaries and the associated version of PHP did not include gettext.

You must compile PHP yourself, and when you do, you can enable the extensions you want.

+1
source

Source: https://habr.com/ru/post/1310236/


All Articles