Welcome Guest, Not a member yet? Register   Sign In
Help with module loading under Php4.
#1

[eluser]Monotoba[/eluser]
Hi,

I've been using CI for a few months now and I have loved every minute of it. I just started using version 1.5.4 (was using 1.5.3) and I now have a problem with a module. The module gets loaded but any attempt to access module class members results in a "call member function on a non-object" error. The funny thing is that the error does not occur under php5 only on php4. The module uses the ci db class, active record class, and a couple of php functions ucfirst, and strtolower. I have checked the Php docs on Php.net to insure the php functions are all php4 compliant. I use wamp for development and switching to php5 causes the module to load and function correctly. Switching to php4 causes the error.

I have tried loading modules in various orders but nothing solved the issue. I am loading ci libnraries, then ci helpers, them my module. This is what I usually do. I have even re-installed ci...

Any ideas on what might cuase this?
#2

[eluser]gtech[/eluser]
does your code contain any of the php4 reserved words, like view for example?
there is a list of php4 reserved words on the controllers documentation page in the CI docs.
#3

[eluser]Monotoba[/eluser]
Hi thanks for the quick response. I am using the terms 'amodel', 'auto_model', and 'amodel_id' in my model class as the class is used for searching an automotive parts db. Can this be the issue. I understand that php4 does not have good support for namespace however, I expected that these terms for variables would be ok?..

I do also use the term 'model' in db queries and quoted strings. Could this be the issue?

Thanks for your help.
#4

[eluser]gtech[/eluser]
not sure, I havn't used php4... another issue I found searching through the forums 'php4 error', is you cannot do object iterations.

[url="http://ellislab.com/forums/viewthread/65074/"](see bottom of this thread)[/url]
#5

[eluser]Monotoba[/eluser]
Changing all my quoted string and commented 'model' to 'amodel' and 'AutoModel' solved the issue...

Thanks for the heads up!




Theme © iAndrew 2016 - Forum software by © MyBB