SlideShare a Scribd company logo
1 of 30
Download to read offline
Migration concepts for enterprise PHP applications
International PHP Conference 2008 – Spring Edition
Thorsten Rinne
Introduction

❙ Thorsten Rinne
❙ 31 years old
❙ Graduated in computer science
❙ Project manager at Mayflower GmbH, Munich
   ❙ Reporting applications
   ❙ Critical bank applications
   ❙ PHP Consulting
❙ PHP software development since 1999
❙ Founder and main developer of Open Source FAQ-
  management software phpMyFAQ since 2001
❙ Zend Certified Engineer (PHP 5)
                                                   „Migration concepts for enterprise
                                                   PHP applications“
                                                    © MAYFLOWER GmbH 2008 2
Summary

❙ Introduction
❙ Why upgrade?
❙ Process model
   ❙ MySQL upgrade process
   ❙ PHP upgrade process
❙ Migration
❙ Conclusion
❙ Questions and answers




                             „Migration concepts for enterprise
                             PHP applications“
                              © MAYFLOWER GmbH 2008 3
Introduction: Why upgrade?

❙ MySQL 4 support will end
   ❙ Active support already ended by the end of 2006
   ❙ Only extended support until 2008 for MySQL 4.0 and
     2009 for MySQL 4.1
   ❙ MySQL 5 has more and advanced features like stored
     procedures, trigger, better SQL support
❙ PHP 4 support will end
   ❙ PHP 4 is dead, dead, dead
   ❙ Only security relevant fixes until 2008-08-08
   ❙ PHP 5.2 is faster and more stable than every PHP 4
     version

                                                          „Migration concepts for enterprise
                                                          PHP applications“
                                                           © MAYFLOWER GmbH 2008 4
Introduction: Requirements

❙ No qualitative changes like new features
❙ No technical changes like
   ❙ new database layer
   ❙ new template engine
   ❙ Using new PHP 5 features
❙ No influences for productive services like
   ❙ External systems
   ❙ End user frontends
❙ Minimization of time and effort



                                               „Migration concepts for enterprise
                                               PHP applications“
                                                © MAYFLOWER GmbH 2008 5
Introduction: What is porting?
                                   Innovation potential
❙ Reasons
   ❙ Most simple form of
     migration




                                               ive
                                           sit
                                                                Rewrite
   ❙ Manageble risks




                                        po
   ❙ Small complexity because of
     the lack of qualitive and
                                               Reengineering
     technical changes




                                                                               e
                                                                            tiv
❙ Requirement




                                                                        ga
                                                                     ne
   ❙ Minor differences between
                                     Porting
     current and future
     application platform
                                                                                 complexity

                                                               „Migration concepts for enterprise
                                                               PHP applications“
                                                                © MAYFLOWER GmbH 2008 6
Process model

❙ Reducing of complexity with a planned procedure
❙ Coverage of the complete porting
❙ Methodical description of the process
❙ Tool support




                                                    „Migration concepts for enterprise
                                                    PHP applications“
                                                     © MAYFLOWER GmbH 2008 7
Process model: Preparations

❙ Targets
   ❙ Porting without any technical or qualitative changes
   ❙ Recovery of support (MySQL/PHP)
   ❙ Minimizing the interferences of services and reduction
     of change times
❙ Interferences
   ❙ Porting problems between MySQL and PHP versions
   ❙ Application complexity
   ❙ missing documentation and missing contact persons
   ❙ Communication between all team members


                                                              „Migration concepts for enterprise
                                                              PHP applications“
                                                               © MAYFLOWER GmbH 2008 8
Process modell: Upgrading MySQL

❙ Upgrade in two steps
   ❙ MySQL 4.0 to MySQL 4.1
   ❙ MySQL 4.1 to MySQL 5.0
❙ Why two steps?
   ❙ Big changes between 4.0 and 4.1
   ❙ Password changes
   ❙ Character sets
   ❙ Collations
   ❙ Many minor BC breaks




                                       „Migration concepts for enterprise
                                       PHP applications“
                                        © MAYFLOWER GmbH 2008 9
