• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MY_Model not found

#1
[eluser]jahsen[/eluser]
i moved my site from windows machine to cent os
and i have an error "Unable to locate the model you have specified: my_model"
MY_Model.php is in application/models, . i tried to put it in application/core but still the same..

#2
[eluser]marcogmonteiro[/eluser]
your my_model file should stay in your application/core folder. But that sounds to me like a case sensitive problem. Check the name of your files and all that to see if you didn't make any mistakes.

#3
[eluser]NeoArc[/eluser]
Name of your file: /core/MY_Model.php
Name of your class: MY_Model

#4
[eluser]jahsen[/eluser]
When i do this it is not working on both machines..
I get the same error.

#5
[eluser]NeoArc[/eluser]
Which version of CI are you using right now?

#6
[eluser]jahsen[/eluser]
2.1.1

#7
[eluser]jahsen[/eluser]
Found It!
I removed it from the autoload.php Smile

#8
[eluser]NeoArc[/eluser]
You are saying that you renamed your class from "my_model" to "MY_Model" and now it is not working, also, the file name stayed the same, is that so?

add a echo 'test'; before the class declaration to check the file is loaded.

edit:
Ok, nice.

#9
[eluser]jahsen[/eluser]
Everything was ok but was in the /models directory
and i removed it from the autoload

#10
[eluser]CroNiX[/eluser]
Whenever you extend CI with MY_, you still just load the original parent and CI will autoload MY_whatever if it exists.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.