I occasionally got a problem, which lets the webbrowser display the message "Zero sized reply" (Firefox). Chrome displays "ERR_EMPTY_RESPONSE". I am using CodeIgniter (still a version 2.xx).
On the call, I validate some post variables, insert a database record, and send an email. The email method however loads a language file for a log message. On the end of this call, in the class system/core/Lang.php, the file gets included and a class array is extended.
The following line (Lang.php, line 126), executes the following statement:
$this->is_loaded[] = $langfile;
The array is initialized and this usually functions just fine. But in this special case, this is the exact line which leads the PHP server to crash (my explanation for the empty response I get).
I am running now forced PHP 5.5.19, but the error also displays with 5.2.17.
Anyone an explanation why this happens? If I try to reproduce the error by assigning a variable in a similar way, I never recieve the same message. Also, the only similarity in cases I recieve this error is that I've sent a mail before.
Update: Here's the PHP_INFO: http://awesumgrades.ch/phpinfo.php
Update 2: Here's what I tried exactly:
I tried to dump everything before that line:
var_dump($this->is_loaded);
var_dump($langfile);
exit("I reached here");
$this->is_loaded[] = $langfile;
Recieving this output:
array(0) { } string(14) "email_lang.php" I reached here
Now when I execute this (put the array assignment in front):
$this->is_loaded[] = $langfile;
var_dump($this->is_loaded);
var_dump($langfile);
exit("I reached here");
I get an ERR_EMPTY_RESPONSE (chrome).
When I dump $this, this is the object:
object(CI_Lang)#11 (2) { ["language"]=> array(0) { } ["is_loaded"]=> array(0) { } }
When I go a step back to the calling function, I got the following lines (at core/libraries/Email.php):
protected function _set_error_message($msg, $val = '')
{
$CI =& get_instance()
$CI->lang->load('email'); // <-- this is the call which gets to the other method
I put the following lines in front of the email loader:
$CI =& get_instance();
var_dump($this);
var_dump($CI);
exit();
$CI->lang->load('email');
This outputs the whole object, which I cannot post here because of security reasons of my site. If you need a specific property or a part of the object, I'll provide here.
I'm currently still waiting for the Apache Log from my hoster, if it's here I'll post it.
0 comments:
Post a Comment