FW: Help with PHP 5 - code not working since upgrade

From: Date: Tue, 17 Aug 2004 19:28:50 +0000
Subject: FW: Help with PHP 5 - code not working since upgrade
Groups: php.general 
Request: Send a blank email to php-general+get-194078@lists.php.net to get a copy of this message
_____ From: Bobbie Atristain [mailto:batris@lumberliquidators.com] Sent: Tuesday, August 17, 2004 3:27 PM To: 'php-general-help@lists.php.net' Subject: Help with PHP 5 - code not working since upgrade Greetings, I've had to move an application from a Rehat Linux 6 apache server running PHP 3.x to a MAC OS X apache 1.3 running PHP 5 and the code listed below bombs out..i have commented it out for now and it works but the code listed below doesn't work on the new server - do any of you see an obvious reason this wouldn't work with PHP 5 ????? <?php session_start(); include_once("client_detector_class.php"); // to use current HTTP_USER_AGENT string $is = new sniffer(); if($is->IE4up || $is->NS4up) { } else { ?> <table border="0" align="center"> <tr> <td><font color="blue" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Your browser version is lower than 4.0.This application works best with 4.0 or higher versions of</td> </tr> <tr align="center"> <td><a href="#" onClick="window.open('http://www.microsoft.com/downloads/','plainwindow','to p=0,screenY=0,left=0,screenX=0,scrollbars');"><img src="./images/ie.gif" border="0" width="88" height="31"></a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="#" onClick="window.open('http://home.netscape.com/computing/download/index.html ','plainwindow','top=0,screenY=0,left=0,screenX=0,scrollbars');"><img src="./images/netscape.gif" border="0" width="88" height="31"></a><br> </tr> <tr align="center"> <td><font color="blue" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Please download a browser of your choice.</td><br> </tr> </table> <?php exit; } include_once("usr_class.php"); // was the submit button pressed? (false on first pass) if ( $submit ) { // Create a new user $userobj = new User(); //Check user status (active, inactive_share, inactive_noshare) if($userobj->check_user_status($userID) =='inactive_share' || $userobj->check_user_status($userID) =='inactive_noshare') { $error = "You do not have enough privileges to access the OLP-3 application. Please contact the systems administrator."; include('error.php'); exit; } // Attempt to login the user $userobj->logon( $userID, $password ); if ( $userobj->is_loggedOn() ) { // switch processing to app-specific login code switch ($user_role_type_name) { case 'teacher': { if ($userobj->is_new()) { include_once("preferences.php"); } else { include_once("week_view.php"); } break; } case 'principal': include_once("search_my.php"); break; case 'superintendent': include_once("report_sel_superintendent.php"); break; case 'commissioner': include_once("report_sel_commissioner.php"); break; case 'admin': switch ($user_role_level_name) { case 'school': include_once("admin_school_search.php"); break; case 'district': include_once("admin_district_search.php"); break; case 'state': include_once("admin_super_search.php"); break; } break; default: { $error = "Error: Your Profile has not been set up correctly,<br>"; $error .= "please contact your Administrator."; include_once("error.php"); // bail out so no further code is executed when we redirect exit; } } // bail out so no further code is executed exit; } else { $error = $userobj->getError(); include_once("error.php"); // bail out so no further code is executed when we redirect exit; } } if ( $error ) { echo $error; } ?> "Do not follow where the path may lead. Go instead where there is no path and leave a trail." --George Bernard Shaw

« previous php.general (#194078) next »