[PHP] FW: Help with PHP 5 - code not working since upgrade
_ From: Bobbie Atristain [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:27 PM To: '[EMAIL PROTECTED]' 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 tdfont color=blue face=Arial,Helvetica,Geneva,Swiss,SunSans-RegularbYour browser version is lower than 4.0.This application works best with 4.0 or higher versions of/td /tr tr align=center tda 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/abr /tr tr align=center tdfont color=blue face=Arial,Helvetica,Geneva,Swiss,SunSans-RegularbPlease download a browser of your choice./tdbr /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;
Re: [PHP] FW: 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(); I didn't have to look much further than this. You have a class that was designed in PHP3 and suddenly you're wondering why it work in PHP5? The OO model in PHP has been vastly revamped. It's closer to what OO is suppose to be. So my guess is that all your classes are now invalid. You'll have to re-write your classes most likely. -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FW: Help with PHP 5 - code not working since upgrade
On Tue, 17 Aug 2004 12:40:00 -0700 (PDT), in php.general you wrote: I didn't have to look much further than this. You have a class that was designed in PHP3 and suddenly you're wondering why it work in PHP5? Actually, I too would wonder why it worked :) -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] FW: Help with PHP 5 - code not working since upgrade
Okay - I apologize but I'm a systems admin - not a programmer - would I even need those classes now? -Original Message- From: Matthew Sims [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:40 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] FW: 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(); I didn't have to look much further than this. You have a class that was designed in PHP3 and suddenly you're wondering why it work in PHP5? The OO model in PHP has been vastly revamped. It's closer to what OO is suppose to be. So my guess is that all your classes are now invalid. You'll have to re-write your classes most likely. You should always reply back to the list to maintain this thread for future reference by others. You asked if you need this class? I would say hell yeah, it's included in the code: include_once(client_detector_class.php); Your include statement grabs the class code followed by the next line that makes a call to that class: $is = new sniffer(); I'm assuming Class sniffer is defined in client_detector_class.php. Since you're not a programmer like you said, maybe downgrading to PHP4 would fix the problem. Off topic, you're a sys admin just like me. Learning how to script will increase your status as a Superstar Admin farther than you can ever imagine. You don't have to be a programmer to learn PHP or perl or ksh or whatever. :) -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] FW: Help with PHP 5 - code not working since upgrade
Thanks for the info Matt - recommend any good websites for learning to script??? Cheerios, Bobbie For PHP, there's no beating php.net. Probably one of the best sites for learning. I'm sure someone else can list other sites to help but I've always used php.net and Google Groups for anything php relatedoh, uh, yeah...and this mailing list, too, I guess. ;) But if you've never scripted before, starting off with Korn is a great beginners language and is considered highly required for Unix/Linux admins. In fact, you NEED to know Bourne/Korn. http://www.amazon.com/exec/obidos/ASIN/0596001959/bigwebmasters-20/102-0343618-2348914 Start a collection of O'Reilly books. They're considered trophy's to display at your work...though you actually have to read them and not simply stack them up. Once you get the hang of the basics, all languages will be a cinch to learn. They're all the same, just different syntax. -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php