Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions Error
#1

[eluser]edwin87[/eluser]
Hello CI,

I can't get modular extensions (HMVC) to work in PHP version 4.3.9. Everytime i want to load an module from an module, i get an error.

In the controller there seems to be a error. It's strange because when i try it in my wamp with PHP 5 it works.

I've downloaded the PHP4 version from the WIKI.

Quote:Fatal error: Call to undefined function: _ci_load() in /****/httpdocs/ci/application/libraries/Controller.php on line 405)

This happens every time i want to load a view in the module that i load.

For example:
News module
Code:
<?php
class News extends Controller {

    function News ()
    {
        parent::Controller();    
        $this->load->model('main_model');
        $this->load->model('news_model');
        
        
    }
    
    
    function index()
    {
                $moduleData['testvar'] = 'This is a test';
        $data['var1'] = 'test1';
                $data['var2'] = 'test2';
                $data['testModule']= modules::run('test',$moduleData,'showit');
        
    $this->load->view('main',$data);    // Init layout
    
    }?>

Test module
Code:
<?php
class Test extends Controller {

    function Test()
    {
        parent::Controller();    
        $this->load->model('main_model');
        $this->load->model('test_model');
    
    }
    function index()
    {
                
    }
    
    function showit($data)
    {
        
    $this->load->view('test_page', $data)    // Init layout
    
    }?>

The news page is like this:

Code:
<h1>&lt;?php echo $var1 . $var2; ?&gt;</h1>
<p>&lt;?php echo $testModule;?&gt;</p>

The test page is like this:
Code:
&lt;?php echo $testvar;?&gt;

The page should return now:
Quote:test1test2
This is a test

Can somebody please help me?
I've searched the whole forum but can't find a similar problem or close to that.
#2

[eluser]umefarooq[/eluser]
simple solution is to try with library for php5 it will work ;-)

http://codeigniter.com/wiki/File:modular..._5140.zip/
#3

[eluser]edwin87[/eluser]
Thanks for your reply.

But i'm using PHP 4.3.9 and it is not an option to upgrade it to php 5. Because my host doesn't want to.

So i've to rewrite this library to php4?
#4

[eluser]edwin87[/eluser]
I've tried to rewrite it to PHP 4 but it is a hell of a job. Is there not a other solution for this problem?
#5

[eluser]edwin87[/eluser]
Please somebody?
#6

[eluser]edwin87[/eluser]
Buzz :red:
#7

[eluser]edwin87[/eluser]
Please, no one?




Theme © iAndrew 2016 - Forum software by © MyBB