Install PHP via Yocto

I was able to add the apache2 package to the version 2.7.3 linux and build a new image using bitbake. I modified local.conf and bblayer.conf as mentioned in this link Installing Apache via Yocto - Technical Support - Toradex Community

How do I go about adding PHP to the linux image?

You can use the OpenEmbedded Layer Index to search for recipes in layers:

https://layers.openembedded.org/layerindex/branch/master/recipes/?q=php

It seems that PHP is available in the meta-oe layer, so simply adding php and php-cli to IMAGE_INSTALL_append should give you PHP and CLI PHP support. To use PHP with Apache 2 you need also to configure PHP packageconfig e.g. in your local.conf:

PACKAGECONFIG_append_pn-php = " apache2"

And then add php-modphp to IMAGE_INSTALL_append.

Hello,
This thread is a little old, but I followed it to get Apache and PHP working together. I have a problem with php-modphp, because bitbake says:

ERROR: Nothing RPROVIDES ‘php-modphp’ (but /home/laboratorio/oe-core/build/…/layers/meta-toradex-demos/recipes-images/images/tdx-reference-minimal-image.bb RDEPENDS on or otherwise requires it)

How can I solve this issue?

Thank you so much

Hey @aarribas,

This is an older thread, would you mind posting your question on a new ticket.

Thanks

Eric