Bitnami developer here.
Please note that our applications are self-contained and that means that our applications bundle all of the libraries, databases, and runtimes required to run on any platform and they don't depends on the components that exist in your system. The way you tried to update the components doesn't work with the Bitnami stacks due to it updates the components of the system.
You will learn more about Bitnami stacks here.
If you launched a server with LAMPstack in the cloud you could launch a new server with the latest version of the stack and then migrate the data, however if you installed the stack in a local server you could install the new version of the stack and migrate the data before uninstalling the old version.
To migrate the data you will need to copy your custom files from the old version to the new one (The php files of your application if you deployed your custom php application, the configuration files of Apache if you modified it, ...) and the data of the database. To migrate the database you will need to create a backup of your databases
mysqldump -u root -p database_name > backup.sql
And restore it in the new installation
mysql -u root -p database_name < backup.sql
Please note that you will need to create that database if it's not created.
mysql -u root -p
mysql> create database database_name;
mysql> grant all privileges on database_name.* to 'bitnami'@'localhost'
identified by 'BITNAMI_USER_PASSWORD';
mysql> flush privileges;
mysql> exit;
If you also installed any of the modules that we provide you have to install them in the new installation and migrate the data of the applications. The process depends on each application.
I hope it helps.
Jota
PHP
installation to latest version? – Turgeon