Welcome Guest, Not a member yet? Register   Sign In
A very strange occurance.
#1

I've been using codeignitor off and on since pre 1.5 days if I remember right. I occasionally use it to help write utilities on personal web servers for private use mostly. I've always loved it.

Anyway, I figured I'd give the pro's a crack at this head scratcher. As I'm sure someone will go, "well it'd probably help if you weren't doing x wrong", and make a right fool of myself. Now, keep in mind this is an older server which is why I haven't gone the route of wiping it and installing the latest slackware/LAMP.

I had written a pastebin clone application at one time for personal use on a private server some years ago, and had need of it again. I attempted to get the old code base to work again to no avail. Working backwards I'm down to a clean install of the same version of ci that it was written on(1.7.2). With this clean install, I've figured out the problem is coming from the controllers.

All controllers follow the same pattern, none will load the controllers default view unless it is the only function available to it.

For example:


PHP Code:
<?php

class Welcome extends Controller {

    function 
Welcome()
    {
        
parent::Controller();    
    }
    
    function 
index()
    {
        
$this->load->view('welcome_message');
    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */ 


Works, but:

PHP Code:
<?php

class Welcome extends Controller {

    function 
Welcome()
    {
        
parent::Controller();    
    }
    
    function 
index()
    {
        
$this->load->view('welcome_message');
    }

    function 
newfunction()
    {
        
$this->load->view('view1');
    }

    function 
newerfunction()
    {
        
$this->load->view('view2');
    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */ 
does not.

What happens is that upon http://server/cidir/controller/ it calls newfunction() and flatly refuses to call index(), nor can I call newerfunction() no matter how many crude hacks I try. Nor has anything of import changed on the old server since it's last update a couple of years ago.

I've gone through every conceivable idea I've been able to muster, and am looking longingly at the shotgun to put the old server out of my misery.

I have gone through everything from possible path issues, to aliens and have come up with nothing. I've never seen it behave this way.
Reply


Messages In This Thread
A very strange occurance. - by kenetiks - 11-11-2016, 11:45 PM
RE: A very strange occurance. - by Wouter60 - 11-12-2016, 01:53 AM
RE: A very strange occurance. - by Paradinight - 11-12-2016, 05:58 AM
RE: A very strange occurance. - by kenetiks - 11-12-2016, 06:47 AM
RE: A very strange occurance. - by kenetiks - 11-18-2016, 02:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB