Welcome Guest, Not a member yet? Register   Sign In
Optionsmodel, Loader with WAMP problem
#1

[eluser]Moddi[/eluser]
Hi

Im useing Wamp and i got everything to work correctly, but when i enter the site this error comes out

Fatal error: Class 'Optionsmodel' not found in C:\wamp\www\dack4_se\system\libraries\Loader.php on line 184

anyone know what the problem might be?
#2

[eluser]brianw1975[/eluser]
I distinctly notice the lack of a _ between Options and model
#3

[eluser]jedd[/eluser]
What's your model's filename?

Class name?

How are you loading it?

How are you calling it?
#4

[eluser]Moddi[/eluser]
Brianw1975, thats the code im getting on browser, its nothing i can do to change 'optionsmodel' to be 'options_model' or what did u mean?

Jedd

I haven't made the website so i dont know. But in /libraries/Loader.php , line 184 this is whats on that line:

$CI->$name = new $model();

And i just found a file named optionmodel.php inside system\application\models


Contains:

Code:
<?
    class Optionsmodel extends MY_Model{
        
        function Optionsmodel(){
            parent::MY_Model('options');  
        }
    }

?>
#5

[eluser]Moddi[/eluser]
wow a topic dies pretty fast in here :p
#6

[eluser]jedd[/eluser]
I think the confusion came from your self-contradictory assertion that:
Quote:Im useing Wamp and i got everything to work correctly, but when i enter the site this error comes out

And then you declined to answer my four questions that would have revealed a fair bit of insight, instead suggesting that you hadn't written any code yet - which just adds to the confusion.

It sounds like we're meant to debug something that doesn't exist.
#7

[eluser]Fabdrol[/eluser]
Thing is that the Loader class of CI (the logic that takes care of 'including' all logic you want to use. (controllers, libraries, views, models, etc)
can't find the class you're trying to load. So that would mean that either:
- the filename is different from the classname
- the file isn't found

Try to check for typos in the filename, or anywhere else.
Are u new to CI?

cheers,
#8

[eluser]Moddi[/eluser]
Well i gave u as much answers as i could, gave u optionmodel.php which i said is inside models folder, which should mean thats the filename, then i gave u the content inside that file aswell etc
#9

[eluser]Moddi[/eluser]
yes im new to CI, the company that i paid used it and i got into arguement with them cause they weren't doing what i wanted correctly etc.

But the thing is, with WAMP its not working but on web hosting server its working perfectly, see for urself

http://dack4.se

there u go thats the site.
#10

[eluser]jedd[/eluser]
[quote author="Moddi" date="1262665211"]
But the thing is, with WAMP its not working but on web hosting server its working perfectly, see for urself
[/quote]

Ahh. So it fits the category of 'works on one platform but not another' that's covered in the [url="/wiki/FAQ"]FAQ[/url] then.

There's a few answers and hints in response to this frequently asked question - you should probably go through them first, and get back to us with your discoveries.




Theme © iAndrew 2016 - Forum software by © MyBB