Using the Gii Module of Yii1 in PHP 7.1

If you are using Yii1’s Gii Module and have upgraded to PHP 7+ you might be getting a 500 error message thrown at you when previewing Model diff code changes.

I have recently upgraded PHP version for one of my projects. Speed improvement went was massive so it’s something that I would really recommend.

The application in question is still using Yii version 1. The good news is that the folk behind the Yii framework have release version 1.1.17 which makes it compatible with PHP 7+

Here below is my simple fix for the issue with the Gii Module. In the www/index.php file

Simple!

UPDATE: on the 19th of April Yii has released Yii 1.1.18 which fixes various PHP 7 issues including the incompatibility bug in the Yii Module.

Join the Discussion

Your email address will not be published. Required fields are marked *