Welcome Guest, Not a member yet? Register   Sign In
Controller logging multiple instances?
#1

[eluser]Dahak-II[/eluser]
I've seen this behavior in previous versions of CI, but it never bothered me until my recent attempts to debug my CI2.0 install.

I'm running a LAMP set up for 'production' and WAMP for developing.

In the dev system, if I clear the log file, load a controller, then check the log, I see one set of log entries.

On the LAMP box, I do the same and I'll see three or even four instances of log entries, often intermixed, for the one controller call.

I wrote the base code about 17 months ago, but I don't recall any need for any sort of redirects being incorporated.

Has anyone seen similar behavior? If so, do you know the cause?

The reason I ask is that I slapped in a logging function into the ROUTER core file so I can record the values of the uri->uri_string, uri->segments and uri->rsegments at various points in the ROUTER execution to try to hunt down my LAMP CI2.0 routing problem.

In an example I had last night, I ran into an instance where I got four sets of log entries on a single controller call and one of them had no set of uri values, causing the default controller to load... which was the end result of the page load.
#2

[eluser]n0xie[/eluser]
This is usually the case when you rewrite all your url's to go through index.php and you have missing files/pages (404's). Also when you don't have a favicon.ico or some other favicon.
#3

[eluser]Dahak-II[/eluser]
Quote:This is usually the case when you rewrite all your url’s to go through index.php and you have missing files/pages (404’s). Also when you don’t have a favicon.ico or some other favicon.

Thanks for the quick response.

When you say 'rewrite all your urls', do you mean with htaccess rewrite rules?

Full disclosure compels me to say that I am using htaccess to eliminate INDEX.PHP from the urls.

Or do you me some sort of redirect?

Not quite sure what you mean, sorry.

(I won't have my code in front of me until after work, it's my personal site.)

Neither the CI logs nor the Apache logs report any errors of that nature... the Apache error log file is empty.


As for the favicon, that strikes me as mighty odd... but, I do have a favicon file and it shows in the browser address bar.




Theme © iAndrew 2016 - Forum software by © MyBB