Upgrade path for MySQL

❙ First dump your current database, if it‘s InnoDB. If you use
  MyISAM, just backup everything.
❙ upgrade your development machine
❙ Reload your tables
❙ Test, test, test with MySQL 5.0
❙ Fix your queries and application if you have problems
❙ Use the STRICT MODE in MySQL 5.0
❙ Test, test, test with MySQL 5.0
❙ Upgrade your production machine
❙ Reload your production database


                                                                 „Migration concepts for enterprise
                                                                 PHP applications“
                                                                  © MAYFLOWER GmbH 2008 10
How to dump MySQL?

❙ Use the MySQL 4.1 mysqldump binary!
  shell> mysqldump –uroot -p
           –-database mydatabase
           --single-transaction
           --default-character-set=utf-8
           --disable-keys
           --extended-insert
           | bzip2 –c > backup.sql.bz2
  Warning: This can lock all tables!
❙ Fix the password column in the MySQL user table
  shell> mysql_fix_privilege_tables
            --password=root_password

                                                    „Migration concepts for enterprise
                                                    PHP applications“
                                                     © MAYFLOWER GmbH 2008 11
MySQL Pitfalls

❙ Rebuild your TIMESTAMPs, check this also in your application
❙ TIMESTAMP now has the format
  'YYYY-MM-DD HH:MM:SS'
❙ DECIMAL(14,2) in MySQL 4.0 is not the same as
  DECIMAL(14,2) in MySQL 4.1/5.0
   ❙ using DECIMAL(10,5): 100000 will be 99999.99999
   ❙ using DECIMAL(11,5): 100000 will be 100000.00000
❙ New reserved words
❙ SQL2003 standard for your SQL queries with natural JOINs
  and JOINs with USING may produce different results
❙ http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-
  4-1.html
                                                           „Migration concepts for enterprise
                                                           PHP applications“
                                                            © MAYFLOWER GmbH 2008 12
After MySQL upgrade

❙ Release the current combination
❙ PHP 4 / MySQL 5
❙ Why?
   ❙ You never find all problems during your tests
   ❙ PHP porting may took longer than the MySQL porting
   ❙ Increase your experience with MySQL 5
❙ Prepare the PHP 5 update




                                                          „Migration concepts for enterprise
                                                          PHP applications“
                                                           © MAYFLOWER GmbH 2008 13
Process model: Upgrading PHP

