Cannot declare Controller, name is already in use

I am trying to make basic controller but getting strange error:
PHP Fatal error: Cannot declare class AOS_QuotesController, because the name is already in use

So I have created file createProfInvPA.php in \modules\AOS_Quotes

Code is like this:

<?php class AOS_QuotesController extends SugarController{ //Can now put actions here public function action_createProfInvPA(){ echo "Hello world!"; } } Did repair and rebuild with developer mode on. So when I try to run this action in browser: .../index.php?module=AOS_Quotes&action=createProfInvPA It throws this error. SuiteCRM version 7.10

Ok so I managed to solve this.
It turns out that this legacy method of invoking actions is no longer working (documentation says it is not longer recommended)…

Now the way to do it is to make controller.php file in custom/modules/
Also class should be named: CustomController
So I have created this file:

<?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class CustomAOS_QuotesController extends SugarController{ //Can now put actions here public function action_createProfInvPA(){ echo "Hello world!"; } } And now it works... Hope this will help someone...