开发者

Who Knows AppWeb HTTP Server And Its Embedded PHP?

on my search for a fast but comfortable web server I dropped into the homepage of EmbedThis(TM) AppWeb(TM) HTTP server. This one has 2 licencse models, GPLv2 and a commercial one with support.

On the first view it looks good: the footprint is not too big, it is fast and it has a lot of configuration otions. The most important thing would be a fast PHP execution using a built-in PHP library. Unfortunately this PHP library doesn't include every option, especially "gettext" which o开发者_C百科ne I need for I18N.

My target platform is Linux on an embedded device with an ARM based CPU. Does anybody have experiences with the issues mentioned above?

Kind regards, Andi


Doesn't lighttpd run on embedded platforms? It supports PHP through FastCGI. If it doesn't then thttpd might be a viable solution (runs PHP through CGI).

Alternatively you could just have a look at the servers mentioned in the Lightweight Web servers article and see if one fits your needs better then those.


The binary distribution includes PHP, but the source distribution does not. Appweb does include a PHP handler that relies on the libphp5 distribution.

You are meant to download php and build it yourself. Here are the php configure options 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 build it yourself, then copy the libphp5 to the bin/lib directory and restart.

Lastly, Embedthis keep a repository with the packages snapshotted at https://github.com/embedthis/packages. This includes all the packages used by Appweb and Ejscript.


Their FAQ entry extensively covers replacing the built in library with another flavor of PHP, as well as enabling more features in the built in PHP handler. This isn't obvious in the default (html) docs that come in the docroot (localhost:7777 after installing).

Just check out the mentioned git repo, edit the Makefile (basically, wrapper to Zend's) and include mbstring, or whatever else you need. The default build is extremely bare bones.

This will make a new libphp.so for Appweb to use.

Good to see another fan of Appweb, its a very useful tool.


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

You have to compile PHP yourself and when you do that you can include the extensions you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