Can I install php v7.0 in Rocky 8.7
By default, the earliest 7.x release is PHP 7.2. You can however use Remi’s Repo, which you can use the wizard here: Remi's RPM repository
Choose EL8, 7.0.33, Multiple versions simultaneously and it will give you instructions on what you need to do to get PHP 7.0.
Please note however, that all PHP versions before and including 7.4.x are now EOL and no longer supported and cannot encourage you to use such a version - so it’s on your own risk. PHP 7.4 will however be supported for the life of the distribution, eg: Rocky 8.x. Therefore if you do want to use a PHP 7.x version, then PHP 7.4 is the best way forward using the modules:
dnf module enable php:7.4
ideally, better to update the application and use PHP 8.x.
Thanks for the update it worked PHP version updated to PHP 7.0.33.
But the project is not loading.I cant install additional packages
dnf install php70-php-xxx
php artisan migrate command also not working
The project was loading on centos 7 and I want to load it no rocky linux without changing PHP v7.0
Rocky 9 is not CentOS 7, so what worked in CentOS 7 doesn’t mean it will work on later versions. Mainly because software has been upgraded and moved on. If the PHP 7.0 repository doesn’t have PHP modules that you need then you would have to build them yourself. As I said, PHP 7.x is EOL and unsupported so nobody is going to do any more work on it.
Alternatively you can try to run it on PHP 7.2 or PHP 7.3 assuming that they have the modules you need. Otherwise you’ll just have to stick with CentOS 7 or rewrite the PHP application to use a newer PHP version.
Thanks for the update.