Welcome Guest, Not a member yet? Register   Sign In
module_model() is not a function
#1

[eluser]medium_kreation[/eluser]
HI, all is working fine at my local server but when i but the site live it gives the below error..

Code:
Fatal error: Call to undefined function: module_model()



My local server is Windows/Apache/PHP 5.2 /Mysql 5
& my online server is Linux/Apache/PHP 4.4 /MYSQL 5

plz help i don't know what's wrong..
#2

[eluser]xwero[/eluser]
Which is the code that produces this error?
#3

[eluser]medium_kreation[/eluser]
its the default controller that load when you access the domain url
Code:
<?php

class Site extends Controller {

    function Site()
    {
        parent::Controller();
        
        #load modules
        $this->load->module_model('news','news_model', 'news');
#4

[eluser]xwero[/eluser]
There is no load->module_model method AFAIK so you developed that method yourself or you have it from a third party library, right?

Why you need to have as the first and third parameter news?
#5

[eluser]_asdf[/eluser]
Is that part of HMVC or something? load->module_model certainly isn't part of 1.6.1.

More details might help (although the error points you in the right direction: that function isn't declared.)
#6

[eluser]medium_kreation[/eluser]
I am using Matchbox,

and it is working fine on my development PC but not at the live server..
i have copied the whole directory from development to production.

plz suggest ..
#7

[eluser]xwero[/eluser]
check if the application/libraries/MY_Loader.php file has the module_model method. If not it should be added.
#8

[eluser]medium_kreation[/eluser]
yes it has the function module_model()
#9

[eluser]xwero[/eluser]
Then i have no idea what could cause the problem. I be honest i don't use matchbox myself.
Maybe you could add Matchbox problem to the starter thread of the topic so you can attract attention form the people who do use matchbox.
#10

[eluser]zdknudsen[/eluser]
Basicly, you are using an old version of Matchbox which used MY_Loader.php (as opposed to Loader.php in the current version). CodeIgniter doesn't (and the devteam apparantly refuses to add) support extending the Loader class, which is why a hotfix file was included in previous versions. Either find that file, or upgrade Matchbox.




Theme © iAndrew 2016 - Forum software by © MyBB