# Use cakephp with php7.1

**URL:** <https://discourse.cakephp.org/t/use-cakephp-with-php7-1/2870>\
**Category:** Need Help\
**Created:** [July 11, 2017, 9:53am UTC](https://discourse.cakephp.org/t/use-cakephp-with-php7-1/2870 "2017-07-11T09:53:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttson24](https://avatars.discourse-cdn.com/v4/letter/t/a3d4f5/32.png) [@ttson24](https://discourse.cakephp.org/u/ttson24)\
**Post date:** [July 11, 2017, 9:53am UTC](https://discourse.cakephp.org/t/use-cakephp-with-php7-1/2870/1 "2017-07-11T09:53:24Z")

</div>

hi all. i am used php 7.1 version and mamp 4.1.1, and install cakephp newest. this is project is run.  
but i customer old cake version(2.1). i have to error:  
Cannot use ‘String’ as class name as it is reserved  
Error: The requested address ‘/’ was not found on this server.  
Stack Trace  
CORE/Cake/Error/ErrorHandler.php line 203 → ErrorHandler::handleFatalError(integer, string, string, integer)  
$errorConfig = Configure::read(‘Error’);  
list($error, $log) = self::mapErrorCode($code);  
if ($log === LOG\_ERR) {  
return self::handleFatalError($code, $description, $file, $line);  
}  
CORE/Cake/Core/App.php line 929 → ErrorHandler::handleError(integer, string, string, integer, array)  
if (!is\_callable($errorHandler)) {  
return;  
}  
call\_user\_func($errorHandler, $lastError[‘type’], $lastError[‘message’], $lastError[‘file’], $lastError[‘line’], array());  
}  
CORE/Cake/Core/App.php line 902 → App::\_checkFatalError()  
if (self::$\_objectCacheChange) {  
Cache::write(‘object\_map’, self::$\_objects, ‘_cake\_core_’);  
}  
self::\_checkFatalError();  
}  
[internal function] → App::shutdown()

how suite i do?

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [July 11, 2017, 2:17pm UTC](https://discourse.cakephp.org/t/use-cakephp-with-php7-1/2870/2 "2017-07-11T14:17:16Z")

</div>

CakePHP 2 is not PHP 7 compatible

---

<div class="post-metadata">

**Author:** ![raul338](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/raul338/32/69_2.png) [@raul338](https://discourse.cakephp.org/u/raul338)\
**Post date:** [July 12, 2017, 12:59am UTC](https://discourse.cakephp.org/t/use-cakephp-with-php7-1/2870/3 "2017-07-12T00:59:44Z")

</div>

[CakePHP 2.7.0](https://bakery.cakephp.org/2015/07/11/cakephp_2_7_0_released.html) and after are PHP 7 compatible

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [July 16, 2017, 6:33pm UTC](https://discourse.cakephp.org/t/use-cakephp-with-php7-1/2870/4 "2017-07-16T18:33:24Z")

</div>

thanks for correcting me. That is good to know. 🙂
