Building Appweb with PHP Support
The Appweb PHP modules is deprecated. Please use the FastCGI handler for PHP support instead.
Appweb includes support for the PHP Web Framework via a the FastCGI handler which runs the PHP php-cgi program.
Using PHP
If you wish to use PHP handler, build with FastCGI and enable the fastHandler in your appweb.conf.
To build Appweb with FastCGI support consult Building with CGI.
Using the in-memory PHP handler
The appweb-php package implements the Appweb in-memory handler for PHP 5.X and does not include the source code for PHP which is very large. PHP 7 is not supported.
The Appweb PHP handler is called mod_php.so and the handler loads the actual external PHP library which is called libphp*.so on Linux and libphp*.dll on Windows.
Building Appweb with PHP
Perform the following steps at the top level of the appweb source tree.
Starting with Appweb 7.1.1 and 8.0, the appweb-php package is included with the Appweb source distribution. Some earlier releases may have included the package which resides at src/appweb-php. If your distribution does not include appweb-php, use the following steps to download it.
Download appweb-php
pak install appweb-php
Alternatively, if you wish to install appweb-php manually:
cd appweb-src-home curl https://github.com/embedthis/appweb-php/archive/master.tar.gz >appweb-php.tgz mkdir src/appweb-php cd src/appweb-php tar --strip-components 1 -xvf ../appweb-php.tgz
Building with PHP
Visit: https://php.net/ to access the PHP source and instructions for building.
Configuring and building with PHP
Once PHP is built, you can configure Appweb for building with PHP. If you are building with MakeMe, then use the following:
./configure --with php=/path/to/php-source me
If you are building with make first copy the built PHP library into your build/*/bin directory. Then use:
make ME_COM_PHP=1 ME_COM_PHP_PATH=/path/to/php
Configuration
The PHP handler is enabled via the appweb.conf configuration file directives:
LoadModule phpHandler libmod_php AddHandler phpHandler php