SlideShare a Scribd company logo
1 of 61
Getting started
with PHP on IBM i
Mike Pavlak
Solution Consultant
mike.p@zend.com
3
Audience
• Are you looking to learn more about the what & how of PHP
on IBM i?
• Have you done some PHP but new to IBM i?
• Are you already doing PHP but Looking for product refresh?
• Might you be looking to grow beyond PDM/RPG?
4
Agenda
• The Five Steps…
1. Understand the PHP universe
2. Understand the “stack” on IBM i
3. Install Zend Server
4. Install Zend Studio
5. Get productive!
Getting started with
PHP and IBM i
Understand the PHP universe
6
PHP is a scripting language
• PHP Hypertext Pre-Processor
• Developed initially by Rasmus Lerdorf in 1994: PHP/FI
• Zeev Suraski and Andi Gutmans Contributing since1997+ (ZEev + aNDi =
Zend)
• Interpreted, not compiled
• Forgiving and intuitive code structure (short learning curve)
• Immediate feedback during development
• PHP is to Java what RPG is to COBOL
7
Who is Zend?
• Major contributor to PHP (4 FTE’s contribute to Open Source)
• Providers of supported PHP distribution, Zend Server
• Providers of commercial tooling for PHP, Zend Studio, Guard
8
Zend and IBM
• Partnership began in 2005
• Zend selected by IBM to deliver PHP on IBM i
• Zend solutions shipped with IBM i 7.1, 7.2 and 7.3!
• Just install the LP and go!
• Most current distributions and updates at Zend.com
• Relationship expanded in 2012 to include MySQL (Maria coming
soon)
9
What do we get?
• Thanks to our partnership with IBM, each IBM i customer under SWMA
can take advantage of these Zend solutions:
– Zend Server for IBM i basic edition
– Runs natively on IBM i as a licensed program
– Zend Studio for IBM i
– IDE runs on desktop for creating PHP scripts
– One year of updates and support.
– Studio is a perpetual license while Server will need to be annually
Zend Sales support
10
The “Stack”
• Tested, business ready and supported distribution of PHP
• Runs in Native Environment under PASE, no LPAR needed
• Home base for PHP modules like GD, PEAR, etc.
• Browser based admin console (10081)
• Accessible immediately after install
• Let’s look at the architecture of the stack
• And then installation on IBM i
• No charge LP Included with system maintenance
11
Polling Question #1 (check all that apply)
What would you like to modernize?
1. Green screen ERP, etc. to GUI
2. Mobile
3. Business intelligence/data mining/reporting
4. Customer/supplier self service
5. Collaboration
6. Other
7. No needs, yet
Getting Started with
PHP and IBM i
Zend Server for IBM i
13
Help Systems Survey 2016
14
What Is Zend Server?
• Production quality PHP stack
– PHP, ZF, DB connectivity, debugging
extension, and more
• Three Editions – No charge “Basic Edition”
provided by IBM & Full Professional and
Enterprise commercial edition
– All are production ready
• Application monitoring and diagnostics
(integrated with Zend Studio)
• Multi-level performance enhancement
capabilities
• Software updates and security hot fixes
• Easy and quick installation
• Zend Framework Integration
15
Zend Server
Zend Server Under the Covers
HTTP:10080
Apache
Server
(FastCGI)
IBM i
i/OS
DB2 UDB
PHP CGI
PHP file
PASE
*PGM
CMD
ILE Apache:10080
• Default configuration
FastCGI
URL Request
HTML/response
MySQL,
SQL Server,
Oracle
Thanks
Tony!
Getting started with
PHP and IBM i
Installing Zend Server
17
Software Pre-req's
Description Product Option Licensed Program
-------------------------------------- --------------- ----------------
Portable App Solutions Environment 33 57XXss1
Qshell 30 57XXss1
System Openness Includes 13 57XXss1
IBM Portable Utilities For I5/OS *base 5733sc1
OpenSSH ,OpenSST,Zlib 1 5733sc1
Please read the Installation Guide !!!
Make sure they match your release! Except 7.3
18
Install Zend Server
• Prerequisites:
– See Zend Server installation documentation for LP’s!
– Supported releases: i7.1, i7.2 and i7.3
– Recent Cumulative PTF package, PASE, Qshell, Group for HTTP
• Software installation
– Logon with *SECOFR authority (QSECOFR for MySQL for best results)
– Upload *SAVF, Restore, and start coding!
– Clean installation can start the stack automatically
• Bonus ZendDBi
– MySQL 5.1 can be installed at the same time or later
19
Best place to get it: Zend.com
http://www.zend.com/en/products/server/downloads#IBM%20i
20
Updates on same page, scroll down…
https://www.zend.com/en/products/server/downloads#IBM%20i
21
Polling Question #2
What version of PHP are you running?
1. PHP 5.2 (Zend Core, Zend Server 5)
2. PHP 5.3 (Zend Server 5-6)
3. PHP 5.4 (Zend Server 7)
4. PHP 5.5 (Zend Server 7-8)
5. PHP 5.6 (Zend Server 8)
6. Not running PHP, yet
22
Why older versions?
• Simple, Long Term Support
23
Start/stop Zend Server, MySQL, etc...
 Type GO ZENDSVR6/ZSMENU, Option 5 then 1
