PHP 4? OMG! A small vademecum for obsolete software migration.

Francesco Fullone
Francesco FulloneEntrepreneur, Mentor, Conference organiser at Ideato Srl
PHP 4? OMG!
A small vademecum for obsolete software
migration.


Francesco Fullone, Ideato.it
ff AT ideato.it
Who am I

Francesco Fullone

- PHP developer since 1999
- GrUSP President
- PHP and Open Source Evangelist
- CEO @ Ideato.it


- Nerd and geek
How many of
 you still use
   PHP 4?
PHP 4? OMG! A small vademecum for obsolete software migration.
Do you know that the
official PHP 4 support has
         ended on
      8 August 2008?
PHP 4? OMG! A small vademecum for obsolete software migration.
Usage of PHP 4 (2008/10)




                     ph p 4   ph p 5



                data from Nexen.net
PHP 4? OMG! A small vademecum for obsolete software migration.
The “Never touch a
running system” rule
“Why upgrade?
My servers work fine!”




                      But the hardware is
                      no longer supported
                   and the spare parts are
                      no longer available.
“Why upgrade?
My software works fine!”




                    But the dependencies
                    libraries are outdated
                  and no more developed.
“Why upgrade?
My code works fine!”




                    But the knowledge is
                     missed and the best
                  practice never applied.
Sometimes rewriting
  from scratch is
   not an option.
We need
a migration plan.

  A good one.
Create Tests.
Create a tests suite:

A good test suite should be both Unit
and Functional.

At least we have to:

- test   the core functionality (ie. Login)
- test   the workflows
- test   third party interaction
- test   all the classes (if the code is OO)
Acceptance Tests:




                      If the code can't be
                    unit tested (phpUnit),
                     use acceptance tests
                           (Selenium-IDE).
Check for libs,
code smells and
dependancies.

      Create Tests.
Check for libs, code smells and dependancies.


- <% ASP TAG?! %>
- Old global array $HTTP_*_VARS
- Magic Quotes
- Register Globals
- Safe mode
- Old PEAR/phpClasses classes
- Dismissed PHP_modules
#pear install PHP_CompatInfo
Rollback to the
default PHP.INI
    Check for libs,
    code smells and
    dependancies.

           Create Tests.
A lot of things changed in the PHP.INI, try to
 use the default values during the upgrade
                   process.

    Enable the LOG to the Notice level.
Upgrade PHP and the
system iteratively.

       Rollback to the
       default PHP.INI
            Check for libs,
            code smells and
            dependancies.

                   Create Tests.
Read the LOG,
   use the tests,
do code refactoring,
upgrade the system.
Repeat this mantra
THE END?
NO!
Now it's time to do
    serious code refactoring:

      - create proper unit tests
- use standard development pattern
- use an enterprise level framework
      - remove unused modules
?
Francesco Fullone
  ff AT ideato.it




 via Quinto Bucci 205
  47023 Cesena (FC)
   info AT ideato.it
    www.ideato.it



  www.fullo.net
   www.grusp.it
  www.phpday.it
1 of 30

Recommended

Perl Continous Integration by
Perl Continous IntegrationPerl Continous Integration
Perl Continous IntegrationMichael Peters
6K views34 slides
10 less-known Laravel Packages: April 2016 by
10 less-known Laravel Packages: April 201610 less-known Laravel Packages: April 2016
10 less-known Laravel Packages: April 2016Povilas Korop
3.9K views13 slides
Let's creating your own PHP (tejimaya version) by
Let's creating your own PHP (tejimaya version)Let's creating your own PHP (tejimaya version)
Let's creating your own PHP (tejimaya version)Kousuke Ebihara
1.5K views41 slides
Develop At The Speed Of Thought by
Develop At The Speed Of ThoughtDevelop At The Speed Of Thought
Develop At The Speed Of ThoughtRoy Ganor
681 views20 slides
Robotframework Presentation - Pinoy Python Meetup 2011January12 by
Robotframework Presentation - Pinoy Python Meetup 2011January12Robotframework Presentation - Pinoy Python Meetup 2011January12
Robotframework Presentation - Pinoy Python Meetup 2011January12Franz Allan See
2.5K views16 slides
Testing Toolbox by
Testing ToolboxTesting Toolbox
Testing ToolboxMichael Peters
2.2K views29 slides

More Related Content

What's hot

Robot Framework by
Robot FrameworkRobot Framework
Robot FrameworkOnur Baskirt
6.9K views41 slides
Setting advanced PHP development environment by
Setting advanced PHP development environmentSetting advanced PHP development environment
Setting advanced PHP development environmentKapil Sharma
2.2K views43 slides
How to Upgrade to the Newest Shiniest Django Version by
How to Upgrade to the Newest Shiniest Django VersionHow to Upgrade to the Newest Shiniest Django Version
How to Upgrade to the Newest Shiniest Django VersionSusan Tan
988 views34 slides
Midwest PHP 2017 DevOps For Small team by
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamJoe Ferguson
540 views83 slides
Python in Test automation by
Python in Test automationPython in Test automation
Python in Test automationKrishnana Sreeraman
6.1K views16 slides
Laravel Forge: Hello World to Hello Production by
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionJoe Ferguson
1.1K views123 slides

What's hot(20)

Setting advanced PHP development environment by Kapil Sharma
Setting advanced PHP development environmentSetting advanced PHP development environment
Setting advanced PHP development environment
Kapil Sharma2.2K views
How to Upgrade to the Newest Shiniest Django Version by Susan Tan
How to Upgrade to the Newest Shiniest Django VersionHow to Upgrade to the Newest Shiniest Django Version
How to Upgrade to the Newest Shiniest Django Version
Susan Tan988 views
Midwest PHP 2017 DevOps For Small team by Joe Ferguson
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small team
Joe Ferguson540 views
Laravel Forge: Hello World to Hello Production by Joe Ferguson
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
Joe Ferguson1.1K views
Continuous Integration by Liyao Chen
Continuous  IntegrationContinuous  Integration
Continuous Integration
Liyao Chen3.9K views
Robot Framework Introduction & Sauce Labs Integration by Sauce Labs
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs10.9K views
Codeception: introduction to php testing (v2 - Aberdeen php) by Engineor
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
Engineor456 views
Sonar qube to impove code quality by Mani Sarkar
Sonar qube   to impove code qualitySonar qube   to impove code quality
Sonar qube to impove code quality
Mani Sarkar4.3K views
Step away from that knife! by Michael Goetz
Step away from that knife!Step away from that knife!
Step away from that knife!
Michael Goetz985 views
Composer at Scale, Release and Dependency Management by Joe Ferguson
Composer at Scale, Release and Dependency ManagementComposer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency Management
Joe Ferguson437 views
Put an end to regression with codeception testing by Joe Ferguson
Put an end to regression with codeception testingPut an end to regression with codeception testing
Put an end to regression with codeception testing
Joe Ferguson922 views
Java Test Automation for REST, Web and Mobile by Elias Nogueira
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and Mobile
Elias Nogueira1.6K views
Speed up your Titanium app development with automated tests - TiConf EU 2014 by Emanuele Rampichini
Speed up your Titanium app development with automated tests - TiConf EU 2014Speed up your Titanium app development with automated tests - TiConf EU 2014
Speed up your Titanium app development with automated tests - TiConf EU 2014
Emanuele Rampichini5.4K views
Functional Tests Automation with Robot Framework by laurent bristiel
Functional Tests Automation with Robot FrameworkFunctional Tests Automation with Robot Framework
Functional Tests Automation with Robot Framework
laurent bristiel29.8K views
Ant Unit Your Functional Test by jimmy zhao
Ant Unit Your Functional TestAnt Unit Your Functional Test
Ant Unit Your Functional Test
jimmy zhao1.3K views
Pharo JS by Pharo
Pharo JSPharo JS
Pharo JS
Pharo421 views

Viewers also liked

