App:Uses does not work on the server

Asked

Viewed 122 times

1

I created a class in the Lib folder of with some functions. Testing locally, and adding to controller

App::uses('readMessages', 'Utility'); 

Everything works properly, but when I upload to the real server, it says it does not find the class readMessages.

Does anyone know how to get around this? Is there a configuration file I need to modify?

Locally my server is and online my server is

  • Is there any difference between your local server and the published one? This seems to be a common error between servers [tag:windows] and [tag:linux]

  • yes, locally using windows, the server is linux...

  • What is the file name? Exactly how it is written?

  • Folder: lib/Cake/Utility/Readmessages.php

1 answer

2


and have a basic difference for file nomenclature, Windows is not Case Sensitive and Linux yes where according to

Case sensitive is an English language term that means size sensitive, or case sensitive, it is used to indicate that there are differences between high-case and normal-case letters. Methods and command in a program or compiler, distinguishes between font sizes.

Thus the considers two candidates appointedteste.php and Teste.php as files of the same name, which does not happen in .

To the class APP of the first parameter refers to the name of the file that will be imported, so I always recommend to use the name of the file as it is allocated in your folder, which in case would be

App::uses('ReadMessages', 'Utility'); 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.