Welcome Guest, Not a member yet? Register   Sign In
Urgent! Cannot inherit from undefined class
#11

[eluser]m4rw3r[/eluser]
I have no idea what is causing your problem. Sad
Ok, I have a very dirty solution: use require once in the beginning of all controllers extending MY_Controller. I do not recommend this, but if it's the only way, then you have to do it.
I'm too tired to try to recreate and debug the problem, so I hope that somebody can help you.

BTW, here is the code checking for your extended controller:
Code:
file_exists(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT)
Can you use that code in an include?
#12

[eluser]popovich[/eluser]
it works now. i have no idea what happened, but I admit that my htaccess had wrong RewriteBase rule. anyway, I have capitalized the file (MY_Controller.php) and triple checked everything again.
see wital.net, if you wonder.
#13

[eluser]m4rw3r[/eluser]
Like the design Tongue
Glad you fixed it Big Grin
#14

[eluser]popovich[/eluser]
gracias. Smile
I hope it gets even better with time.
#15

[eluser]LightAlloy[/eluser]
could you tell what exactly was wrong with your .htaccess
I have the same problem...
#16

[eluser]popovich[/eluser]
If you have the same problem, look at three things:
- check, whether your .htaccess has correct "RewriteBase /******/"
- see if your filename is capitalized correctly. In my case, I was doing the debuging wrong — making several changes in different places before uploading it to the server — so I don't know, if this was the reason the system was hanging. Anyway, the filename is now capitaliazed: MY_Controller.php
- make sure that the controller is inherting the class using the correct capitalization:
Code:
class Dispatcher extends MY_Controller { ...


I hope, it helps.
Good luck!
#17

[eluser]LightAlloy[/eluser]
heh
It was a some kind of silly error
I just changed MY_controller to MY_Controller & now it works
thanx)

Off top: by the way, aren't you Russian?Your nick seems like it is so)
#18

[eluser]popovich[/eluser]
see, this silly error made my hair grey on that evening...
off: belarus, if you wonder. Smile




Theme © iAndrew 2016 - Forum software by © MyBB