custom class wont load on production but will on pre-prod

Hi all.

I have a custom class called myDefinition that is in the frontend\custom namespace (and is in the folder of the same name).

For some reason this will load the class fine on my local machine, but on the host I get a message:

The main difference between my dev machine and the host is that I have moved the web folder to a public html location. I have re-pointed the entry script in the web folder to account for this and it all works fine unless this class is being used I have a problem.

I have set the entire application yii folder to 777 and the web folder is mostly 755

I am also using pretty URLs with a .htaccess file in place to hide the index.php part of the URL.

Anyone got any suggestions?


More detail for you:

I have this file frontend/custom/myDefinition.php

inside the class is called MyDefinition in the namespace frontend\custom

to access it in another view file: use frontend\custom\MyDefinition;

I am doing static calls to its properties, constants and static functions

so for example


So, I can’t see why this wont be autoloaded in production but will be in Dev.

I had a file name that had a lower case m and the class was M.


reason it worked on my DEV server is that it’s windows and that is not so picky about case.