<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: 352</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 d:\xampp\htdocs\projects\ci\system\core\Exceptions.php:186)</p>
<p>Filename: libraries/Session.php</p>
<p>Line Number: 689</p>
</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: 352</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 d:\xampp\htdocs\projects\ci\system\core\Exceptions.php:186)</p>
<p>Filename: libraries/Session.php</p>
<p>Line Number: 689</p>
</div>
Untuk mengatasi hal ini, caranya mudah sekali, cukup ganti $_SERVER['REMOTE_ADDR'] dengan $this->server('remote_addr') pada baris script 352 (sesuai pesan error yang muncul) file "Input.php" (lokasi file ada di path: /system/core/Input.php)
File Input.php baris 352 (sebelum dimodifikasi)
![](http://1.bp.blogspot.com/-hQpw1zgqSyM/VQPHFb_R1cI/AAAAAAAAE00/3PN984ESYzY/s1600/cli_error1_remote_addr.png)
File Input.php baris 352 (setelah dimodifikasi)
![](http://3.bp.blogspot.com/-4hn8TMUR_L4/VQPHFyDqNkI/AAAAAAAAE04/ySTiAVj2z8o/s1600/cli_error2_remote_addr.png)
Semoga bermanfaat. ;-)
No Comment to " PHP Error encountered when running Command Line using CodeIgniter 2.xx "
Post a Comment