Remote working istruzioni by
Remote working istruzioniRemote working istruzioni
Remote working istruzioniFrancesco Fullone
1.9K views21 slides
From brainstorming to product development by
From brainstorming to product developmentFrom brainstorming to product development
From brainstorming to product developmentFrancesco Fullone
1.6K views33 slides
From webagency to...a better job, life and a lot of fun by
From webagency to...a better job, life and a lot of funFrom webagency to...a better job, life and a lot of fun
From webagency to...a better job, life and a lot of funFrancesco Fullone
1K views31 slides
Massimiliano Wosz - Zend Framework 1.5 by
Massimiliano Wosz - Zend Framework 1.5Massimiliano Wosz - Zend Framework 1.5
Massimiliano Wosz - Zend Framework 1.5Francesco Fullone
4.6K views68 slides
Gabriele Lana: Testing Web Applications by
Gabriele Lana: Testing Web ApplicationsGabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web ApplicationsFrancesco Fullone
866 views132 slides
Pietro Brambati: PHP e la piattaforma Microsoft by
Pietro Brambati: PHP e la piattaforma MicrosoftPietro Brambati: PHP e la piattaforma Microsoft
Pietro Brambati: PHP e la piattaforma MicrosoftFrancesco Fullone
812 views19 slides

Viewers also liked(19)

From brainstorming to product development by Francesco Fullone
From brainstorming to product developmentFrom brainstorming to product development
From brainstorming to product development
Francesco Fullone1.6K views
From webagency to...a better job, life and a lot of fun by Francesco Fullone
From webagency to...a better job, life and a lot of funFrom webagency to...a better job, life and a lot of fun
From webagency to...a better job, life and a lot of fun
Massimiliano Wosz - Zend Framework 1.5 by Francesco Fullone
Massimiliano Wosz - Zend Framework 1.5Massimiliano Wosz - Zend Framework 1.5
Massimiliano Wosz - Zend Framework 1.5
Francesco Fullone4.6K views
Pietro Brambati: PHP e la piattaforma Microsoft by Francesco Fullone
Pietro Brambati: PHP e la piattaforma MicrosoftPietro Brambati: PHP e la piattaforma Microsoft
Pietro Brambati: PHP e la piattaforma Microsoft
Francesco Fullone812 views
Gaetano Giunta: introduzione agli eZ components by Francesco Fullone
Gaetano Giunta: introduzione agli eZ componentsGaetano Giunta: introduzione agli eZ components
Gaetano Giunta: introduzione agli eZ components
Un po' di ottimizzazione non fa mai male, rendere wordpress più performante by Francesco Fullone
Un po' di ottimizzazione non fa mai male, rendere wordpress più performanteUn po' di ottimizzazione non fa mai male, rendere wordpress più performante
Un po' di ottimizzazione non fa mai male, rendere wordpress più performante
Francesco Fullone543 views
Please, dont touch the slow parts v.3.6 @webtechcon by Francesco Fullone
Please, dont touch the slow parts v.3.6 @webtechconPlease, dont touch the slow parts v.3.6 @webtechcon
Please, dont touch the slow parts v.3.6 @webtechcon
Enrico Zimuel: La sicurezza delle applicazioni in PHP by Francesco Fullone
Enrico Zimuel: La sicurezza delle applicazioni in PHPEnrico Zimuel: La sicurezza delle applicazioni in PHP
Enrico Zimuel: La sicurezza delle applicazioni in PHP
Francesco Fullone1.3K views

Similar to PHP 4? OMG! A small vademecum for obsolete software migration.

Agile == Dynamic? by
Agile == Dynamic?Agile == Dynamic?
Agile == Dynamic?Francesco Fullone
512 views30 slides
The why and how of moving to php 8 by
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8Wim Godden
152 views69 slides
Code Coverage for Total Security in Application Migrations by
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsDana Luther
328 views29 slides
Theory and practice – migrating your legacy code into our modern test drive... by
Theory and practice – migrating your  legacy code into our modern test  drive...Theory and practice – migrating your  legacy code into our modern test  drive...
Theory and practice – migrating your legacy code into our modern test drive...Lars Jankowfsky
2.8K views53 slides
An introduction to Phing the PHP build system (PHPDay, May 2012) by
An introduction to Phing the PHP build system (PHPDay, May 2012)An introduction to Phing the PHP build system (PHPDay, May 2012)
An introduction to Phing the PHP build system (PHPDay, May 2012)Jeremy Coates
3.2K views26 slides
Getting started with PHPUnit by
Getting started with PHPUnitGetting started with PHPUnit
Getting started with PHPUnitKhyati Gala
267 views20 slides

