# Error coming when trying to run server or do migrations

**URL:** <https://discourse.cakephp.org/t/error-coming-when-trying-to-run-server-or-do-migrations/12828>\
**Category:** Need Help\
**Tags:** help\
**Created:** [April 22, 2026, 4:50am UTC](https://discourse.cakephp.org/t/error-coming-when-trying-to-run-server-or-do-migrations/12828 "2026-04-22T04:50:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhay-ops](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@abhay-ops](https://discourse.cakephp.org/u/abhay-ops)\
**Post date:** [April 22, 2026, 4:50am UTC](https://discourse.cakephp.org/t/error-coming-when-trying-to-run-server-or-do-migrations/12828/1 "2026-04-22T04:50:36Z")

</div>

This error is coming from where whenever I try any console command from cake, like bin/cake server or bin/cake migrations migrate.

Error that I am getting:- bin/cake migrations migrate

```bash
PHP Fatal error: Cannot redeclare Cake\I18n\__() (previously declared in C:\Users\aispl_admin\repos\Projects\pocor-openemis-core\vendor\cakephp\cakephp\src\I18n\functions.php:31) in C:\Users\aispl_admin\repos\Projects\pocor-openemis-core\vendor\cakephp\cakephp\src\I18n\functions.php on line 40                                     

Fatal error: Cannot redeclare Cake\I18n\__() (previously declared in C:\Users\aispl_admin\repos\Projects\pocor-openemis-core\vendor\cakephp\cakephp\src\I18n\functions.php:31) in C:\Users\aispl_admin\repos\Projects\pocor-openemis-core\vendor\cakephp\cakephp\src\I18n\functions.php on line 40

```

I only did composer install. I am new to cakephp, If anyone knows about this please let me know.

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [April 22, 2026, 6:27am UTC](https://discourse.cakephp.org/t/error-coming-when-trying-to-run-server-or-do-migrations/12828/2 "2026-04-22T06:27:29Z")

</div>

Try reinstalling your composer modules via

```auto
rm -rf vendor
composer install

```

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [April 22, 2026, 9:08am UTC](https://discourse.cakephp.org/t/error-coming-when-trying-to-run-server-or-do-migrations/12828/4 "2026-04-22T09:08:48Z")

</div>

also I’d recommend you check your app with what is currently present in [GitHub - cakephp/app: CakePHP application template · GitHub](https://github.com/cakephp/app) as there could be changes you need to do.

---

<div class="post-metadata">

**Author:** ![Harper.Scott62](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@Harper.Scott62](https://discourse.cakephp.org/u/Harper.Scott62)\
**Post date:** [August 20, 2026, 2:07pm UTC](https://discourse.cakephp.org/t/error-coming-when-trying-to-run-server-or-do-migrations/12828/5 "2026-08-20T14:07:20Z")

</div>

The error shows CakePHP’s I18n functions.php is being loaded twice, with the same \_\_() declaration reported at lines 31 and 40. I’d first check for duplicate or mixed vendor trees before changing application code.
