I have server running centos 6, i recently upgraded the php on the server to version 5.5 and noticed that some of the scripts in laravel framework i use are breaking.
i get this error
Parse error: syntax error, unexpected 'yield' (T_YIELD), expecting '(' in /var/www/vhosts/jpischolarship.com/httpdocs/laravel/helpers.php on line 563
After doing some research, i found that the framework i used has method called "yield" which is now a reserved keyword in php 5.5.
How do i downgrade my current php installation to previous version?
I have tried "yum downgrade php
" with no luck.
I get the following output
Loaded plugins: fastestmirror, priorities
Setting up Downgrade Process
Loading mirror speeds from cached hostfile
epel/metalink | 13 kB 00:00
* base: s2plmirror02.prod.sdl2.secureserver.net
* epel: dl.fedoraproject.org
* extras: s2plmirror02.prod.sdl2.secureserver.net
* updates: s2plmirror02.prod.sdl2.secureserver.net
base | 3.7 kB 00:00
c5-testing | 3.0 kB 00:00
extras | 3.5 kB 00:00
updates | 3.5 kB 00:00
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-comp lete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package php.x86_64 0:5.3.3-22.el6 will be a downgrade
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-5. 3.3-22.el6.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.3.3-22.el6 for package: php-5.3.3 -22.el6.x86_64
---> Package php.x86_64 0:5.5.0-0.25.beta3.el6.remi will be erased
--> Finished Dependency Resolution
Error: Package: php-5.3.3-22.el6.x86_64 (base)
Requires: php-common(x86-64) = 5.3.3-22.el6
Installed: php-common-5.5.0-0.25.beta3.el6.remi.x86_64 (@remi-test)
php-common(x86-64) = 5.5.0-0.25.beta3.el6.remi
Available: php-common-5.3.3-22.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-22.el6
Error: Package: php-5.3.3-22.el6.x86_64 (base)
Requires: php-cli(x86-64) = 5.3.3-22.el6
Installed: php-cli-5.5.0-0.25.beta3.el6.remi.x86_64 (@remi-test)
php-cli(x86-64) = 5.5.0-0.25.beta3.el6.remi
Available: php-cli-5.3.3-22.el6.x86_64 (base)
php-cli(x86-64) = 5.3.3-22.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Best Answer
You need to run: