Downgrading to PHP 5.6x, removing /opt/bitnami/php

Keywords: LAMP/MAMP/WAMP - Google Cloud Platform - How to - Other
Description:
I followed the guide from jariza on how to downgrade to LAMP with PHP 5.6x, but I can’t figure out how to do the B step in the process. Could I get step by step instructions for it. Thanks :

A. Download and install the LAMP Stack with PHP 5.6.x from https://bitnami.com/stack/lamp/installer937 on your server. After that, remove the previous LAMP Stack with PHP 7.

B. Install PHP using the System Package Manager. Then, modify the environment to remove /opt/bitnami/php from the PATH and also edit the file /opt/bitnami/scristps/setenv.sh to avoid including /opt/bitnami/php again in the PATH.

This is my setup to downgrade to 5.6x but seems I wasn’t successful.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
       ___ _ _                   _
      | _ |_) |_ _ _  __ _ _ __ (_)
      | _ \ |  _| ' \/ _` | '  \| |
      |___/_|\__|_|_|\__,_|_|_|_|_|
  
  *** Welcome to the Bitnami WordPress 5.7-2                          ***
  *** Documentation:  https://docs.bitnami.com/google/apps/wordpress/ ***
  ***                 https://docs.bitnami.com/google/                ***
  *** Bitnami Forums: https://community.bitnami.com/                  ***
#######################################################
###    For frequently used commands, please run:    ###
###         sudo /opt/bitnami/bnhelper-tool         ###
#######################################################
da_gud_guy1@wordpress-1-vm:~$ sudo /opt/bitnami/ctlscript.sh stop
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
/opt/bitnami/php/scripts/ctl.sh : php-fpm stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
da_gud_guy1@wordpress-1-vm:~$ sudo rm -f /opt/bitnami/
rm: cannot remove '/opt/bitnami/': Is a directory
da_gud_guy1@wordpress-1-vm:~$ sudo rm -rf /opt/bitnami/
da_gud_guy1@wordpress-1-vm:~$ wget https://downloads.bitnami.com/files/stacks/lampstack/5.6.31-0/bitnami-lampstack-
5.6.31-0-linux-x64-installer.run
--2021-04-07 15:30:31--  https://downloads.bitnami.com/files/stacks/lampstack/5.6.31-0/bitnami-lampstack-5.6.31-0-l
inux-x64-installer.run
Resolving downloads.bitnami.com (downloads.bitnami.com)... 13.226.220.107, 13.226.220.121, 13.226.220.36, ...
Connecting to downloads.bitnami.com (downloads.bitnami.com)|13.226.220.107|:443... connected.
HTTP request sent, awaiting response... 200 OK
Error: Unknown error while running /opt/bitnami/php/bin/php -q 
/opt/bitnami/php/bin/fixreg.php /opt/bitnami/php/etc @@BITROCK_PHP_ROOT@@ 
/opt/bitnami/php
Press [Enter] to continue:
Warning: Problem running post-install step. Installation may not complete 
correctly
 Unknown error while running chown -R root:daemon 
/opt/bitnami/frameworks/symfony/app
Press [Enter] to continue:Warning: Problem running post-install step. Installation may not complete 
correctly
 Unknown error while running chown -R root:daemon 
/opt/bitnami/frameworks/smarty/sample
Press [Enter] to continue:Warning: Problem running post-install step. Installation may not complete 
correctly
 Unknown error while running chown -R root:daemon 
/opt/bitnami/frameworks/laravel/storage
Press [Enter] to continue:
Error: Unknown error while running /opt/bitnami/ctlscript.sh start apache & > 
/dev/null
Press [Enter] to continue:
Warning: Problem running post-install step. Installation may not complete 
correctly
 Unknown error while running chown -R root:daemon /opt/bitnami/apache2/htdocs
Press [Enter] to continue:
#
----------------------------------------------------------------------------
Setup has finished installing Bitnami LAMP Stack on your computer.
Launch Bitnami LAMP Stack [Y/n]: 
Error: There has been an error.
Unknown error while running /opt/bitnami/ctlscript.sh start
Press [Enter] to continue:da_gud_guy1@wordpress-1-vm:~$ 
da_gud_guy1@wordpress-1-vm:~$

Hi @da.gud.guy1

Thanks for using Bitnami LAMP!

I guess you are referring to this post here:

https://community.bitnami.com/t/how-can-i-downgrade-to-php-5-6-from-php-7-0/51792/2?u=jcarmona

Am I right?

This post makes reference to LAMP, however, you seem to be using a WordPress instance instead (from the logs you posted):

...
*** Welcome to the Bitnami WordPress 5.7-2                          ***
...

Although it is true that Bitnami WordPress is just an extension of LAMP (at the end of the day, WordPress is just another PHP application to serve), what is the stack you are trying to downgrade?


but I can’t figure out how to do the B step in the process.

The post I mention does state that there are two options to achieve that goal (either A or B), but you are not expected to execute both. Instead, choose one of them :slightly_smiling_face:

Hello guys,
where I can download an .OVA LAMP template with latest stable PHP 5.6 from, I believe it is 5.6.40?

Thank you!
Irk

Hi @mazgalov

Here you have a link to download LAMP Stack 5.6.40-1:

https://downloads.bitnami.com/files/stacks/lampstack/5.6.40-1/bitnami-lampstack-5.6.40-1-linux-debian-9-x86_64.ova

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Great!
Thank you very much JCarmona!