CI Hangs |
[eluser]tulipneo[/eluser]
Hi list, I m new to CI. I dont know if its right place to post this. I just started to use CI. When i try to play a demo file my browser hangs indefinitely. when i tried to debug i found that $CI = new $class(); from codeigniter.php causes the problem. can some one help. i m using PHP 5.3.3. SQL 5.1 Apache/2.2.16 I trieed in all possible ways but could not resolve. can some one help me pls. Br Tulip
[eluser]tulipneo[/eluser]
The lines of code is as follows: // Mark a start point so we can benchmark the controller $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); echo $class; echo $method; exit; $CI = new $class(); if i exit before $CI = new $class(); than my browser does not hangs and prints class and method. if i place echo and exit after new $class() nothing happnes and browser hangs. some one psl help me. Br Tulip
[eluser]WanWizard[/eluser]
What is your definition of 'hanging'? A webbased application is stateless, so a browser can't 'hang' (at least not in combination with CI, which is server side code). Start by describing what exactly happens.
[eluser]tulipneo[/eluser]
hi thanks for reply. it hangs in the sense that the following code loops in to indefinite loop. $CI = new $class(); inside codeigniter.php . i can argue about the same since i tried to debug by giving echo and exit and the conclusion was that control is never transferred to next statement of $CI = new $class(); codeigniter.php.i know kits silly but i m unable to solve. br tulip
[eluser]WanWizard[/eluser]
If it's really looping, the process will eventually timeout (the default in php.ini is 30 seconds), with a warning. This is a standard CI, downloaded? Or does it already contain an application? Did you enable CI logging (application/config/config.php, set log_threshold to 4), and did you check the logfile produced? Any error messages in your apache logs?
[eluser]tulipneo[/eluser]
Hi Wan, thanks for the reply. I have downloaded 1.7.2 from the link http://codeigniter.com/download.php. Logs for CI with log_threshold set to 4 gives following: DEBUG - 2010-09-18 11:20:03 --> Config Class Initialized DEBUG - 2010-09-18 11:20:03 --> Hooks Class Initialized DEBUG - 2010-09-18 11:20:03 --> URI Class Initialized DEBUG - 2010-09-18 11:20:03 --> No URI present. Default controller set. DEBUG - 2010-09-18 11:20:03 --> Router Class Initialized DEBUG - 2010-09-18 11:20:03 --> Output Class Initialized DEBUG - 2010-09-18 11:20:03 --> Input Class Initialized DEBUG - 2010-09-18 11:20:03 --> Global POST and COOKIE data sanitized DEBUG - 2010-09-18 11:20:03 --> Language Class Initialized DEBUG - 2010-09-18 11:20:03 --> Loader Class Initialized DEBUG - 2010-09-18 11:20:03 --> Database Driver Class Initialized Apache logs does not have any error. i m just starting to learn example helloworld. Just debuging withe cho statement helped me to conclude that this line of code ($CI = new $class() in codeigniter.php is never completed.i say it loops.may be other term is appropriate. Br Tulip
[eluser]WanWizard[/eluser]
The code downloaded doesn't have the database library enabled. My suggestion is that you have a problem in your database configuration. CI is trying to connect to your database server on a non-responsive hostname and/or port, which means the connect() hangs on the TCP timeout of that connection attempt.
[eluser]tulipneo[/eluser]
Hi Thanks a lot. The problem was data CI can not connect to localhost but can connect to 127.0.0.1. Replacing local host with 127.0.0.1 in config\database.php dod work. Suggestions :if we have such cases than atleast the app should print a message so that user can know. BTW it was nice that u could know the reason.Its really suprising for me to know if u can share the way u concluded its DB problem. Br Tulip |
Welcome Guest, Not a member yet? Register Sign In |