24
Zend Server Configuration
• Only two interfaces!
– Use http://ibmiserver:2001 to administer IBM HTTP server
– Use Zend Admin for Zend/PHP options http://ibmiserver:10081
25
Zend Server Port Change?
• Default proxy points to Port
10080
– Log in to IBM Admin
Server and open up
ZENDSVR6
– Go to General Server
Configuration
– Click Apply & restart
the server
Copyright © 2009 Zend Technologies, Inc, All rights reserved
02/03/|
26
Deploy samples and demo
• Click guide page & scroll down to XML Toolkit
• Click link to install XML Toolkit demo application to deploy samples…
• Simple wizard, accept default, enter path and go…
27
Sample Scripts!
(http://IBMi:10080/samples)
28
Z-Ray for 30 days!
• Firebug for PHP!
29
Zend Server php.ini changes
Manage php.ini via GUI in Zend Server
• Log in with initial password, can reset in green screen Server Setup  Directives
• Administer all values in php.ini
• Include path is one of over 400 options
30
Zend Support
• Included with Basic edition for 1 year
• Upgraded support (phone) can be purchased from Zend
• Support contract includes productivity tools and Z-Ray!
• Log in to My Zend at zend.com
Getting started with
PHP and IBM i
Install Zend Studio
32
Zend Studio 13.5 for all!
• Included for IBM i customers w/1 year support & upgrades
• Essential IDE for PHP on IBM i
• Syntax checker & code Completion
• JavaScript Library Support
• Debugger
• Built on Eclipse framework
• Function directory
• Templates
• Much, much, more
33
Zend Studio - Installation
• Download program from Zend.com (Not shipped with OS)
• Install to workstation (Mac, Windows, Linux)
• Follow the prompts for licensing the product, QSRLNBR
34
Remote Server Options
• FTP
– Familiar
– Sluggish
– Most systems support this, but potentially dangerous
• SSH
– More secure
– More powerful
– Easy to setup
– Easier to setup on i6.1+
35
Configuring a remote server
• Start Zend Studio & open “Remote Systems” window
• Windowshow viewRemote Systems
• Click the new connection button and select SSH
• Enter system name or IP address
36
Navigate to files
• Expand the tree for your system (triangle twisties)
• Enter user credentials and your in!
• Navigate to the directory /www/zendsvr6/htdocs
38
|
Getting started with
PHP and IBM i
Get Productive
40
Sample Script – Hello World
• Obligatory program when starting out
• Confirms correct setup of PHP
• Sample code: (Shortest PHP Macro around!)
• Save script in IFS /www/zendsvr6/htdocs/helloworld.php
• Browser URL: http://ibmisystem:10080/helloworld.php
41
42
Open Source Toolkit
– Collaborative project with IBM and Zend
– Built using ILE RPG, Stored procedures and PHP
– Object Oriented, but not too much
Set parameters based on function
Call program
Output results
I
/
O
L
e
n
g
t
h
C
o
m
m
e
n
t
V
a
r
n
a
m
e
I
n
i
t
v
a
l
Getting started with
PHP and IBM i
DB2 data access example
46
Build on our example
• In a static HTML page we would hard code a list of values
47
Build on our example
In a static HTML page we would hard code a list of values
50
First connect to DB2
51
Then run SQL
52
Table detail replaced
53
Page looks eerily familiar…
After
Before
54
Html output (right-click, view source)
55
What happened to the last name?
Changed from bgcolor to class?
56
CSS Class added
• Class starts with period
• Links attributes in external file to page
• Nearly any element can modify page
• Good practice, even for single element
• Studio will highlight bad practices
57
Common questions on data access
• Library list support?
– Single, multiple, job description
• Hard coded user id and password
– Yes, no, maybe---You don’t have to!
• HTML and Data Access, etc.
– MVC and organize your code
• Get started doing something!!!
02/03/
58
Demo time
Jump out and review
Getting started with
PHP and IBM i
Wrap it up!
60
Where do I go next?
• Get some HTML5 & CSS training
– Remember, HTML is to PHP what DDS is to RPG
• JavaScript for grids, etc.
– Can add pizzazz to web pages, but not required
• Download free code – see online resource slide
• Play, have fun, discover
• Education, training more See zend.com
• Practice, practice, practice!
02/03/
61
IBM Redbook SG24-
8185
• Application Modernization
• Tons of great info for…
– DB2
– RPG
– More…
• Chapter 12 by yours truly
• Exhibits same code as
– In line PHP
– Procedural
– Object Oriented
02/03/
62
PHP Resources…
Books
• Sam’s teach yourself PHP, MySQL and Apache All in One (5th edition) ISBN:0672335433
• Head First HTML with CSS and XHTML ISBN:059610197X
• Zend Server Doc at Zend Website
• IBM i Programmer’s Guide to PHP on IBM i – MC Press
02/03/
ATTEND
Become a PHP authority.
Connect with experts.
Register now.
SPEAK
Share, inspire, educate.
CFP open until May 31.
SPONSOR
Spotlight your best in
enterprise PHP.
sponsors@zendcon.com
Visit zendcon.com
64
Online Resources…
• Support?
– Zend.com/forums
– Zend.com/support-center
– Zend.com/products
– php.net – on-line PHP manual
– Midrange.com WEB400 forum
• Free code!
– Sourceforge.net – free applications
– phpclasses.org – free PHP code samples
– hotscripts.com – free PHP code
02/03/
65
Polling Question #3
Did this webinar help?
1. Yes, Can’t wait to move forward with PHP
2. Still evaluating, but will look at PHP
3. Still evaluating but not PHP
4. Not much help
66
Get a jump start on PHP 7
PHP 7 Jump Start – Online Training Course
August 22, 2016
-------------------------------
$299US
REGISTER @ www.zend.com
67
Q&A
www.zend.com
mike.p@zend.com

More Related Content

What's hot

Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
isnull
 

What's hot (20)

Web services on IBM i with PHP and Zend Framework
Web services on IBM i with PHP and Zend FrameworkWeb services on IBM i with PHP and Zend Framework
Web services on IBM i with PHP and Zend Framework
 
PHP on IBM i Tutorial
PHP on IBM i TutorialPHP on IBM i Tutorial
PHP on IBM i Tutorial
 
PHP Batch Jobs on IBM i
PHP Batch Jobs on IBM iPHP Batch Jobs on IBM i
PHP Batch Jobs on IBM i
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
Performance tuning with zend framework
Performance tuning with zend frameworkPerformance tuning with zend framework
Performance tuning with zend framework
 
Browser tools that make web development easier
Browser tools that make web development easierBrowser tools that make web development easier
Browser tools that make web development easier
 
IBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersIBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP Developers
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and more
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's New
 
Zend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZend Core on IBM i - Security Considerations
Zend Core on IBM i - Security Considerations
 
Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and Extending
 
PHP and Platform Independance in the Cloud
PHP and Platform Independance in the CloudPHP and Platform Independance in the Cloud
PHP and Platform Independance in the Cloud
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
Performance tuning PHP on IBMi
Performance tuning PHP on IBMiPerformance tuning PHP on IBMi
Performance tuning PHP on IBMi
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
 
Require js training
Require js trainingRequire js training
Require js training
 
PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015
 
Keep Applications Online
Keep Applications OnlineKeep Applications Online
Keep Applications Online
 
ColdFusion builder plugins
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder plugins
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 

Viewers also liked

Reaction Injection Molding Tooling
Reaction Injection Molding ToolingReaction Injection Molding Tooling
Reaction Injection Molding Tooling
Andrew Hollcraft
 
Was_there_room_for_monetary_discretion_under_the_gold_standard
Was_there_room_for_monetary_discretion_under_the_gold_standardWas_there_room_for_monetary_discretion_under_the_gold_standard
Was_there_room_for_monetary_discretion_under_the_gold_standard
John Phelan
 

Viewers also liked (15)

Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
Mutation testing in php with Humbug
Mutation testing in php with HumbugMutation testing in php with Humbug
Mutation testing in php with Humbug
 
2015 09 23_prezentatsia
2015 09 23_prezentatsia2015 09 23_prezentatsia
2015 09 23_prezentatsia
 
Lean Six SIgma Green Belt
Lean Six SIgma Green BeltLean Six SIgma Green Belt
Lean Six SIgma Green Belt
 
แบบเสนอโครงร่างโครงงานคอมพิวเตอร์
แบบเสนอโครงร่างโครงงานคอมพิวเตอร์แบบเสนอโครงร่างโครงงานคอมพิวเตอร์
แบบเสนอโครงร่างโครงงานคอมพิวเตอร์
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Hub and Spoke Presentation
Hub and Spoke Presentation Hub and Spoke Presentation
Hub and Spoke Presentation
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Турбюро «Компас»
Турбюро «Компас»Турбюро «Компас»
Турбюро «Компас»
 
Keeping up with PHP
Keeping up with PHPKeeping up with PHP
Keeping up with PHP
 
Law Diplom
Law DiplomLaw Diplom
Law Diplom
 
Aims Tutorials Pvt. Ltd.
Aims Tutorials Pvt. Ltd.Aims Tutorials Pvt. Ltd.
Aims Tutorials Pvt. Ltd.
 
Ethics In Education Shankara Narayanan
Ethics In Education Shankara NarayananEthics In Education Shankara Narayanan
Ethics In Education Shankara Narayanan
 
Reaction Injection Molding Tooling
Reaction Injection Molding ToolingReaction Injection Molding Tooling
Reaction Injection Molding Tooling
 
Was_there_room_for_monetary_discretion_under_the_gold_standard
Was_there_room_for_monetary_discretion_under_the_gold_standardWas_there_room_for_monetary_discretion_under_the_gold_standard
Was_there_room_for_monetary_discretion_under_the_gold_standard
 

Similar to Getting started with PHP on IBM i

Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
ADARSH BHATT
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings
10n Software, LLC
 
Microsoft TechDays 2011 - PHP on Windows
Microsoft TechDays 2011 - PHP on WindowsMicrosoft TechDays 2011 - PHP on Windows
Microsoft TechDays 2011 - PHP on Windows
Enterprise PHP Center
 

Similar to Getting started with PHP on IBM i (20)

Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
A Tale of Two Toolkits
A Tale of Two ToolkitsA Tale of Two Toolkits
A Tale of Two Toolkits
 
What's new with Zend server
What's new with Zend serverWhat's new with Zend server
What's new with Zend server
 
Ria Applications And PHP
Ria Applications And PHPRia Applications And PHP
Ria Applications And PHP
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for Eclipse
 
Zend Server - OSI Days
Zend Server - OSI DaysZend Server - OSI Days
Zend Server - OSI Days
 
Uvod u php - Danilo Purić i Tarik Zaimović
Uvod u php - Danilo Purić i Tarik ZaimovićUvod u php - Danilo Purić i Tarik Zaimović
Uvod u php - Danilo Purić i Tarik Zaimović
 
High performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings
 
UDG - PHP osnove
UDG - PHP osnoveUDG - PHP osnove
UDG - PHP osnove
 
Zend Framwork presentation
Zend Framwork presentationZend Framwork presentation
Zend Framwork presentation
 
Zend Framwork configurations
Zend Framwork configurationsZend Framwork configurations
Zend Framwork configurations
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
Microsoft TechDays 2011 - PHP on Windows
Microsoft TechDays 2011 - PHP on WindowsMicrosoft TechDays 2011 - PHP on Windows
Microsoft TechDays 2011 - PHP on Windows
 
green
greengreen
green
 
Php unit i
Php unit i Php unit i
Php unit i
 

More from Zend by Rogue Wave Software

More from Zend by Rogue Wave Software (20)

Develop microservices in php
Develop microservices in phpDevelop microservices in php
Develop microservices in php
 
Speed and security for your PHP application
Speed and security for your PHP applicationSpeed and security for your PHP application
Speed and security for your PHP application
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Building web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend ExpressiveBuilding web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend Expressive
 
To PHP 7 and beyond
To PHP 7 and beyondTo PHP 7 and beyond
To PHP 7 and beyond
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
 
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
 
Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)
 
Middleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.xMiddleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.x
 
Ongoing management of your PHP 7 application
Ongoing management of your PHP 7 applicationOngoing management of your PHP 7 application
Ongoing management of your PHP 7 application
 
Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7
 
The Docker development template for PHP
The Docker development template for PHPThe Docker development template for PHP
The Docker development template for PHP
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloudDeploying PHP apps on the cloud
Deploying PHP apps on the cloud
 
Data is dead. Long live data!
Data is dead. Long live data! Data is dead. Long live data!
Data is dead. Long live data!
 
Optimizing performance
Optimizing performanceOptimizing performance
Optimizing performance
 
Resolving problems & high availability
Resolving problems & high availabilityResolving problems & high availability
Resolving problems & high availability
 
Developing apps faster
Developing apps fasterDeveloping apps faster
Developing apps faster
 
Continuous Delivery e-book
Continuous Delivery e-bookContinuous Delivery e-book
Continuous Delivery e-book
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Getting started with PHP on IBM i

  • 1. Getting started with PHP on IBM i Mike Pavlak Solution Consultant mike.p@zend.com
  • 2. 3 Audience • Are you looking to learn more about the what & how of PHP on IBM i? • Have you done some PHP but new to IBM i? • Are you already doing PHP but Looking for product refresh? • Might you be looking to grow beyond PDM/RPG?
  • 3. 4 Agenda • The Five Steps… 1. Understand the PHP universe 2. Understand the “stack” on IBM i 3. Install Zend Server 4. Install Zend Studio 5. Get productive!
  • 4. Getting started with PHP and IBM i Understand the PHP universe
  • 5. 6 PHP is a scripting language • PHP Hypertext Pre-Processor • Developed initially by Rasmus Lerdorf in 1994: PHP/FI • Zeev Suraski and Andi Gutmans Contributing since1997+ (ZEev + aNDi = Zend) • Interpreted, not compiled • Forgiving and intuitive code structure (short learning curve) • Immediate feedback during development • PHP is to Java what RPG is to COBOL
  • 6. 7 Who is Zend? • Major contributor to PHP (4 FTE’s contribute to Open Source) • Providers of supported PHP distribution, Zend Server • Providers of commercial tooling for PHP, Zend Studio, Guard
  • 7. 8 Zend and IBM • Partnership began in 2005 • Zend selected by IBM to deliver PHP on IBM i • Zend solutions shipped with IBM i 7.1, 7.2 and 7.3! • Just install the LP and go! • Most current distributions and updates at Zend.com • Relationship expanded in 2012 to include MySQL (Maria coming soon)
  • 8. 9 What do we get? • Thanks to our partnership with IBM, each IBM i customer under SWMA can take advantage of these Zend solutions: – Zend Server for IBM i basic edition – Runs natively on IBM i as a licensed program – Zend Studio for IBM i – IDE runs on desktop for creating PHP scripts – One year of updates and support. – Studio is a perpetual license while Server will need to be annually Zend Sales support
  • 9. 10 The “Stack” • Tested, business ready and supported distribution of PHP • Runs in Native Environment under PASE, no LPAR needed • Home base for PHP modules like GD, PEAR, etc. • Browser based admin console (10081) • Accessible immediately after install • Let’s look at the architecture of the stack • And then installation on IBM i • No charge LP Included with system maintenance
  • 10. 11 Polling Question #1 (check all that apply) What would you like to modernize? 1. Green screen ERP, etc. to GUI 2. Mobile 3. Business intelligence/data mining/reporting 4. Customer/supplier self service 5. Collaboration 6. Other 7. No needs, yet
  • 11. Getting Started with PHP and IBM i Zend Server for IBM i
  • 13. 14 What Is Zend Server? • Production quality PHP stack – PHP, ZF, DB connectivity, debugging extension, and more • Three Editions – No charge “Basic Edition” provided by IBM & Full Professional and Enterprise commercial edition – All are production ready • Application monitoring and diagnostics (integrated with Zend Studio) • Multi-level performance enhancement capabilities • Software updates and security hot fixes • Easy and quick installation • Zend Framework Integration
  • 14. 15 Zend Server Zend Server Under the Covers HTTP:10080 Apache Server (FastCGI) IBM i i/OS DB2 UDB PHP CGI PHP file PASE *PGM CMD ILE Apache:10080 • Default configuration FastCGI URL Request HTML/response MySQL, SQL Server, Oracle Thanks Tony!
  • 15. Getting started with PHP and IBM i Installing Zend Server
  • 16. 17 Software Pre-req's Description Product Option Licensed Program -------------------------------------- --------------- ---------------- Portable App Solutions Environment 33 57XXss1 Qshell 30 57XXss1 System Openness Includes 13 57XXss1 IBM Portable Utilities For I5/OS *base 5733sc1 OpenSSH ,OpenSST,Zlib 1 5733sc1 Please read the Installation Guide !!! Make sure they match your release! Except 7.3
  • 17. 18 Install Zend Server • Prerequisites: – See Zend Server installation documentation for LP’s! – Supported releases: i7.1, i7.2 and i7.3 – Recent Cumulative PTF package, PASE, Qshell, Group for HTTP • Software installation – Logon with *SECOFR authority (QSECOFR for MySQL for best results) – Upload *SAVF, Restore, and start coding! – Clean installation can start the stack automatically • Bonus ZendDBi – MySQL 5.1 can be installed at the same time or later
  • 18. 19 Best place to get it: Zend.com http://www.zend.com/en/products/server/downloads#IBM%20i
  • 19. 20 Updates on same page, scroll down… https://www.zend.com/en/products/server/downloads#IBM%20i
  • 20. 21 Polling Question #2 What version of PHP are you running? 1. PHP 5.2 (Zend Core, Zend Server 5) 2. PHP 5.3 (Zend Server 5-6) 3. PHP 5.4 (Zend Server 7) 4. PHP 5.5 (Zend Server 7-8) 5. PHP 5.6 (Zend Server 8) 6. Not running PHP, yet
  • 21. 22 Why older versions? • Simple, Long Term Support
  • 22. 23 Start/stop Zend Server, MySQL, etc...  Type GO ZENDSVR6/ZSMENU, Option 5 then 1
  • 23. 24 Zend Server Configuration • Only two interfaces! – Use http://ibmiserver:2001 to administer IBM HTTP server – Use Zend Admin for Zend/PHP options http://ibmiserver:10081
  • 24. 25 Zend Server Port Change? • Default proxy points to Port 10080 – Log in to IBM Admin Server and open up ZENDSVR6 – Go to General Server Configuration – Click Apply & restart the server Copyright © 2009 Zend Technologies, Inc, All rights reserved 02/03/|
  • 25. 26 Deploy samples and demo • Click guide page & scroll down to XML Toolkit • Click link to install XML Toolkit demo application to deploy samples… • Simple wizard, accept default, enter path and go…
  • 27. 28 Z-Ray for 30 days! • Firebug for PHP!
  • 28. 29 Zend Server php.ini changes Manage php.ini via GUI in Zend Server • Log in with initial password, can reset in green screen Server Setup  Directives • Administer all values in php.ini • Include path is one of over 400 options
  • 29. 30 Zend Support • Included with Basic edition for 1 year • Upgraded support (phone) can be purchased from Zend • Support contract includes productivity tools and Z-Ray! • Log in to My Zend at zend.com
  • 30. Getting started with PHP and IBM i Install Zend Studio
  • 31. 32 Zend Studio 13.5 for all! • Included for IBM i customers w/1 year support & upgrades • Essential IDE for PHP on IBM i • Syntax checker & code Completion • JavaScript Library Support • Debugger • Built on Eclipse framework • Function directory • Templates • Much, much, more
  • 32. 33 Zend Studio - Installation • Download program from Zend.com (Not shipped with OS) • Install to workstation (Mac, Windows, Linux) • Follow the prompts for licensing the product, QSRLNBR
  • 33. 34 Remote Server Options • FTP – Familiar – Sluggish – Most systems support this, but potentially dangerous • SSH – More secure – More powerful – Easy to setup – Easier to setup on i6.1+
  • 34. 35 Configuring a remote server • Start Zend Studio & open “Remote Systems” window • Windowshow viewRemote Systems • Click the new connection button and select SSH • Enter system name or IP address
  • 35. 36 Navigate to files • Expand the tree for your system (triangle twisties) • Enter user credentials and your in! • Navigate to the directory /www/zendsvr6/htdocs
  • 36. 38 |
  • 37. Getting started with PHP and IBM i Get Productive
  • 38. 40 Sample Script – Hello World • Obligatory program when starting out • Confirms correct setup of PHP • Sample code: (Shortest PHP Macro around!) • Save script in IFS /www/zendsvr6/htdocs/helloworld.php • Browser URL: http://ibmisystem:10080/helloworld.php
  • 39. 41
  • 40. 42 Open Source Toolkit – Collaborative project with IBM and Zend – Built using ILE RPG, Stored procedures and PHP – Object Oriented, but not too much Set parameters based on function Call program Output results I / O L e n g t h C o m m e n t V a r n a m e I n i t v a l
  • 41. Getting started with PHP and IBM i DB2 data access example
  • 42. 46 Build on our example • In a static HTML page we would hard code a list of values
  • 43. 47 Build on our example In a static HTML page we would hard code a list of values
  • 47. 53 Page looks eerily familiar… After Before
  • 49. 55 What happened to the last name? Changed from bgcolor to class?
  • 50. 56 CSS Class added • Class starts with period • Links attributes in external file to page • Nearly any element can modify page • Good practice, even for single element • Studio will highlight bad practices
  • 51. 57 Common questions on data access • Library list support? – Single, multiple, job description • Hard coded user id and password – Yes, no, maybe---You don’t have to! • HTML and Data Access, etc. – MVC and organize your code • Get started doing something!!! 02/03/
  • 52. 58 Demo time Jump out and review
  • 53. Getting started with PHP and IBM i Wrap it up!
  • 54. 60 Where do I go next? • Get some HTML5 & CSS training – Remember, HTML is to PHP what DDS is to RPG • JavaScript for grids, etc. – Can add pizzazz to web pages, but not required • Download free code – see online resource slide • Play, have fun, discover • Education, training more See zend.com • Practice, practice, practice! 02/03/
  • 55. 61 IBM Redbook SG24- 8185 • Application Modernization • Tons of great info for… – DB2 – RPG – More… • Chapter 12 by yours truly • Exhibits same code as – In line PHP – Procedural – Object Oriented 02/03/
  • 56. 62 PHP Resources… Books • Sam’s teach yourself PHP, MySQL and Apache All in One (5th edition) ISBN:0672335433 • Head First HTML with CSS and XHTML ISBN:059610197X • Zend Server Doc at Zend Website • IBM i Programmer’s Guide to PHP on IBM i – MC Press 02/03/
  • 57. ATTEND Become a PHP authority. Connect with experts. Register now. SPEAK Share, inspire, educate. CFP open until May 31. SPONSOR Spotlight your best in enterprise PHP. sponsors@zendcon.com Visit zendcon.com
  • 58. 64 Online Resources… • Support? – Zend.com/forums – Zend.com/support-center – Zend.com/products – php.net – on-line PHP manual – Midrange.com WEB400 forum • Free code! – Sourceforge.net – free applications – phpclasses.org – free PHP code samples – hotscripts.com – free PHP code 02/03/
  • 59. 65 Polling Question #3 Did this webinar help? 1. Yes, Can’t wait to move forward with PHP 2. Still evaluating, but will look at PHP 3. Still evaluating but not PHP 4. Not much help
  • 60. 66 Get a jump start on PHP 7 PHP 7 Jump Start – Online Training Course August 22, 2016 ------------------------------- $299US REGISTER @ www.zend.com