Console route problem on production server

Hi all.

I’m building a console controller and I can reach it properly in my development environment (Ubuntu/LAMP).

Everything works fine, logging and so.

But when I deploy it to my production server I cannot run it from command line. It is supposed to run as a cron task in the future.

In dev I get the controller in a usual way: php yii controller/action

In dev it gives me:




[error][yii\console\Exception] exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "primeapps/index"



[size="2"]primeapps is the controller.[/size]

[size="2"]If I just type php yii I can see the controller there:[/size]

[size="2"]


php yii help




This is Yii version 2.0.3.







[b]The following commands are available:[/b]







- asset   	Allows you to combine and compress your JavaScript and CSS files.


- cache   	Allows you to flush cache.


- fixture 	Manages fixture data loading and unloading.


- gii 		This is the command line version of Gii - a code generator.


- help        Provides help information about console commands.


- message 	Extracts messages to be translated from source files.


- migrate 	Manages application migrations.


- primeapps   







[b]To see the help of each command, enter:[/b]








yii help <command-name>

[/size]

[size=“2”]I’m sure is a stupid tiny mistake from config, but I have checked (almost) everything, and it’s OK.[/size]

[size="2"]Hope anybody can point me in the right direction.[/size]

[size="2"]Best regards.[/size]

Ok.

Regards everybody.

After some crazy hours,[size=2] [/size][size=2]I[/size][size=2] finally have resolved it.[/size]

On my local machine (Bitnami MAMP) it doesn’t matter if you name your controllers with first capital letter, so primeappsController.php behaves the same as PrimeappsController.php

But in my production server, Bitnami LAMP, it does. It should be named as PrimeappsController.php

Same happened to me a month ago with a Zend app. Same way.

SO it’s here for remembering everybody should name files properly, specifically controllers!!!

Good day.