Hello khyathi,
If this is to be done in the bitbake itself then,
1. Add only php-cgi to image.bb file.
2. Modify lighttpd.bb file for the below lines,
RDEPENDS_${PN} += " \
lighttpd-module-access \
lighttpd-module-accesslog \
lighttpd-module-indexfile \
lighttpd-module-dirlisting \
lighttpd-module-staticfile \
lighttpd-module-rewrite \ --added new
lighttpd-module-auth \ --added new
lighttpd-module-fastcgi \ --added new
"
3. Recompile image for lighttpd package. ---bitbake -c clean package
4.Now rebuild with bitbake image.
I’ve seen this question also in external forums, I hope that they can provide some guidance as there is no documentation for running php on the i.MX.
I’ve found the following thread in an external forum, perhaps it can help. Although I’m guessing maybe you already found it while searching on the web.
Install PHP via Yocto - Toradex Community
Regards