Welcome Guest, Not a member yet? Register   Sign In
White screen after class is known to work
#1

[eluser]morpheus316[/eluser]
Okay,

I have a class called Admin. It was working properly for the past week. Suddenly today when I try to access it, I get a blank screen and no error message in the logs stating what went wrong. Is there something I'm missing here?
#2

[eluser]Colin Williams[/eluser]
What about your server error logs? And is your error reporting set to E_ALL?
#3

[eluser]morpheus316[/eluser]
It was set to E_ALL&~E_NOTICE. When I switched it to E_ALL, I ended up with the following error message:
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Router.php

Line Number: 201
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Router.php

Line Number: 207
A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Router.php

Line Number: 210
#4

[eluser]Dam1an[/eluser]
I've received the 'Undefined offset' error in the past when I manually loaded the router class and something wasn't initiated correctly (I know, I was hacking the core but it was experimenting, gone back to a clean core now)

No idea why it would have happened for no reason to you
#5

[eluser]morpheus316[/eluser]
that was the reason for changing the error reporting -- and I got that on a clean install of CI. still doesn't solve the problem of a class just vaporizing like that.
#6

[eluser]Colin Williams[/eluser]
Can you not refer to lines 201 ~ 210 of Router.php and see how the breakdown occurred?
#7

[eluser]morpheus316[/eluser]
I did have a look and I can't see how the breakdown occurred. Regardless, I shouldn't have to fix Router.php as that file came with CI and it doesn't explain why the others work fine. Even with it set to E_ALL, the class I specified doesn't even load, much less error out.
#8

[eluser]drewbee[/eluser]
i always code with error reporting E_ALL set, and these are not issues for me. Have you altered the htaccess file? Custom routes? Your not helping us to much here buddy.
#9

[eluser]morpheus316[/eluser]
.htaccess is as follows:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

No custom routes. In response to Research assistant, my problem has nothing to do with Routes.php. the bottom line is that http://www.harvardbenefits.com/associate-access/admin was working properly before yesterday and it quit for no reason.
#10

[eluser]Colin Williams[/eluser]
Quote:and it quit for no reason.

And I guess that's your story until you figure out the reason, huh?

Quote:I shouldn’t have to fix Router.php as that file came with CI

I never suggested modifying the file, but you should be able to see how you caused it to break. What does your config/routes.php file look like?




Theme © iAndrew 2016 - Forum software by © MyBB