needs_upgrade Posted March 8, 2010 Share Posted March 8, 2010 Hi guys. I've been using xampp (http://www.apachefriends.org/en/xampp-windows.html) for almost 2 years now and i didn't have any problem using it. My problem now is that my friend wants to use my code that runs fine with the xampp set up but when installed in wampp, it displays the lines below. The php files are placed inside "c:\wamp\www\myproj" folder. did i miss something? Here is the output showing my login.php file: 0) { $row = mysql_fetch_array($res); if ($row[1] == 3) { print_header(TITLE); show_login(); print " Access Denied. "; print_footer(); } else { // check if employee is logged in $sql2 = "SELECT activity, ip_address FROM users_online WHERE user_id='$row[0]'"; $res2 = mysql_query($sql2); // if employee is logged in already if (mysql_num_rows($res2) > 0) { $row2 = mysql_fetch_array($res2); $activity = $row2[0]; $ip_address = $row2[1]; // if last activity is greater than 60mins, let the user in. else, block the user if (time() > $activity + 1800) { // employee has not logged in yet. log him/her in $_SESSION['user_id'] = $row[0]; // update user in users online table $query2 = "UPDATE users_online SET activity = NOW() WHERE user_id='$_SESSION[user_id]' LIMIT 1"; // update employee's last logged in date and time $query3 = "UPDATE users SET last_login=now(), last_ip='{$_SERVER['REMOTE_ADDR']}' WHERE user_id='$_SESSION[user_id]' LIMIT 1"; if(@mysql_query($query2) && @mysql_query($query3)) { // redirect the user to ipharm add_sale page header('location: add_sale.php'); exit(); } } else { print_header(TITLE); show_login(); print " Possible hacking attempt!!! That user is currently LOGGED IN at $ip_address. You will not be allowed to log in. Sorry for the inconvenience. "; print_footer(); } // employee is not logged in yet } else { // employee has not logged in yet. log him/her in $_SESSION['user_id'] = $row[0]; // insert into users online table $query2 = "INSERT INTO users_online(user_id, session_id, activity, ip_address, user_agent) VALUES('$row[0]', '".session_id()."', ".time().", '{$_SERVER['REMOTE_ADDR']}', '{$_SERVER['HTTP_USER_AGENT']}')"; // update employee's last logged in date and time $query3 = "UPDATE users SET last_login=now(), last_ip='{$_SERVER['REMOTE_ADDR']}' WHERE user_id='$_SESSION[user_id]' LIMIT 1"; if(@mysql_query($query2) && @mysql_query($query3)) { // redirect the user to ipharm add_sale page header('location: add_sale.php'); exit(); } } mysql_free_result($res2); } } else { print_header(TITLE); show_login(); print " Username and Password do not match. "; print_footer(); } } else { print_header(TITLE); show_login(); print " Cannot process query. "; print_footer(); } mysql_free_result($res); } else { print_header(TITLE); show_login(); print " Please fill up both fields! "; print_footer(); } } else { print_header(TITLE); show_login(); print " You need to be logged in to access these pages. "; print_footer(); } } ?> Thanks so much guys. Quote Link to comment https://forums.phpfreaks.com/topic/194477-problem-with-wamp20i-installation/ Share on other sites More sharing options...
Mchl Posted March 8, 2010 Share Posted March 8, 2010 Apparently PHP interpreter is not running. Is WampServer icon in task bar all white, or is it red/yellow? Quote Link to comment https://forums.phpfreaks.com/topic/194477-problem-with-wamp20i-installation/#findComment-1022914 Share on other sites More sharing options...
needs_upgrade Posted March 8, 2010 Author Share Posted March 8, 2010 I have left clicked the wampServer icon once and selected "Restart all services". the icon turned all white but when i hover the mouse over it, it says wampserver offline. What seems to be the problem? do i need to reconfigure the php.ini file? Thanks Mchl Quote Link to comment https://forums.phpfreaks.com/topic/194477-problem-with-wamp20i-installation/#findComment-1022927 Share on other sites More sharing options...
Gighalen Posted March 25, 2010 Share Posted March 25, 2010 Have you checked the short_open_tag setting? Quote Link to comment https://forums.phpfreaks.com/topic/194477-problem-with-wamp20i-installation/#findComment-1031425 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.