SlideShare a Scribd company logo
1 of 15
Download to read offline
UPGRADINGTOPHP5.6
LUKA SKUPNJAK, ZGPHP #42
WHYUPGRADING
WHY UPGRADING - SPEED
image taken from Dmitry Stogov
WHY UPGRADING - SPEED
image taken from Dmitry Stogov
PHP ≤ 5.3 IS DEAD
WHY UPGRADING - CODE
symfony/Console
symfony/DependencyInjection
symfony/EventDispatcher
illuminate/database
domnikl/statsd-php
facebook/facebook-php-sdk-v4
"require": {
    "php": ">= 5.5.9"
}
"require": {
    "php": ">= 5.5.9"
}
"require": {
    "php": ">= 5.4.0"
}
"require": {
    "php": ">= 5.4.0"
}
"require": {
    "php": ">= 5.4.0"
}
"require": {
    "php": ">= 5.4.0"
}
HOW TO UPGRADE
php.net migration manual
Upgrade from PHP 5.3 to PHP 5.4
Upgrade from PHP 5.4 to PHP 5.5
Upgrade from PHP 5.5 to PHP 5.6
HOW TO UPGRADE - NO DOWNTIME
Upgrade just the part of the server cluster
Fix version specific errors
Upgrade everything
See Tomislav's talk from ZgPHP #41!
SENTRY
Single point to track all errors
Supports error filtering and aggregating
One installation manages your test, staging and production servers
Get from Github through Composer
SENTRY
SENTRY - PRO TIPS
Raven Client captureException method
- add tags to options array (PHP version, server address)
Raven Error Handler handleFatalError method
- add E_DEPRECATED and E_USER_DEPRECATED error handleing
EXTRAS - SESSIONS
From PHP 5.6 session data is only written if data has been changed.
This can cause some weird problems, like "randomly" logging out of users
Solution: write something every time
Read more here
$_SESSION['someKey'] = some_changeable_value; // time()
EXTRAS - $HTTP_RAW_POST_DATA
Deprecated from PHP 5.6
setting in php.ini defines how data is written in
Solution:
always_populate_raw_post_data
$HTTP_RAW_POST_DATA
always_populate_raw_post_data = ‐1
THANK YOU
Please rate my talk!
We're hiring!
https://joind.in/13602
http://www.trikoder.hr/karijera/

More Related Content

What's hot

Rails Plugins 1 Plugin
Rails Plugins 1 PluginRails Plugins 1 Plugin
Rails Plugins 1 Plugin
oscon2007
 
Cowboy rabbit-websockets
Cowboy rabbit-websocketsCowboy rabbit-websockets
Cowboy rabbit-websockets
Wade Mealing
 

What's hot (20)

Selenoid + Allure - How to use these tools together?
Selenoid + Allure - How to use these tools together?Selenoid + Allure - How to use these tools together?
Selenoid + Allure - How to use these tools together?
 
XP Days Ukraine 2013 - Architecting for Continuous Delivery
XP Days Ukraine 2013 - Architecting for Continuous DeliveryXP Days Ukraine 2013 - Architecting for Continuous Delivery
XP Days Ukraine 2013 - Architecting for Continuous Delivery
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Up
 
Develop and Deploy Outside the Repo
Develop and Deploy Outside the RepoDevelop and Deploy Outside the Repo
Develop and Deploy Outside the Repo
 
Road to CakePHP 3.0
Road to CakePHP 3.0Road to CakePHP 3.0
Road to CakePHP 3.0
 
WP-CLI: Unleash the power
WP-CLI: Unleash the powerWP-CLI: Unleash the power
WP-CLI: Unleash the power
 
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloudphp[world] 2015 Laravel 5.1: From Homestead to the Cloud
php[world] 2015 Laravel 5.1: From Homestead to the Cloud
 
How to use App::FatPacker effectively
How to use App::FatPacker effectivelyHow to use App::FatPacker effectively
How to use App::FatPacker effectively
 
Rails Plugins 1 Plugin
Rails Plugins 1 PluginRails Plugins 1 Plugin
Rails Plugins 1 Plugin
 
Cowboy rabbit-websockets
Cowboy rabbit-websocketsCowboy rabbit-websockets
Cowboy rabbit-websockets
 
Drupal Performance
Drupal Performance Drupal Performance
Drupal Performance
 
Integrating with Zarafa
Integrating with ZarafaIntegrating with Zarafa
Integrating with Zarafa
 
Keeping your CI/CD pipeline as fast as it needs to be
Keeping your CI/CD pipeline as fast as it needs to beKeeping your CI/CD pipeline as fast as it needs to be
Keeping your CI/CD pipeline as fast as it needs to be
 
Websocket 101 in Python
Websocket 101 in PythonWebsocket 101 in Python
Websocket 101 in Python
 
Making own AMP stack with Homebrew on a Mac
Making own AMP stack with Homebrew on a MacMaking own AMP stack with Homebrew on a Mac
Making own AMP stack with Homebrew on a Mac
 
