CodeIgniter Forums
FireStick 1.1 (Performance logging add-on library) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: FireStick 1.1 (Performance logging add-on library) (/showthread.php?tid=11755)

Pages: 1 2 3


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-29-2008

[eluser]Adam Balachowski[/eluser]
Use CI library class: user_agent or the input class:

$this->CI->load->library('user_agent');

$this->CI->agent->referrer();
$this->CI->agent->agent_string();

$this->CI->input->server();
$this->CI->input->ip_address();

for example...


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-29-2008

[eluser]johnwbaxter[/eluser]
Hmm, good point well made.


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-29-2008

[eluser]johnwbaxter[/eluser]
Thinking about it, isn't the error there because there is no referer in this instance?


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-30-2008

[eluser]Dan Hulton[/eluser]
Huh. The @ before $_SERVER['HTTP_REFERER'] ought to suppress that notice. It does for me, and I run with all errors, warnings, and notices visible.

I'd like to repro and fix this error. Are you using any non-standard error settings than the default out-of-the-box CodeIgniter settings? A different error_reporting() level, or some changes to php.ini perhaps?


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-30-2008

[eluser]johnwbaxter[/eluser]
Ahhhhhhh yes. Now you mention it i do have the error reporting up particularly high. I'd forgotten about that.

Sorry!


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-30-2008

[eluser]Dan Hulton[/eluser]
That's quite alright! What setting do you use? I'd like to duplicate it and see if I can modify my code so it doesn't trigger even a notice. How useful can your log files be if they're cluttered up by silly little Notices from my library, anyway? =)


FireStick 1.1 (Performance logging add-on library) - El Forum - 09-30-2008

[eluser]johnwbaxter[/eluser]
php_flag display_errors on
php_flag error_reporting 7

The above is what i'm rocking at the moment. I really hope i can remember to switch it off when it goes live!


FireStick 1.1 (Performance logging add-on library) - El Forum - 10-13-2008

[eluser]Unknown[/eluser]
Maybe I am doing something wrong, but I cannot seem to get it to do anything and I have done everything in the installation information. No records are appearing in the DB and no errors coming up anywhere. Do I need to call it within my controller?

Thanks,
Patrick


FireStick 1.1 (Performance logging add-on library) - El Forum - 10-13-2008

[eluser]Dan Hulton[/eluser]
I had this problem at one point when I was integrating it into another of my projects, and I'd realized that I'd forgotten to enable hooks in config.php -- you may want to double-check that. While you're at it, you might want to check and ensure that the hooks are added correctly, too.

Aside from that, you've got a real head-scratcher there. Is the rest of your application displaying as normal, or do you get only a blank page? I find that if the error log directory or the cache directory aren't writable by the webserver, CI will just serve a blank page. Perhaps you're running across that?

Let me know if that resolves your issue, or if not, again get in touch with me and we can work together to get it running. =)


FireStick 1.1 (Performance logging add-on library) - El Forum - 01-28-2009

[eluser]bd3521[/eluser]
This is very cool. Is there anyway to enable it only when someone inserts or updates data?