❙ Which PHP version?
   ❙ Latest PHP 5.2 release for production, if you build by
     yourself or current PHP 5.2 package from your
     Linux/Unix/*BSD/Solaris distribution
   ❙ Testing with PHP 5.3-dev if you have time and money
❙ Please don‘t use
   ❙ PHP 5.0.x
   ❙ PHP 5.1.x
   ❙ PHP 6.0.0-dev




                                                              „Migration concepts for enterprise
                                                              PHP applications“
                                                               © MAYFLOWER GmbH 2008 14
Upgrade path for PHP

❙ upgrade your development machine to latest PHP 5.2
  release
❙ Test, test, test
❙ Fix your code if you have problems
    ❙ register_globals = off
    ❙ error_reporting = E_ALL & E_STRICT
    ❙ display_errors = on
    ❙ log_errors = on
❙ Test, test, test
❙ Upgrade your production machine
❙ Release your ported application
                                                       „Migration concepts for enterprise
                                                       PHP applications“
                                                        © MAYFLOWER GmbH 2008 15
Migrate configuration files

❙ httpd.conf
   ❙ change this line:
     LoadModule php4_module php/sapi/php4apache2.dll
   ❙ with this one:
     LoadModule php5_module /php/php5apache2.dll
❙ php.ini
   ❙ You should use the php.ini-recommended file, but check, if
     you need magic quotes on…. Otherwise your application could
     be insecure!




                                                        „Migration concepts for enterprise
                                                        PHP applications“
                                                         © MAYFLOWER GmbH 2008 16
PHP 5 Pitfalls:
New reserved keyords

❙ abstract             ❙ public
❙ catch                ❙ throw
❙ clone                ❙ try
❙ extends              ❙ use
❙ final                ❙ namespace
❙ implements
❙ instanceof
❙ interface
❙ goto
❙ private
❙ protected
                                     „Migration concepts for enterprise
                                     PHP applications“
                                      © MAYFLOWER GmbH 2008 17
PHP 5 Pitfalls
Constructor / Destructor

❙ PHP 4
   ❙ construct method has the name of the class
   ❙ No destruct method
❙ PHP 5
   ❙ construct method: __construct()
      ❙ If not available, fallback to PHP4 handling
   ❙ destruct method: __destruct()
      ❙ Executed at the end of the request




                                                      „Migration concepts for enterprise
                                                      PHP applications“
                                                       © MAYFLOWER GmbH 2008 18
PHP 5 Pitfalls
Magic methods

❙ __autoload()
❙ __call(), __callStatic() (only PHP 5.3)
❙ __construct()
❙ __destruct()
❙ __get()
❙ __isset()
❙ __set()
❙ __set_state()
❙ __sleep()
❙ __toString()
❙ __unset()
❙ __wakeup()                                „Migration concepts for enterprise
                                            PHP applications“
                                             © MAYFLOWER GmbH 2008 19
PHP 5 Pitfalls

❙ get_class(), get_parent_class() and
  get_class_methods() now case-sensitive
❙ __CLASS__, __METHOD__, and __FUNCTION__ are also
  case-sensitive
❙ Objects are referenced by handle, and not by value
❙ Objects aren’t primitive types like in PHP 4
❙ If you need a copy of a object, use __clone()
❙ Re-declaration of $this isn’t allowed anymore
❙ === operator is more strict than it was in PHP 4
❙ __call()/__set()/__get() are different in PHP 4
❙ Don’t use zend.ze1.compatibility_mode!
❙ Use instanceof instead of is_a()                     „Migration concepts for enterprise
                                                       PHP applications“
                                                        © MAYFLOWER GmbH 2008 20
Migration strategies

❙ After the release of the PHP 5 ported application
  REFACTORING!
❙ Strategies for
   ❙ „Spaghetti code“
   ❙ Half procedural – half object-orientated
   ❙ PHP 4 OOP
❙ Please don‘t try a complete rewrite
   ❙ Too expensive
   ❙ Takes too long
   ❙ Joel on software: „Things You Should Never Do “


                                                       „Migration concepts for enterprise
                                                       PHP applications“
                                                        © MAYFLOWER GmbH 2008 21
Migration
„Spaghetti Code“

❙ Very old code, maybe developed in the last PHP 3 century
❙ No or just minor separation of code and layout
❙ No use of libraries like PEAR, Zend Framework or eZ
  components
❙ No documentation
❙ No tests




                                                             „Migration concepts for enterprise
                                                             PHP applications“
                                                              © MAYFLOWER GmbH 2008 22
Migration
„Spaghetti Code“: Strategy

❙ Identify recurring code parts and implement classes
❙ Use of standard libraries like Zend Framework, eZ
  components or PEAR
❙ Add inline documentation
❙ Fix your coding styles
❙ Add unittests for the new, refactored backend
❙ Add Selenium tests for the frontend




                                                        „Migration concepts for enterprise
                                                        PHP applications“
                                                         © MAYFLOWER GmbH 2008 23
Migration
„Half procedual – halb object-orientated“

❙ Code with differend quality
❙ Just a few documentation
❙ Maybe some tests
❙ „the typical current PHP 4 project“ ☺




                                            „Migration concepts for enterprise
                                            PHP applications“
                                             © MAYFLOWER GmbH 2008 24
Migration
„ Half procedual – halb object-orientated“: Strategy

❙ Add inline documentation for all classes and methods
❙ Improve the re-using of duplicate code
❙ Add unittests and Selenium tests
❙ Improve every code part with PHP 5 functions, for example
  using file_put_contents() instead of fopen(),
  fwrite(), and fclose().




                                                              „Migration concepts for enterprise
                                                              PHP applications“
                                                               © MAYFLOWER GmbH 2008 25
Migration
PHP 4 OOP

❙ Application was developed object-orientated in PHP 4
❙ Using of
   ❙ PHP 4 references
   ❙ Re-declaration of $this




                                                         „Migration concepts for enterprise
                                                         PHP applications“
                                                          © MAYFLOWER GmbH 2008 26
Migration
PHP 4 OOP: Strategy

❙ Maybe you‘re lucky and there are no problems. Maybe.
❙ If you see problems, they are fatal errors like
   ❙ Objects are referenced by value
   ❙ $foo =& new Foo();
❙ Solution:
   ❙ Implement unittests
   ❙ Use standard APIs
   ❙ Fix the PHP 5 problems




                                                         „Migration concepts for enterprise
                                                         PHP applications“
                                                          © MAYFLOWER GmbH 2008 27
Conclusion

❙ Migration is always possible
❙ Migration can be hard, but usually it isn‘t! ☺
❙ Don‘t shoot yourself in the foot with the migration
   ❙ First upgrade MySQL
   ❙ Then upgrade PHP and fix your application
   ❙ Then do the cleanup for a better future ☺
   ❙ Stay current in the future and do always small steps
   ❙ Keep PHP 5.3 and PHP 5.4 in mind!




                                                            „Migration concepts for enterprise
                                                            PHP applications“
                                                             © MAYFLOWER GmbH 2008 28
Questions and answers




                        „Migration concepts for enterprise
                        PHP applications“
                         © MAYFLOWER GmbH 2008 29
Thank you very much!

Thorsten Rinne, Dipl.-Inf. (FH)
Mayflower GmbH
Mannhardtstraße 6
D-80538 München
Germany
+49 (89) 24 20 54 – 31
thorsten.rinne@mayflower.de

More Related Content

Similar to Migration Concepts For Enterprise PHP Applications

Exploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMCExploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMCRSD
 
Quality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond UnittestsQuality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond UnittestsMayflower GmbH
 
Quality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdfQuality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdfguestf62d67
 
Avantage Enterprise Architecture
Avantage Enterprise ArchitectureAvantage Enterprise Architecture
Avantage Enterprise ArchitectureGeoffrey Long
 
VMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applicationsVMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applicationsVincent Kwon
 
Avantage BPM Key Features
Avantage BPM Key FeaturesAvantage BPM Key Features
Avantage BPM Key FeaturesGeoffrey Long
 
PHP in the Enterprise … connecting to SAP
PHP in the Enterprise … connecting to SAPPHP in the Enterprise … connecting to SAP
PHP in the Enterprise … connecting to SAPwebhostingguy
 
L'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in ActionL'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in ActionNetApp
 
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´EsteInnovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´EsteIoRobot
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
Emc solutions for sap_overview
Emc solutions for sap_overviewEmc solutions for sap_overview
Emc solutions for sap_overviewCenk Ersoy
 
Bugtracking 101 Macq Electronique 2010
Bugtracking 101  Macq Electronique 2010Bugtracking 101  Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010Michelangelo van Dam
 
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Ivo Jansch
 
Stateful SOAP Webservices
Stateful SOAP WebservicesStateful SOAP Webservices
Stateful SOAP WebservicesMayflower GmbH
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Ivo Jansch
 
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...Jonas Rosland
 
Linux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the ComputerLinux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the ComputerRobert Sutor
 
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5Zend Framework Getting Started For I5
Zend Framework Getting Started For I5ZendCon
 

Similar to Migration Concepts For Enterprise PHP Applications (20)

Exploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMCExploitez le meilleur de SAP avec EMC
Exploitez le meilleur de SAP avec EMC
 
Quality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond UnittestsQuality In PHP Projects Beyond Unittests
Quality In PHP Projects Beyond Unittests
 
Quality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdfQuality in PHP projects beyond Unittests.pdf
Quality in PHP projects beyond Unittests.pdf
 
Avantage Enterprise Architecture
Avantage Enterprise ArchitectureAvantage Enterprise Architecture
Avantage Enterprise Architecture
 
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
 
XS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM EnglishXS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM English
 
VMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applicationsVMware vSphere 4.0: The best platform for business applications
VMware vSphere 4.0: The best platform for business applications
 
Avantage BPM Key Features
Avantage BPM Key FeaturesAvantage BPM Key Features
Avantage BPM Key Features
 
PHP in the Enterprise … connecting to SAP
PHP in the Enterprise … connecting to SAPPHP in the Enterprise … connecting to SAP
PHP in the Enterprise … connecting to SAP
 
L'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in ActionL'Iperconvergenza 2.0: NetApp HCI in Action
L'Iperconvergenza 2.0: NetApp HCI in Action
 
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´EsteInnovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
Innovation and Change At the Speed of Your BusinessExecutive SummitVilla d´Este
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Emc solutions for sap_overview
Emc solutions for sap_overviewEmc solutions for sap_overview
Emc solutions for sap_overview
 
Bugtracking 101 Macq Electronique 2010
Bugtracking 101  Macq Electronique 2010Bugtracking 101  Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010
 
Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)Enterprise PHP (php|works 2008)
Enterprise PHP (php|works 2008)
 
Stateful SOAP Webservices
Stateful SOAP WebservicesStateful SOAP Webservices
Stateful SOAP Webservices
 
Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008Enterprise PHP Development - ZendCon 2008
Enterprise PHP Development - ZendCon 2008
 
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
DevOps at EMC NYC August 2015 - Modernize your apps to drive organizational e...
 
Linux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the ComputerLinux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the Computer
 
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
 

More from Mayflower GmbH

Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...Mayflower GmbH
 
JavaScript Days 2015: Security
JavaScript Days 2015: SecurityJavaScript Days 2015: Security
JavaScript Days 2015: SecurityMayflower GmbH
 
Vom Entwickler zur Führungskraft
Vom Entwickler zur FührungskraftVom Entwickler zur Führungskraft
Vom Entwickler zur FührungskraftMayflower GmbH
 
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientSalt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientMayflower GmbH
 
Plugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debuggingPlugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debuggingMayflower GmbH
 
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...Mayflower GmbH
 
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und AlloyNative Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und AlloyMayflower GmbH
 
Pair Programming Mythbusters
Pair Programming MythbustersPair Programming Mythbusters
Pair Programming MythbustersMayflower GmbH
 
Shoeism - Frau im Glück
Shoeism - Frau im GlückShoeism - Frau im Glück
Shoeism - Frau im GlückMayflower GmbH
 
Bessere Software schneller liefern
Bessere Software schneller liefernBessere Software schneller liefern
Bessere Software schneller liefernMayflower GmbH
 
Von 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 SprintsVon 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 SprintsMayflower GmbH
 
Piwik anpassen und skalieren
Piwik anpassen und skalierenPiwik anpassen und skalieren
Piwik anpassen und skalierenMayflower GmbH
 
Agilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce BreakfastAgilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce BreakfastMayflower GmbH
 

More from Mayflower GmbH (20)

Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
 
Why and what is go
Why and what is goWhy and what is go
Why and what is go
 
Agile Anti-Patterns
Agile Anti-PatternsAgile Anti-Patterns
Agile Anti-Patterns
 
JavaScript Days 2015: Security
JavaScript Days 2015: SecurityJavaScript Days 2015: Security
JavaScript Days 2015: Security
 
Vom Entwickler zur Führungskraft
Vom Entwickler zur FührungskraftVom Entwickler zur Führungskraft
Vom Entwickler zur Führungskraft
 
Produktive teams
Produktive teamsProduktive teams
Produktive teams
 
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientSalt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native Client
 
Plugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debuggingPlugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debugging
 
Usability im web
Usability im webUsability im web
Usability im web
 
Rewrites überleben
Rewrites überlebenRewrites überleben
Rewrites überleben
 
JavaScript Security
JavaScript SecurityJavaScript Security
JavaScript Security
 
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
 
Responsive Webdesign
Responsive WebdesignResponsive Webdesign
Responsive Webdesign
 
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und AlloyNative Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
 
Pair Programming Mythbusters
Pair Programming MythbustersPair Programming Mythbusters
Pair Programming Mythbusters
 
Shoeism - Frau im Glück
Shoeism - Frau im GlückShoeism - Frau im Glück
Shoeism - Frau im Glück
 
Bessere Software schneller liefern
Bessere Software schneller liefernBessere Software schneller liefern
Bessere Software schneller liefern
 
Von 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 SprintsVon 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 Sprints
 
Piwik anpassen und skalieren
Piwik anpassen und skalierenPiwik anpassen und skalieren
Piwik anpassen und skalieren
 
Agilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce BreakfastAgilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce Breakfast
 

Recently uploaded

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Migration Concepts For Enterprise PHP Applications

  • 1. Migration concepts for enterprise PHP applications International PHP Conference 2008 – Spring Edition Thorsten Rinne
  • 2. Introduction ❙ Thorsten Rinne ❙ 31 years old ❙ Graduated in computer science ❙ Project manager at Mayflower GmbH, Munich ❙ Reporting applications ❙ Critical bank applications ❙ PHP Consulting ❙ PHP software development since 1999 ❙ Founder and main developer of Open Source FAQ- management software phpMyFAQ since 2001 ❙ Zend Certified Engineer (PHP 5) „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 2
  • 3. Summary ❙ Introduction ❙ Why upgrade? ❙ Process model ❙ MySQL upgrade process ❙ PHP upgrade process ❙ Migration ❙ Conclusion ❙ Questions and answers „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 3
  • 4. Introduction: Why upgrade? ❙ MySQL 4 support will end ❙ Active support already ended by the end of 2006 ❙ Only extended support until 2008 for MySQL 4.0 and 2009 for MySQL 4.1 ❙ MySQL 5 has more and advanced features like stored procedures, trigger, better SQL support ❙ PHP 4 support will end ❙ PHP 4 is dead, dead, dead ❙ Only security relevant fixes until 2008-08-08 ❙ PHP 5.2 is faster and more stable than every PHP 4 version „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 4
  • 5. Introduction: Requirements ❙ No qualitative changes like new features ❙ No technical changes like ❙ new database layer ❙ new template engine ❙ Using new PHP 5 features ❙ No influences for productive services like ❙ External systems ❙ End user frontends ❙ Minimization of time and effort „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 5
  • 6. Introduction: What is porting? Innovation potential ❙ Reasons ❙ Most simple form of migration ive sit Rewrite ❙ Manageble risks po ❙ Small complexity because of the lack of qualitive and Reengineering technical changes e tiv ❙ Requirement ga ne ❙ Minor differences between Porting current and future application platform complexity „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 6
  • 7. Process model ❙ Reducing of complexity with a planned procedure ❙ Coverage of the complete porting ❙ Methodical description of the process ❙ Tool support „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 7
  • 8. Process model: Preparations ❙ Targets ❙ Porting without any technical or qualitative changes ❙ Recovery of support (MySQL/PHP) ❙ Minimizing the interferences of services and reduction of change times ❙ Interferences ❙ Porting problems between MySQL and PHP versions ❙ Application complexity ❙ missing documentation and missing contact persons ❙ Communication between all team members „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 8
  • 9. Process modell: Upgrading MySQL ❙ Upgrade in two steps ❙ MySQL 4.0 to MySQL 4.1 ❙ MySQL 4.1 to MySQL 5.0 ❙ Why two steps? ❙ Big changes between 4.0 and 4.1 ❙ Password changes ❙ Character sets ❙ Collations ❙ Many minor BC breaks „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 9
  • 10. Upgrade path for MySQL ❙ First dump your current database, if it‘s InnoDB. If you use MyISAM, just backup everything. ❙ upgrade your development machine ❙ Reload your tables ❙ Test, test, test with MySQL 5.0 ❙ Fix your queries and application if you have problems ❙ Use the STRICT MODE in MySQL 5.0 ❙ Test, test, test with MySQL 5.0 ❙ Upgrade your production machine ❙ Reload your production database „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 10
  • 11. How to dump MySQL? ❙ Use the MySQL 4.1 mysqldump binary! shell> mysqldump –uroot -p –-database mydatabase --single-transaction --default-character-set=utf-8 --disable-keys --extended-insert | bzip2 –c > backup.sql.bz2 Warning: This can lock all tables! ❙ Fix the password column in the MySQL user table shell> mysql_fix_privilege_tables --password=root_password „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 11
  • 12. MySQL Pitfalls ❙ Rebuild your TIMESTAMPs, check this also in your application ❙ TIMESTAMP now has the format 'YYYY-MM-DD HH:MM:SS' ❙ DECIMAL(14,2) in MySQL 4.0 is not the same as DECIMAL(14,2) in MySQL 4.1/5.0 ❙ using DECIMAL(10,5): 100000 will be 99999.99999 ❙ using DECIMAL(11,5): 100000 will be 100000.00000 ❙ New reserved words ❙ SQL2003 standard for your SQL queries with natural JOINs and JOINs with USING may produce different results ❙ http://dev.mysql.com/doc/refman/5.0/en/upgrading-from- 4-1.html „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 12
  • 13. After MySQL upgrade ❙ Release the current combination ❙ PHP 4 / MySQL 5 ❙ Why? ❙ You never find all problems during your tests ❙ PHP porting may took longer than the MySQL porting ❙ Increase your experience with MySQL 5 ❙ Prepare the PHP 5 update „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 13
  • 14. Process model: Upgrading PHP ❙ Which PHP version? ❙ Latest PHP 5.2 release for production, if you build by yourself or current PHP 5.2 package from your Linux/Unix/*BSD/Solaris distribution ❙ Testing with PHP 5.3-dev if you have time and money ❙ Please don‘t use ❙ PHP 5.0.x ❙ PHP 5.1.x ❙ PHP 6.0.0-dev „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 14
  • 15. Upgrade path for PHP ❙ upgrade your development machine to latest PHP 5.2 release ❙ Test, test, test ❙ Fix your code if you have problems ❙ register_globals = off ❙ error_reporting = E_ALL & E_STRICT ❙ display_errors = on ❙ log_errors = on ❙ Test, test, test ❙ Upgrade your production machine ❙ Release your ported application „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 15
  • 16. Migrate configuration files ❙ httpd.conf ❙ change this line: LoadModule php4_module php/sapi/php4apache2.dll ❙ with this one: LoadModule php5_module /php/php5apache2.dll ❙ php.ini ❙ You should use the php.ini-recommended file, but check, if you need magic quotes on…. Otherwise your application could be insecure! „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 16
  • 17. PHP 5 Pitfalls: New reserved keyords ❙ abstract ❙ public ❙ catch ❙ throw ❙ clone ❙ try ❙ extends ❙ use ❙ final ❙ namespace ❙ implements ❙ instanceof ❙ interface ❙ goto ❙ private ❙ protected „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 17
  • 18. PHP 5 Pitfalls Constructor / Destructor ❙ PHP 4 ❙ construct method has the name of the class ❙ No destruct method ❙ PHP 5 ❙ construct method: __construct() ❙ If not available, fallback to PHP4 handling ❙ destruct method: __destruct() ❙ Executed at the end of the request „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 18
  • 19. PHP 5 Pitfalls Magic methods ❙ __autoload() ❙ __call(), __callStatic() (only PHP 5.3) ❙ __construct() ❙ __destruct() ❙ __get() ❙ __isset() ❙ __set() ❙ __set_state() ❙ __sleep() ❙ __toString() ❙ __unset() ❙ __wakeup() „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 19
  • 20. PHP 5 Pitfalls ❙ get_class(), get_parent_class() and get_class_methods() now case-sensitive ❙ __CLASS__, __METHOD__, and __FUNCTION__ are also case-sensitive ❙ Objects are referenced by handle, and not by value ❙ Objects aren’t primitive types like in PHP 4 ❙ If you need a copy of a object, use __clone() ❙ Re-declaration of $this isn’t allowed anymore ❙ === operator is more strict than it was in PHP 4 ❙ __call()/__set()/__get() are different in PHP 4 ❙ Don’t use zend.ze1.compatibility_mode! ❙ Use instanceof instead of is_a() „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 20
  • 21. Migration strategies ❙ After the release of the PHP 5 ported application REFACTORING! ❙ Strategies for ❙ „Spaghetti code“ ❙ Half procedural – half object-orientated ❙ PHP 4 OOP ❙ Please don‘t try a complete rewrite ❙ Too expensive ❙ Takes too long ❙ Joel on software: „Things You Should Never Do “ „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 21
  • 22. Migration „Spaghetti Code“ ❙ Very old code, maybe developed in the last PHP 3 century ❙ No or just minor separation of code and layout ❙ No use of libraries like PEAR, Zend Framework or eZ components ❙ No documentation ❙ No tests „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 22
  • 23. Migration „Spaghetti Code“: Strategy ❙ Identify recurring code parts and implement classes ❙ Use of standard libraries like Zend Framework, eZ components or PEAR ❙ Add inline documentation ❙ Fix your coding styles ❙ Add unittests for the new, refactored backend ❙ Add Selenium tests for the frontend „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 23
  • 24. Migration „Half procedual – halb object-orientated“ ❙ Code with differend quality ❙ Just a few documentation ❙ Maybe some tests ❙ „the typical current PHP 4 project“ ☺ „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 24
  • 25. Migration „ Half procedual – halb object-orientated“: Strategy ❙ Add inline documentation for all classes and methods ❙ Improve the re-using of duplicate code ❙ Add unittests and Selenium tests ❙ Improve every code part with PHP 5 functions, for example using file_put_contents() instead of fopen(), fwrite(), and fclose(). „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 25
  • 26. Migration PHP 4 OOP ❙ Application was developed object-orientated in PHP 4 ❙ Using of ❙ PHP 4 references ❙ Re-declaration of $this „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 26
  • 27. Migration PHP 4 OOP: Strategy ❙ Maybe you‘re lucky and there are no problems. Maybe. ❙ If you see problems, they are fatal errors like ❙ Objects are referenced by value ❙ $foo =& new Foo(); ❙ Solution: ❙ Implement unittests ❙ Use standard APIs ❙ Fix the PHP 5 problems „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 27
  • 28. Conclusion ❙ Migration is always possible ❙ Migration can be hard, but usually it isn‘t! ☺ ❙ Don‘t shoot yourself in the foot with the migration ❙ First upgrade MySQL ❙ Then upgrade PHP and fix your application ❙ Then do the cleanup for a better future ☺ ❙ Stay current in the future and do always small steps ❙ Keep PHP 5.3 and PHP 5.4 in mind! „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 28
  • 29. Questions and answers „Migration concepts for enterprise PHP applications“ © MAYFLOWER GmbH 2008 29
  • 30. Thank you very much! Thorsten Rinne, Dipl.-Inf. (FH) Mayflower GmbH Mannhardtstraße 6 D-80538 München Germany +49 (89) 24 20 54 – 31 thorsten.rinne@mayflower.de