Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - HMVC version 5.3

[eluser]Kijer[/eluser]
the example you show is the basic HMVC I think.

As I used the module folder "admin" and have "sub" modules ads, blog etc. .. containing each of the controllers with the same name in some cases, I have to make sub folders I think.

thx

[eluser]Johan André[/eluser]
Nope... Use routing instead... I don't think subfolders in modules are supported...

[eluser]Kijer[/eluser]
But unless trouble translating his message (I'm french I repeat), it seems possible, I just lack the rule in the routes that can run everything.

[quote author="wiredesignz" date="1290911842"]Sub-directories in modules function as they should.

Creating routes and understanding application structure are part of learning to use CodeIgniter properly. Good luck.[/quote]

[eluser]johlin[/eluser]
I installed this as per the instructions and the welcome controller works when in the modules subdirectory just as it should. However, I get the following error message when (auto)loading the database library;
Code:
Fatal error: Call to undefined function DB() in /Users/*snip*/application/third_party/MX/Loader.php on line 94

If I comment out the database function in the MX Loader.php so that codeigniter's own database loader is used everything seems to work fine (there is no error message and the session library, which is autoloaded and set to store sessions in the database, doesn't spit out an error message).

I've downloaded MX and Codeigniter from bitbucket so I think I'm using the latest version of both.

Has anyone else experienced this?

[eluser]InsiteFX[/eluser]
What version of PHP are you using?

InsiteFX

[eluser]johlin[/eluser]
5.3.3 built from macports.

I can confirm now that the database seems to work fine so it's not really a problem (sessions are stored properly and I can run queries). Oh, and datamapper overzealous edition even finds the models in the module directories. Magic!

[eluser]InsiteFX[/eluser]
There is a bug in MySQL for PHP 5.3.3

The FIX: application/config/database.php
Code:
// change this
$db['default']['hostname'] = 'localhost';

// to this
$db['default']['hostname'] = '127.0.0.1';

That should fix it for you.

InsiteFX

[eluser]johlin[/eluser]
That unfortunately made no difference Sad

['hostname'] = localhost works great if I use database() from CI_Loader as opposed to the one from MX_Loader, but I cannot for my life figure out why.

[eluser]InsiteFX[/eluser]
Then it has something to do with your code!

I run HMVC with CI 2.0 database with no problems.

Could be something with HMVC and Datamapper.

InsiteFX

[eluser]johlin[/eluser]
It's just that...there is no code. I just tried with a clean install of codeigniter from bitbucket, modular extensions from bitbucket, install of mx exactly as per the instructions. Welcome page shows as expected.

The I modified database.php, added database to autoload and then I got the same error message. No other extensions installed that can interfere.

Removing the database function in MX_Loader works great so it isn't really a problem though, but still strange.




Theme © iAndrew 2016 - Forum software by © MyBB