OldManRiver Posted November 6, 2008 Share Posted November 6, 2008 All, The company has web site on RH ES4 with PHP4. I installed WAMP on my WinXP Pro desktop to do development, which has PHP5. I'm new to the OOP side of PHP and company web site is mostly OOP. Classes seem to be properly declared but when running code the "getVar" function within the "customer" class, always errors. It seems it is only this function that errors, it works on the web server side, but not on the WAMP localhost, so thinking has to be a config issue or variant issue between 4 & 5. Does anyone know what I'm up against? OMR Link to comment https://forums.phpfreaks.com/topic/131701-oop-4-vs-5/ Share on other sites More sharing options...
corbin Posted November 6, 2008 Share Posted November 6, 2008 What is the error? Also, if you're developing with PHP4 as your target, you should just use PHP4 so as to not accidentally use a PHP5 OOP feature. Link to comment https://forums.phpfreaks.com/topic/131701-oop-4-vs-5/#findComment-684126 Share on other sites More sharing options...
trq Posted November 7, 2008 Share Posted November 7, 2008 It would also help if you actually posted this getVar() function. Link to comment https://forums.phpfreaks.com/topic/131701-oop-4-vs-5/#findComment-684226 Share on other sites More sharing options...
ionik Posted November 7, 2008 Share Posted November 7, 2008 All, The company has web site on RH ES4 with PHP4. I installed WAMP on my WinXP Pro desktop to do development, which has PHP5. I'm new to the OOP side of PHP and company web site is mostly OOP. Classes seem to be properly declared but when running code the "getVar" function within the "customer" class, always errors. It seems it is only this function that errors, it works on the web server side, but not on the WAMP localhost, so thinking has to be a config issue or variant issue between 4 & 5. Does anyone know what I'm up against? OMR How is the class structure? Is the class structured and setup to run on PHP 4 and 5? If the getVar method isn't throwing a error on the server which is running PHP 4 and your localhost is running 5 then it is most likely a config issue within PHP.....as PHP4 classes should run on 5 without a problem. Link to comment https://forums.phpfreaks.com/topic/131701-oop-4-vs-5/#findComment-684549 Share on other sites More sharing options...
Mchl Posted November 7, 2008 Share Posted November 7, 2008 This cause might be something else than difference in object model between PHP4 and PHP5. More things have changed between 4 and 5. One of common reasons of errors is disabled register_globals. There are several PHP4 add-ons for WampServerp. You might want to download one that is close enough to the production server, and use it for development/testing/debugging... Link to comment https://forums.phpfreaks.com/topic/131701-oop-4-vs-5/#findComment-684557 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.