bian101 Posted December 27, 2010 Share Posted December 27, 2010 Hey guys, I think this is a toughie! So a work mate sent me his portion of the code and runs fine on localhost until i hit the "login" button. Now... this is odd because the code is fine but apache crashes and i get the whole windows "apache has crashed click here to send an error report". Then i restart WAMP and no luck i always get the 101 server error so i have to totally reinstall WAMP. This is the error log upon crash: [Mon Dec 27 18:36:24 2010] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico [Mon Dec 27 18:36:45 2010] [notice] Parent: child process exited with status 255 -- Restarting. [Mon Dec 27 18:36:45 2010] [notice] Apache/2.2.11 (Win32) PHP/5.2.11 configured -- resuming normal operations [Mon Dec 27 18:36:45 2010] [notice] Server built: Dec 10 2008 00:10:06 [Mon Dec 27 18:36:45 2010] [notice] Parent: Created child process 6504 [Mon Dec 27 18:36:45 2010] [notice] Child 6504: Child process is running [Mon Dec 27 18:36:45 2010] [notice] Child 6504: Acquired the start mutex. [Mon Dec 27 18:36:45 2010] [notice] Child 6504: Starting 64 worker threads. [Mon Dec 27 18:36:45 2010] [notice] Child 6504: Starting thread to listen on port 80. [Mon Dec 27 18:36:45 2010] [notice] Parent: child process exited with status 3221225725 -- Restarting. [Mon Dec 27 18:36:45 2010] [notice] Apache/2.2.11 (Win32) PHP/5.2.11 configured -- resuming normal operations [Mon Dec 27 18:36:45 2010] [notice] Server built: Dec 10 2008 00:10:06 [Mon Dec 27 18:36:45 2010] [notice] Parent: Created child process 1400 [Mon Dec 27 18:36:45 2010] [notice] Child 1400: Child process is running [Mon Dec 27 18:36:45 2010] [notice] Child 1400: Acquired the start mutex. [Mon Dec 27 18:36:45 2010] [notice] Child 1400: Starting 64 worker threads. [Mon Dec 27 18:36:45 2010] [notice] Child 1400: Starting thread to listen on port 80. Im running windows 7 32 bit Apache 2.2.11 PHP 5.2.11 (im not running the new one because some code crashes on it) The code for the page (if you wanted to know to save time is:) <?php require_once 'classes/login_idea.php'; class login extends module { public function __construct() { $this->idea = new login_idea(); $this->que_message("content", message("expected_footer","","a message example", array("name to display"=>"ian"))); } public function process_message($message) { if ($message['body']=='user login') { $u = isset($message['params']['username']) ? $message['params']['username'] : ""; $p = isset($message['params']['password']) ? $message['params']['password'] : ""; return array(reply($message, array('errors'=>$this->login_by_password($u,$p)), 'client')); } if ($message['body']=='user logout') { $this->logout(); return array(reply($message, array('success'=>true), 'client')); } if ($message['body']=="an example for ian") { return array( reply($message), message("to_some_module", "", "another example", array("some parameter"=>123, "another one"=>array(1,2,3))), message("", "login", "this one sends a message to all active modules") ); } return array(); } public function html() { return $this->generate_html(); } private function logout() { unset($_SESSION['user_id']); } private function login_by_password($usr, $pwd) { global $user; $user = $this->idea->fetch_user_by_login($usr, $pwd); $errors = ""; if ($user) $_SESSION['user_id'] = $user->id; else $errors = "Username and password did not match."; return $errors; } private function generate_html() { global $user; // template file $html = file_get_contents(dirname(__FILE__) . "/login.html"); if ($user->id) // logged in already { $html = preg_replace("~(<form.*?>)(.|\n|\r)*(</form>)~", "", $html); // remove the login form } else // needs to login? { $html = preg_replace("~<a.*?class=\"btn_logout\".*?/a>~","",$html); // remove the logout button } return $html; } } ?> Please help :S Kind Regards, Ian Quote Link to comment https://forums.phpfreaks.com/topic/222747-apache-crashing-under-unknown-instruction-please-help-windows-7/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.