[eluser]tonanbarbarian[/eluser]
Ok I have just run across a similar problem to this and found a solution so I thought I would share with everyone.
Was continually getting the following error on PHP 4 but not PHP 5
Fatal error: Call to a member function on a non-object in F:\Websites\test.local\musicadium\controllers\admin\upcs.php on line 100
PHP Fatal error: Call to a member function on a non-object in F:\Websites\test.local\musicadium\controllers\admin\upcs.php on line 100
I setup a test server on IIS so that I could easily try different PHP versions and found that if using any version of PHP 5 it worked but all the versions of PHP 4 tested failed.
This lead me to think that it was either a referencing issues as others have thought, or some code that was actually PHP 5 specific was causing the problem
The first thing that caught my attention was that the line number being reported in the error should never have been called. This was trying to call the index() method of the controller yet the error was being reported in the next method called view()
So I stepped through the code and tried to find where the problem was. I tried to change the code to not use references and I finally traced the code to a call to
Spent an hour trying several things to work out exactly what was causing the problem when I finally started to look more at the fact that the error was in the controller::view() method.
Then it hit me....
I renamed the view() method to view2() and suddenly my error disappeared and everything (except for the links to the view() method) was working correctly.
All I can think that is happening is that PHP is getting confused with the referencing and rather than trying to call $this->load->view() somehow it is calling $this->view() which calls the view in the controller and that is causing the issue.
What I have got out of this is to be careful when creating controller methods that are the same name as other methods used by libraries such as Loader.
I have no idea if this will fix the problems listed here but my issue seemed at first glance to be the same as mentioned here.