In my yocto development kit I included meta-openembedded/meta-oe in conf/bblayer.conf for meta-raspberrypi but I can't able to see php5 at the final image in /etc/php.I tried giving bitbake php and also included IMAGE_INSTALL_append = " php" nothing works.Can anyone please help me to include it in final image.
Bydefault Poky-sumo
branch gives php7.2
and if you want php5 use
PREFERED_PROVIDER_VERSION_php ="5.6.35"
Below are the packages provided by php recipe
PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}
you can all all required above packages like below example.
IMAGE_INSTALL_append = " php-cli php-cgi php-pear"
-
I tried adding PREFERED_PROVIDER_VERSION_php ="5.6.35" in local.conf and also included the php-cli,php-cgi also but nothing works for me,in /etc/php-> is not appearing.But in /usr/bin I can see php and php-cgi file alone. – Mohammed Harris Aug 1 '18 at 9:33
-
yes I tried these php-staticdev php-dev php-dbg php-doc php-dbg php-cli php-cgi php-pear – Mohammed Harris Aug 1 '18 at 12:07
You might find it's installed just not as you are expecting. Using Yocto version Sumo and the [meta-oe php 7.2.10][1] I added PHP to my image using:
IMAGE_INSTALL += "php php-cli php-fpm"
I found it bitbaked and installed fine but didn't generate the /etc/php folder or php.ini.
To see if it is installed:
php -v
Once you are in your OS create a file test.php and in it add:
<?php echo phpinfo(); ?>
Then run the below tells you the path it is expecting php.ini:
php test.php | grep php.ini