Similar to PHP 4? OMG! A small vademecum for obsolete software migration.(20)

The why and how of moving to php 8 by Wim Godden
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
Wim Godden152 views
Code Coverage for Total Security in Application Migrations by Dana Luther
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application Migrations
Dana Luther328 views
Theory and practice – migrating your legacy code into our modern test drive... by Lars Jankowfsky
Theory and practice – migrating your  legacy code into our modern test  drive...Theory and practice – migrating your  legacy code into our modern test  drive...
Theory and practice – migrating your legacy code into our modern test drive...
Lars Jankowfsky2.8K views
An introduction to Phing the PHP build system (PHPDay, May 2012) by Jeremy Coates
An introduction to Phing the PHP build system (PHPDay, May 2012)An introduction to Phing the PHP build system (PHPDay, May 2012)
An introduction to Phing the PHP build system (PHPDay, May 2012)
Jeremy Coates3.2K views
Getting started with PHPUnit by Khyati Gala
Getting started with PHPUnitGetting started with PHPUnit
Getting started with PHPUnit
Khyati Gala267 views
Frontend testing of (legacy) websites by Michael Kubovic
Frontend testing of (legacy) websitesFrontend testing of (legacy) websites
Frontend testing of (legacy) websites
Michael Kubovic255 views
APIdays Paris 2019 Backend is the new frontend by Antoine Cheron by apidays
APIdays Paris 2019 Backend is the new frontend by Antoine CheronAPIdays Paris 2019 Backend is the new frontend by Antoine Cheron
APIdays Paris 2019 Backend is the new frontend by Antoine Cheron
apidays79 views
Enterprise PHP (PHP London Conference 2008) by Ivo Jansch
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch7.4K views
Upstate CSCI 450 PHP Chapters 5, 12, 13 by DanWooster1
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
DanWooster139 views
PHP to Python with No Regrets by Alex Ezell
PHP to Python with No RegretsPHP to Python with No Regrets
PHP to Python with No Regrets
Alex Ezell18.5K views
Workshop: Refactoring Legacy PHP: The Complete Guide by Junade Ali
Workshop: Refactoring Legacy PHP: The Complete Guide Workshop: Refactoring Legacy PHP: The Complete Guide
Workshop: Refactoring Legacy PHP: The Complete Guide
Junade Ali243 views
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro... by Bruno Tanoue
[ENGLISH] TDC 2015 - PHP  Trail - Tests and PHP Continuous Integration Enviro...[ENGLISH] TDC 2015 - PHP  Trail - Tests and PHP Continuous Integration Enviro...
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro...
Bruno Tanoue795 views
An introduction to Phing the PHP build system by Jeremy Coates
An introduction to Phing the PHP build systemAn introduction to Phing the PHP build system
An introduction to Phing the PHP build system
Jeremy Coates5K views
[drupalday2017] - Behat per Drupal: test automatici e molto di più by DrupalDay
[drupalday2017] - Behat per Drupal: test automatici e molto di più[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più
DrupalDay257 views
The why and how of moving to php 7 by Wim Godden
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving to php 7
Wim Godden232 views

More from Francesco Fullone

Life Cycle Design e Circular Economy: un caso reale by
Life Cycle Design e Circular Economy: un caso reale Life Cycle Design e Circular Economy: un caso reale
Life Cycle Design e Circular Economy: un caso reale Francesco Fullone
269 views32 slides
Okr istruzioni per l'uso - devfest by
Okr   istruzioni per l'uso - devfestOkr   istruzioni per l'uso - devfest
Okr istruzioni per l'uso - devfestFrancesco Fullone
172 views61 slides
OKR, sono veramente utili alla mia azienda? by
OKR, sono veramente utili alla mia azienda?OKR, sono veramente utili alla mia azienda?
OKR, sono veramente utili alla mia azienda?Francesco Fullone
142 views31 slides
Okr per community - icms by
Okr   per community - icmsOkr   per community - icms
Okr per community - icmsFrancesco Fullone
126 views32 slides
Open Governance, un caso reale by
Open Governance, un caso realeOpen Governance, un caso reale
Open Governance, un caso realeFrancesco Fullone
1.1K views73 slides
A recommendation engine for your applications by
A recommendation engine for your applicationsA recommendation engine for your applications
A recommendation engine for your applicationsFrancesco Fullone
562 views79 slides

More from Francesco Fullone(20)

Life Cycle Design e Circular Economy: un caso reale by Francesco Fullone
Life Cycle Design e Circular Economy: un caso reale Life Cycle Design e Circular Economy: un caso reale
Life Cycle Design e Circular Economy: un caso reale
Francesco Fullone269 views
OKR, sono veramente utili alla mia azienda? by Francesco Fullone
OKR, sono veramente utili alla mia azienda?OKR, sono veramente utili alla mia azienda?
OKR, sono veramente utili alla mia azienda?
Francesco Fullone142 views
A recommendation engine for your applications by Francesco Fullone
A recommendation engine for your applicationsA recommendation engine for your applications
A recommendation engine for your applications
Francesco Fullone562 views
A recommendation engine for your applications by Francesco Fullone
A recommendation engine for your applicationsA recommendation engine for your applications
A recommendation engine for your applications
Francesco Fullone332 views
MVP & Startup, with OpenSource Software and Microsoft Azure by Francesco Fullone
MVP & Startup, with OpenSource Software and Microsoft AzureMVP & Startup, with OpenSource Software and Microsoft Azure
MVP & Startup, with OpenSource Software and Microsoft Azure
Francesco Fullone2.1K views
Help yourself, grow an healthy ecosystem by Francesco Fullone
Help yourself, grow an healthy ecosystemHelp yourself, grow an healthy ecosystem
Help yourself, grow an healthy ecosystem
Francesco Fullone1.2K views
Open Source in the web enterprise world a secure success by Francesco Fullone
Open Source in the web enterprise world a secure successOpen Source in the web enterprise world a secure success
Open Source in the web enterprise world a secure success
Francesco Fullone608 views
Your browser, your storage (extended version) by Francesco Fullone
Your browser, your storage (extended version)Your browser, your storage (extended version)
Your browser, your storage (extended version)
Francesco Fullone4.1K views

Recently uploaded

"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad... by
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad..."Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad...
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad...Fwdays
40 views30 slides
Throughput by
ThroughputThroughput
ThroughputMoisés Armani Ramírez
32 views11 slides
MemVerge: Past Present and Future of CXL by
MemVerge: Past Present and Future of CXLMemVerge: Past Present and Future of CXL
MemVerge: Past Present and Future of CXLCXL Forum
110 views26 slides
Data-centric AI and the convergence of data and model engineering: opportunit... by
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...Paolo Missier
29 views40 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
66 views25 slides

Recently uploaded(20)

"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad... by Fwdays
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad..."Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad...
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad...
Fwdays40 views
MemVerge: Past Present and Future of CXL by CXL Forum
MemVerge: Past Present and Future of CXLMemVerge: Past Present and Future of CXL
MemVerge: Past Present and Future of CXL
CXL Forum110 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier29 views
"Thriving Culture in a Product Company — Practical Story", Volodymyr Tsukur by Fwdays
"Thriving Culture in a Product Company — Practical Story", Volodymyr Tsukur"Thriving Culture in a Product Company — Practical Story", Volodymyr Tsukur
"Thriving Culture in a Product Company — Practical Story", Volodymyr Tsukur
Fwdays40 views
Micron CXL product and architecture update by CXL Forum
Micron CXL product and architecture updateMicron CXL product and architecture update
Micron CXL product and architecture update
CXL Forum27 views
GigaIO: The March of Composability Onward to Memory with CXL by CXL Forum
GigaIO: The March of Composability Onward to Memory with CXLGigaIO: The March of Composability Onward to Memory with CXL
GigaIO: The March of Composability Onward to Memory with CXL
CXL Forum126 views
Photowave Presentation Slides - 11.8.23.pptx by CXL Forum
Photowave Presentation Slides - 11.8.23.pptxPhotowave Presentation Slides - 11.8.23.pptx
Photowave Presentation Slides - 11.8.23.pptx
CXL Forum126 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada110 views
Webinar : Competing for tomorrow’s leaders – How MENA insurers can win the wa... by The Digital Insurer
Webinar : Competing for tomorrow’s leaders – How MENA insurers can win the wa...Webinar : Competing for tomorrow’s leaders – How MENA insurers can win the wa...
Webinar : Competing for tomorrow’s leaders – How MENA insurers can win the wa...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu... by NUS-ISS
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
NUS-ISS32 views
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM by CXL Forum
Samsung: CMM-H Tiered Memory Solution with Built-in DRAMSamsung: CMM-H Tiered Memory Solution with Built-in DRAM
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM
CXL Forum105 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS23 views
Microchip: CXL Use Cases and Enabling Ecosystem by CXL Forum
Microchip: CXL Use Cases and Enabling EcosystemMicrochip: CXL Use Cases and Enabling Ecosystem
Microchip: CXL Use Cases and Enabling Ecosystem
CXL Forum129 views
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada119 views
Liqid: Composable CXL Preview by CXL Forum
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum121 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi113 views

PHP 4? OMG! A small vademecum for obsolete software migration.

  • 1. PHP 4? OMG! A small vademecum for obsolete software migration. Francesco Fullone, Ideato.it ff AT ideato.it
  • 2. Who am I Francesco Fullone - PHP developer since 1999 - GrUSP President - PHP and Open Source Evangelist - CEO @ Ideato.it - Nerd and geek
  • 3. How many of you still use PHP 4?
  • 5. Do you know that the official PHP 4 support has ended on 8 August 2008?
  • 7. Usage of PHP 4 (2008/10) ph p 4 ph p 5 data from Nexen.net
  • 9. The “Never touch a running system” rule
  • 10. “Why upgrade? My servers work fine!” But the hardware is no longer supported and the spare parts are no longer available.
  • 11. “Why upgrade? My software works fine!” But the dependencies libraries are outdated and no more developed.
  • 12. “Why upgrade? My code works fine!” But the knowledge is missed and the best practice never applied.
  • 13. Sometimes rewriting from scratch is not an option.
  • 14. We need a migration plan. A good one.
  • 16. Create a tests suite: A good test suite should be both Unit and Functional. At least we have to: - test the core functionality (ie. Login) - test the workflows - test third party interaction - test all the classes (if the code is OO)
  • 17. Acceptance Tests: If the code can't be unit tested (phpUnit), use acceptance tests (Selenium-IDE).
  • 18. Check for libs, code smells and dependancies. Create Tests.
  • 19. Check for libs, code smells and dependancies. - <% ASP TAG?! %> - Old global array $HTTP_*_VARS - Magic Quotes - Register Globals - Safe mode - Old PEAR/phpClasses classes - Dismissed PHP_modules
  • 21. Rollback to the default PHP.INI Check for libs, code smells and dependancies. Create Tests.
  • 22. A lot of things changed in the PHP.INI, try to use the default values during the upgrade process. Enable the LOG to the Notice level.
  • 23. Upgrade PHP and the system iteratively. Rollback to the default PHP.INI Check for libs, code smells and dependancies. Create Tests.
  • 24. Read the LOG, use the tests, do code refactoring, upgrade the system.
  • 27. NO!
  • 28. Now it's time to do serious code refactoring: - create proper unit tests - use standard development pattern - use an enterprise level framework - remove unused modules
  • 29. ?
  • 30. Francesco Fullone ff AT ideato.it via Quinto Bucci 205 47023 Cesena (FC) info AT ideato.it www.ideato.it www.fullo.net www.grusp.it www.phpday.it