Hi Everyone, This might not be cake related. But I am unable to pinpoint actually where and what caused this, could be the session, could be the redirect() in controller. It will help a great deal if someone can shed some light on why this is happening or share the solution if you encountered the same thing. Thanks a billion!! =)
Here's the scenario: Apache server process dies and restarts when using controller- >redirect to direct users to the login page when they are accessing protected content without logging in. In the browser, I see connection reset error message. I do not know if this is caused by htaccess or by my modifying of the SESSION handling way. I changed CAKE_SESSION_SAVE from cake to my_session. my_session.php code: <?php if (function_exists('ini_set')) { ini_set('session.use_trans_sid', 0); ini_set('session.name', CAKE_SESSION_COOKIE); ini_set('session.cookie_lifetime', $this->cookieLifeTime); ini_set('session.cookie_path', '/'); } ?> My application is made up of 2 parts. The CMS/signup component is using the Cake framework. The content is protected by a simple php script that checks that the SESSION contains a variable call 'role'. Since the content has to be accessing by the simple non cake php script, I changed CAKE_SESSION_COOKIE to 'PHPSESSID' and also ini_set('session.cookie_path', '/'); the path of the cookie is at the root so that the cookie is readable in the cake application as well as php scripts in the root. In my htaccess I added some hack to the original htaccess file that comes with the cake package. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} -f RewriteRule (.*) $1 [L] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] AddType application/x-httpd-php .htm .html </IfModule> When I access the CMS/signup app(Cake framework totally) and navigate around the app only, everything is fine. I logout from the CMS/signup app and try to access the protected pages, Apache process start and restart (See error message below). I got a connection reset message in my browser and was unable to load login page at all. The server dies again when I try to load the login page subsequently. What code do you set in the controller->redirect function? This crashing of apache process did not happen right at the start. It happen most frequently when I logout of my Cake application and then accessing the protected content. Therefore I feel that it is the session handling that is wreaking havoc here. Has anyone came across the same thing? I look that the headers sent to the browser but nothing is amissed.. because since Apache dies, it wouldn't be sending HTTP 200 OK headers to the browser. That's normal rite? Another culprit might be the htaccess. I am not good at htaccess rules. I copied those lines from the web. Therefore I can't be sure that it is not the htaccess. This is my pc configuration Winxp, Apache 2.2.4, PHP/5.2.1, Cake 1.2 (latest release) Error encountered: In Apache's error.log Parent: child process exited with status 3221225477 -- Restarting. Apache/2.2.4 (Win32) PHP/5.2.1 configured -- resuming normal operations Server built: Jan 9 2007 23:17:20 Parent: Created child process 3668 Child 3668: Child process is running Child 3668: Acquired the start mutex. Child 3668: Starting 250 worker threads. Child 3668: Starting thread to listen on port 80. In Browser (Firefox2) Connection Reset Hope someone will come by and point me in the rite direction. Thanks in advance! AL --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---