I am using Yocto to create a build including apache2 but I have a hard time adding php support. I had it running previously (read: last year) but since then there have been changes to the meta-webserver layer in meta-openembedded. From the README file in meta-webserver:
"This layer used to provide a modphp recipe that built mod_php, but this is now built as part of the php recipe in meta-oe. However, since apache2 is required to build mod_php, and apache2 recipe is in this layer and recipes in meta-oe can't depend on it, mod_php is not built by default. If you do wish to use mod_php, you need to add "apache2" to the PACKAGECONFIG value for the php recipe in order to enable it."
I have added the following line to php in my own layer:
PACKAGECONFIG_append = " apache2"
But I get compilations error when it can't find what appears to be apache include files when compiling mod_php (I include only one error below, I get a similar error for ap_config.h as well):
In file included from /home/martin/Yocto/poky/rpi/tmp/work/x86_64-linux/php-native/5.6.12-r0/php-5.6.12/sapi/apache2handler/mod_php5.c:26:0: | /home/martin/Yocto/poky/rpi/tmp/work/x86_64-linux/php-native/5.6.12-r0/php-5.6.12/sapi/apache2handler/php_apache.h:24:19: fatal error: httpd.h: No such file or directory | compilation terminated.
Has anyone managed to compile apache2 with php support lately and can give some assistance on how to do it? Thanks!