2

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

2 Answers 2

1

You need to run:

 "sudo yum downgrade php php-common php-cli"
4

Different Way for CentOS with php from atomic repo. since there is no old 5.3 on the atomic you need a different repo. I used the http://webtatic.com.

install the repo:

rpm -Uvh http://mirror.webtatic.com/yum/centos/5/latest.rpm

install gpg-key:

rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

edit atomic repo:

vi /etc/yum.repos.d/atomic.repo

add php exclusion for atomic:

[atomic]
exclude=php,php-common,php-*

edit webtactic repo:

vi /etc/yum.repos.d/webtatic.repo

change repo settings:

[webtactic]
enabled=1

now downgrade php:

yum downgrade php, php-*

worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .