CodeIgniter Forums
CLI/cronjob, Sessions and Intranet - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CLI/cronjob, Sessions and Intranet (/showthread.php?tid=55136)



CLI/cronjob, Sessions and Intranet - El Forum - 10-11-2012

[eluser]Matalina[/eluser]
I am running a serveral cronjobs on our intranet. Before I upgraded to the current release of CI I was running error free.

Now I am getting:

Code:
<div>

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index: REMOTE_ADDR</p>
<p>Filename: core/Input.php</p>
<p>Line Number: 351</p>

</div><div>

<h4>A PHP Error was encountered</h4>

<p>Severity: Warning</p>
<p>Message:  Cannot modify header information - headers already sent by (output started at /usr/local/www/webdev/corp_intranet/system/core/Exceptions.php:185)</p>
<p>Filename: libraries/Session.php</p>
<p>Line Number: 675</p>

</div>

I know what the error means, and I can fix it myself, but I wanted to know if there is anyone else having this issue. It only happens when I run on the cli/cronjobs regular pages run fine.


CLI/cronjob, Sessions and Intranet - El Forum - 10-11-2012

[eluser]Aken[/eluser]
The input and session libraries have been updated regarding IPs and other minor bugs/security fixes. It likely has something to do with that, and with the REMOTE_ADDR item not being available in a CLI environment. Perhaps you could bring this up on Github.


CLI/cronjob, Sessions and Intranet - El Forum - 10-15-2012

[eluser]Matalina[/eluser]
Thanks I will put it on there.