CodeIgniter Forums
CI causes Apache to drop an empty connection/response - 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: CI causes Apache to drop an empty connection/response (/showthread.php?tid=24169)

Pages: 1 2


CI causes Apache to drop an empty connection/response - El Forum - 11-02-2009

[eluser]Unknown[/eluser]
EDIT 2: False alarm, all that was needed was a recompile of PHP.
EDIT: found the Blank Page thread, didn't look close enough before posting, sorry about that, http://ellislab.com/forums/viewthread/84634/

I was running CI 1.7.2 on my local development platform (pre-installed apache that comes with Snow Leopard), no problems here.

Later I uploaded the project to a live server and changed the settings in the config files to match the database etc.

When I later accessed the site it wouldn't give me any response thru CI's index.php (not using any .htaccess/rewrite stuff). I created a phpinfo test page in the same directory and it worked fine.

I don't get any visible error, the apache error log doesn't give me anything useful either.

I started to track down where the problem starts;

/system/codeigniter/CodeIgniter.php around line 200, I found the following lines
Code:
// Mark a start point so we can benchmark the controller
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');

$CI = new $class();

If I put;
Code:
echo "test"; die;
On the line in the middle of $BM and $CI, I see the "test" output when accessing the site, although if I put it after the line with the $CI variable, it will load for a couple of seconds and then send me an empty response.

Anyone have a clue of what it could be?


CI causes Apache to drop an empty connection/response - El Forum - 12-07-2009

[eluser]graf[/eluser]
Did you ever find out what was the problem?
We are hosting with media temple.... as of this morning about 11am the site wont load.. no code changes or anything...

After calling media temple and they explain how it was my code i started digging into the code of codeigniter only to find my issue is similar to this issue.

Line 198 of index.php
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');
$CI = new $class();

if i put a die('made it'); in between those lines it outputs fine.... it seems to be that the $CI = new $class(); is whats hanging up the site all of a sudden.

We've had NO code change... what could be the issue? Media Temple always blams it on the code, even when 2 days later they come out and say MySQL had been erroring due to blah blah.... i dont need excuses/possiblities... i need a solution.. the site is down!

Any advice?


CI causes Apache to drop an empty connection/response - El Forum - 12-07-2009

[eluser]Unknown[/eluser]
The solution for me was to get PHP/Apache recompiled.

Do you know if media temple had any maintenance lately?

Did it work earlier? If so, probably something happened over at media temple.

The reason I had to get PHP recompiled was because we upgraded from MySQL 4 to version 5. So when I was trying to connect to the DB it failed somewhere in the CI code. And it turned out it was something wrong with PHP, and it needed to be recompiled.

Try disabling/putting false values in your DB config and see if that makes the site load/throw a different error/give a clue what the problem could be.


CI causes Apache to drop an empty connection/response - El Forum - 09-03-2010

[eluser]Unknown[/eluser]
Hi all,

I am experiencing this same situation.

the site works fine on the current environment: (Unbuntu PHP5 Apache 2)

After I copy the web site over to the new environment (RHEL 5 php5 httpd)
The site reads index.php which then launches CodeIgniter.php.
The php file works until the line:

$CI = new class(); // this is about at line 200 syntax is exactly the same as the initial post.

At which point the web browser is White. no errors, no logs. I can force erros to both the screen and log files.

I hope someone has point me in th right direction.


CI causes Apache to drop an empty connection/response - El Forum - 11-05-2010

[eluser]Unknown[/eluser]
st0ut, here you problem:
this line must be $CI = new $class(), not $CI = new class(). It's the refference to requested controller.


CI causes Apache to drop an empty connection/response - El Forum - 11-05-2010

[eluser]InsiteFX[/eluser]
Or $CI =& get_instance();

InsiteFX


CI causes Apache to drop an empty connection/response - El Forum - 05-06-2011

[eluser]TheoR74[/eluser]
I am having the exact same problem.

in this section of code in CodeIgniter.php:

Code:
// Mark a start point so we can benchmark the controller
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');
echo "ci test 1";
$CI = new $class();
echo "ci test 2";

With the echo statements in place, I get the first echo, but not the second.
What can I do to fix this?

This is in version 1.7.2


CI causes Apache to drop an empty connection/response - El Forum - 05-06-2011

[eluser]InsiteFX[/eluser]
CodeIgniter User Guide - Benchmarking Class

CodeIgniter User Guide - Profiling Your Application

InsiteFX


CI causes Apache to drop an empty connection/response - El Forum - 05-06-2011

[eluser]TheoR74[/eluser]
You'll have to forgive me. Chalk it up to me being stupid, but I don't understand your post.

Why is it stopping on the $CI= new $class(); line? What do I need to do to correct it?


CI causes Apache to drop an empty connection/response - El Forum - 05-06-2011

[eluser]InsiteFX[/eluser]
Make sure your sever is running PHP 5!

InsiteFX