Welcome Guest, Not a member yet? Register   Sign In
Modular Separation - PHP5 (Modules)

[eluser]wiredesignz[/eluser]
There is no MX_Session class. Use MY_Session. You only need to extend the files that are actually in the third_party/MX directory.

[eluser]Twisted1919[/eluser]
Thanks for your fast reply.
I did as you said and still no luck .
Take a look :
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
exit('aaaa'); // it doesn't die.
class MY_Session extends CI_Session{

    public function __construct()
    {
        parent::CI_Session();
    }
    
    /**
     * Update an existing session
     *
     * @access    public
     * @return    void
    */
    function sess_update()
    {
       // skip the session update if this is an AJAX call!
       if ( ! IS_AJAX )
       {
           parent::sess_update();
       }
    }

    public function test()
    {
    return 'axb';
    }

}
And controller :
Code:
<?php

class Welcome extends MY_Controller {

    function __construct()
    {
        parent::__construct();    
        $this->load->library('template');
        $this->load->library('session');
    }
    
    function index()
    {    
        $this->template->unset_partial(array('header','footer'))->set('pages_path','')->set('theme_path','')->set('layouts_path','')->set('layout','');
        echo $this->session->test(); // undefined method .
        //exit;
        $this->template->load('welcome_message');
        //$this->load->view('welcome_message');
    }
}
and i get same error, somehow the MY_Session library is not loaded.
any advice ?

[eluser]wiredesignz[/eluser]
MY_Session.php should be in application/libraries not application/core it is not a core class. RTFM

[eluser]Twisted1919[/eluser]
First time when i use 2.0 so that's why i didn't understand, i saw that the other files go to core folder that's why i added it there, thought is a change in 2.0 .
Also, your answer would be nicer without the RTFM part, it was a simple mistake, didn't kill anyone though Smile
Thanks for your time .

[eluser]wiredesignz[/eluser]
RTFM = Do some research yourself before you start asking questions buddy. It's not always our job to make your code work.

[eluser]Twisted1919[/eluser]
Yup, you were right, my bad, yesterday i was in a big rush .
Got it working with your advice.
This is a wonderful contribution to CI community, but you already know that,thanks for all your efforts you put into it .

[eluser]Abu eldahab[/eluser]
[quote author="wiredesignz" date="1283756279"]The wiki is horribly out of date and not recommended for installing version 5.3

If you are installing on CI 1.7 then the application/core classes should be relocated to application/libraries.

If you do not require HMVC functionality then remove the "require" from application/libraries/MY_Controller.php or delete the file entirely.[/quote]

i installed it using CI 2.0 latest one and Modular Extensions - HMVC version 5.3.4 with php version 5.3.3

and have the same error

Code:
Fatal error: Class 'MX_Config' not found in /trunk/application/third_party/MX/Base.php on line 74

when i test it local on php 5.3.0 every thing working fine

plz help

[eluser]Abu eldahab[/eluser]
i Upgraded my local PHP to 5.3.3 and after Upgrade same error came
Code:
Fatal error: Class 'MX_Config' not found in trunk\application\third_party\MX\Base.php on line 74

before it was PHP 5.3.0 no errors

[eluser]wiredesignz[/eluser]
Code:
HTTP_ACCEPT      text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT  Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 (.NET CLR 3.5.30729)
HTTP_CONNECTION  keep-alive
SERVER_PORT      80
SERVER_NAME      localhost
REMOTE_ADDR      127.0.0.1
SERVER_SOFTWARE  Apache/2.2.8 (Win32) PHP/5.3.3
HTTP_ACCEPT_LANGUAGE      en-us,en;q=0.5

No errors here, check your installation or code.

[eluser]Abu eldahab[/eluser]
[quote author="wiredesignz" date="1287288423"]
Code:
HTTP_ACCEPT      text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT  Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 (.NET CLR 3.5.30729)
HTTP_CONNECTION  keep-alive
SERVER_PORT      80
SERVER_NAME      localhost
REMOTE_ADDR      127.0.0.1
SERVER_SOFTWARE  Apache/2.2.8 (Win32) PHP/5.3.3
HTTP_ACCEPT_LANGUAGE      en-us,en;q=0.5

No errors here, check your installation or code.[/quote]

Latest CI 2.0

Local :

Code:
HTTP_ACCEPT     text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 AskTbPTV/3.9.1.14019 Firefox/3.6.10 GTB5
SERVER_PORT     80
SERVER_NAME    localhost
REMOTE_ADDR    127.0.0.1
SERVER_SOFTWARE    Apache/2.2.16 (Win32) DAV/2 mod_ssl/2.2.16 OpenSSL/0.9.8o PHP/5.3.3 mod_perl/2.0.4 Perl/v5.10.1
HTTP_ACCEPT_LANGUAGE     en-us,en;q=0.5
PHP Version 5.3.3

on Server

Code:
HTTP_ACCEPT     text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 AskTbPTV/3.9.1.14019 Firefox/3.6.10 GTB5
SERVER_PORT    80
SERVER_NAME     samafw.orood.com
REMOTE_ADDR     41.234.122.97
SERVER_SOFTWARE    Apache
HTTP_ACCEPT_LANGUAGE     en-us,en;q=0.5
PHP Version 5.3.3


After installing Modular Separation

Local & Server
error_reporting(E_ALL);

Code:
A PHP Error was encountered

Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: PEAR/Config.php

Line Number: 80
A PHP Error was encountered

Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: PEAR/Config.php

Line Number: 166
A PHP Error was encountered

Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: Config/Container.php

Line Number: 111

Fatal error: Class 'MX_Config' not found in trunk\application\third_party\MX\Base.php on line 74




Theme © iAndrew 2016 - Forum software by © MyBB