Well, simply don't increase your move variable any further, if you detect that the user object is near or at the border. Or reverse the move direction, depending on your general intent.
if x_blocky > 870 or x_blocky < 0:
print(' X Border')
blocky_x_move = 0
if y_blocky > 750 or y_blocky < 2:
print(' Y Border')
blocky_y_move = 0
First remove everything regarding old php version (will take some time...)
sudo yum remove --setopt=clean_requirements_on_remove=1 php php-pear php-mysql php-cli php-common mod-php
then, install newer version (will take even more time)
sudo yum install mod_php70u php70u-cli php70u-mysqlnd
dont forget to do restart and check
sudo apachectl restart
systemctl status httpd
If you're running fpm with NGinX then use following uninstall (this will keep the config's just o remove packages / dependencies)
sudo yum remove --setopt=clean_requirements_on_remove=1 php-fpm php-cli php-common php7-fpm php7-cli php7-common
and install
sudo yum install php7-fpm-nginx php7-cli php7-mysqlnd
(use [72] instead of [7] if you need to)
save, exit and restart
sudo systemctl restart php-fpm
sudo systemctl restart nginx #(or whatever you use)
please consider stepping down to version 7.1, as that might be a little less pain connecting modules than latest version, especially on always problematic centOS
(thanks @fyrye for options on remove)
Best Answer
This is the procedure for PHP 5.6.
I was able to upgrade PHP 5.4.16 on CENTOS7 to version 5.6.25 with these simple steps. Important to note that i used the Software Collection Repositories.
1- Install All these new packages:
2- Make apache 2.4 use php-fpm
Edit that file: /etc/httpd/conf.d/php.conf Put that content:
3- Reboot services to handle php-fpm:
4- Enabling rh-php56-php-fpm service on boot time
5- Create a symlink for the new php version.