Advanced WordPress Tooling
Advanced WordPress ToolingAdvanced WordPress Tooling
Advanced WordPress Tooling
 
Installing Laravel 5 on Windows
Installing Laravel 5 on WindowsInstalling Laravel 5 on Windows
Installing Laravel 5 on Windows
 
JavaOne 2015: Scalable Continous Deployment with Maven
JavaOne 2015: Scalable Continous Deployment with MavenJavaOne 2015: Scalable Continous Deployment with Maven
JavaOne 2015: Scalable Continous Deployment with Maven
 
Common async misconceptions
Common async misconceptionsCommon async misconceptions
Common async misconceptions
 
Agile Workflows
Agile WorkflowsAgile Workflows
Agile Workflows
 

Similar to Upgrading to php 5.6

Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧
Orange Tsai
 
Orange@php conf
Orange@php confOrange@php conf
Orange@php conf
Hash Lin
 
From Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShiftFrom Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShift
Eric D. Schabell
 

Similar to Upgrading to php 5.6 (20)

All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - Cascadia
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
PHP MySQL Training : Module 2
PHP MySQL Training : Module 2PHP MySQL Training : Module 2
PHP MySQL Training : Module 2
 
Setting advanced PHP development environment
Setting advanced PHP development environmentSetting advanced PHP development environment
Setting advanced PHP development environment
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
 
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil ConferencePhalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
 
PHP Conference - Phalcon hands-on
PHP Conference - Phalcon hands-onPHP Conference - Phalcon hands-on
PHP Conference - Phalcon hands-on
 
InspiringCon14: ElePHPants on speed: Running TYPO3 Flow on HipHop VM
InspiringCon14: ElePHPants on speed: Running TYPO3 Flow on HipHop VMInspiringCon14: ElePHPants on speed: Running TYPO3 Flow on HipHop VM
InspiringCon14: ElePHPants on speed: Running TYPO3 Flow on HipHop VM
 
The why and how of moving to php 5.4
The why and how of moving to php 5.4The why and how of moving to php 5.4
The why and how of moving to php 5.4
 
Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧Security in PHP - 那些在滲透測試的小技巧
Security in PHP - 那些在滲透測試的小技巧
 
Orange@php conf
Orange@php confOrange@php conf
Orange@php conf
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
Laravel intallation
Laravel intallationLaravel intallation
Laravel intallation
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
From Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShiftFrom Code to Cloud - PHP on Red Hat's OpenShift
From Code to Cloud - PHP on Red Hat's OpenShift
 
Phalcon
PhalconPhalcon
Phalcon
 

Recently uploaded

Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
微信号购买
微信号购买微信号购买
微信号购买
 
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmux
 
[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 

Upgrading to php 5.6

  • 1.
  • 4. WHY UPGRADING - SPEED image taken from Dmitry Stogov
  • 5. WHY UPGRADING - SPEED image taken from Dmitry Stogov
  • 6. PHP ≤ 5.3 IS DEAD
  • 7. WHY UPGRADING - CODE symfony/Console symfony/DependencyInjection symfony/EventDispatcher illuminate/database domnikl/statsd-php facebook/facebook-php-sdk-v4 "require": {     "php": ">= 5.5.9" } "require": {     "php": ">= 5.5.9" } "require": {     "php": ">= 5.4.0" } "require": {     "php": ">= 5.4.0" } "require": {     "php": ">= 5.4.0" } "require": {     "php": ">= 5.4.0" }
  • 8. HOW TO UPGRADE php.net migration manual Upgrade from PHP 5.3 to PHP 5.4 Upgrade from PHP 5.4 to PHP 5.5 Upgrade from PHP 5.5 to PHP 5.6
  • 9. HOW TO UPGRADE - NO DOWNTIME Upgrade just the part of the server cluster Fix version specific errors Upgrade everything See Tomislav's talk from ZgPHP #41!
  • 10. SENTRY Single point to track all errors Supports error filtering and aggregating One installation manages your test, staging and production servers Get from Github through Composer
  • 12. SENTRY - PRO TIPS Raven Client captureException method - add tags to options array (PHP version, server address) Raven Error Handler handleFatalError method - add E_DEPRECATED and E_USER_DEPRECATED error handleing
  • 13. EXTRAS - SESSIONS From PHP 5.6 session data is only written if data has been changed. This can cause some weird problems, like "randomly" logging out of users Solution: write something every time Read more here $_SESSION['someKey'] = some_changeable_value; // time()
  • 14. EXTRAS - $HTTP_RAW_POST_DATA Deprecated from PHP 5.6 setting in php.ini defines how data is written in Solution: always_populate_raw_post_data $HTTP_RAW_POST_DATA always_populate_raw_post_data = ‐1
  • 15. THANK YOU Please rate my talk! We're hiring! https://joind.in/13602 http://www.trikoder.hr/karijera/