Community PHP is Open for Business - Alan Seiden - Seiden Group
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
Alan Seiden Principal, Seiden Group Mentors CIOs & development teams Deliver modern technical solutions Open Source Advocate Co-developer of PHP Toolkit for IBM i Founder of Club Seiden community Host/Sponsor, CIO Summit
Open Source Experts Develop web/mobile apps Support PHP, including CommunityPlus+ Train developers: open source & IBM i PHP APIs Git Node.js Db2 Python seidengroup.com
Giving back to the community w Free CIO Summit events and conference presentations w IBM i PHP Toolkit w Contributed to the original Zend Framework w As we make fixes to PHP components, we give back to the community w Ibm_db2 w PDO_IBM w Many others w Unit tests for high quality (100% pass with ibm_db2)
Web apps and APIs w PHP: bringing web applications to IBM i since 2005-6 w Award-winning applications across all industries w Access your Db2 data, RPG code, and more w PHP Toolkit helped compatibility and integration w Web services and APIs w First taste of calling external APIs from IBM i w Credit card payments… Salesforce… many more w Converting green screens to web
Use PHP from RPG, CL w PHP can be called from CL and RPG too! w Software development kits (SDKs) often written in PHP w Control flow from traditional RPG w Use PHP power to access APIs, payment gateways, create spreadsheets, graphics
Wordpress and content management w Community and conference sites w Wordpress.. beyond blogs.. Star Wars site, more!
PHP on IBM i timeline w 2004 Alan needed PHP on “i5”! w i5php.net—Rob Ward’s site w 2006 Zend Core—IBM shipped in its DVDs w Zend Platform paid add-on w 2008-9 Zend Server w No-cost OSS + admin pages + paid add-ons bundled w Basic / Professional / Enterprise licenses w 2019 RPM-based open PHP begun w Includes ODBC again, now in 64 bits
PHP in 2020-21: What’s NEW w PHP is going “Open” with industry-standard RPM format, 64-bit, installable with YUM w Initiated by IBM and Zend in 2019 w Seiden CommunityPlus+ in 2020 w Zend Server “Basic” license withdrawn by June 2021 w Professional/Enterprise still available for purchase w Open PHP (e.g. CommunityPlus+) fills the gap
More about CommunityPlus+ PHP w Quick to install and upgrade w Lightweight—but has what you need w Db2 connectivity: w Choice of ibm_db2, PDO_ODBC, PDO_IBM, and odbc w Supports all the PHP frameworks w Laminas (formerly Zend Framework) w Laravel, others w Support available w “These PHP RPMs make my heart happy. This PHP is similar to what I’m used to in Linux.”—young developer
PHP and MySQL • PHP and MySQL are foundations of WordPress and many internet sites • MariaDB is a good substitute for MySQL • These run on most platforms, including IBM i
Good news for MySQL users • In TR3/TR9, IBM will deliver MariaDB (drop-in replacement for MySQL) via Yum • See announcement here: • https://www.ibm.com/support/pages/ibm-i-73-tr9- enhancements
GRAR case study w Public site based on WordPress on IBM i that calls RPG stored procedures w http://www.grar.com/
GRAR uses WP for portal • WP provides marketing site, themes, good look • Custom PHP code included in key pages
Custom PHP used by GRAR • Security/access to pages • Calling RPG stored procedures for heavy logic • Live demo (if time)
IBM’s Open Source Commitment
Open source was in IBM’s plan w IBM i Chief Architect Steve Will offers strategic direction to CIO Summit guests in 2018
IBM built framework for open source w Over the last few years, faster and better! w Yum command for easy installation w RPM package manager w https://en.wikipedia.org/wiki/RPM_Package_Manager w Access Client Solutions to manage with a GUI
Why RPM your PHP?
Quick installation w Minutes instead of hours w No FTP’ing, unzipping, SAVFs w Industry-standard Yum command w Same as other current IBM i open source w Standard IBM /QOpenSys/pkgs location w Quick upgrades w yum update w Gain even more speed by automating / scripting the installation w Customization for your country/user base is possible
Flexible installation w Choose or w Existing Apache and FastCGI configs still work! w Multiple web server instances for different workloads w Test in parallel with existing Zend Server w Install multiple versions via chroot
More bits = more data without errors w RPM PHP is 64-bit, while previous PHP was 32-bit w (as of October 2020) w What does that mean? w More memory, no more memory dump errors w Good-bye, “LDR_CNTRL” memory hack!
This has what you want in PHP w PHP 7.4 and counting w Some community PHP repos were missing some of the extensions that were bundled in Zend Server….“We rebuild them!” w Seiden Group maintains “missing” modules w 64-bit Ibm_db2, Ldap, Zip, Imagick, ssh2, intl w mail() with standard sendmail Also, CommunityPlus+… w Installs PHP Toolkit w Provides digitally signed RPMs (security) w Sets optimized .ini settings for IBM i
CommunityPlus+ Compatibility w Compatible with other community PHP offerings w Use yum to update and install from CommunityPlus+ or others w We use all standard, open source components. Nothing proprietary w Gives you options (no lock-in)
Ready for Business
Business-Ready Open Source w Seiden CommunityPlus+ packages: w Digitally signed for security w https://www.seidengroup.com/2020/07/23/rpm-package-signing/ w Updated frequently, along with PHP’s own schedule w Available in multiple modern versions (7.3 and 7.4 today) w Supported by Seiden Group’s PHP experts w Quick, accurate advice and fixes
PHP 7 and CommunityPlus+ Performance Benchmarks
PHP 7 Faster than PHP 5.x w Spurred by competition with Facebook’s “Hack” w Noticeable speedup on large sites—pages “pop”
Upgrading from PHP 5.6 to PHP 7 w New features in 7.x: w https://www.php.net/manual/en/migration70.new-features.php w Your code should “just work” with a few exceptions w https://www.seidengroup.com/2017/07/24/resources-for- upgrading-to-php-7-on-ibm-i/ w Old MySQL code using the mysql_* functions should be updated to mysqli_* (“IMySQL Improved”) or PDO w Old regular expression syntax “ereg()” was removed w RPM upgrade to PHP 7: uses path /QOpenSys/pkgs/bin/php
PHP 7.4 w Faster than PHP 7.3 out of the box w A good step toward PHP 8.0 w Also an opcache improvement w Opcache.preload w opcache_compile_file($path) pre-compiles scripts w “Warms up” the opcache upon web server restart w Try it with large frameworks w https://wiki.php.net/rfc/preload w Language updates: w https://www.php.net/releases/7_4_0.php
PHP 8.0 w WHEN: w Targeted for late 2020 w Release Candidate 3 is available w WHAT: w Just In Time (JIT) compiler w Execute compiled code directly on hardware rather than in VM w May help CPU-bound applications w Expect modest performance improvements w https://thephp.website/en/issue/php-8-jit/
Benchmark performance test https://github.com/vanilla-php/benchmark-php
Performance results (first pass) With all extensions turned off, for apples-to-apples comparison Note: real-world results can always differ from synthetic benchmarks
Let’s Install PHP!
Install PHP using Yum and ACS w If you opted in when you registered for this webinar, we will send you detailed instructions and links w We recommend SSH to get into PASE w STRTCPSVR *SSHD w Industry-standard: younger developers will thank you (install the bash shell for them!) w Open source PASE-based software works best in SSH
ACS Open Source Package Management w IBM i SSH server service must be running on port 22
Open Source Package Management (ACS) w Log in with a QSECOFR or *ALLOBJ level user
Open Source Package Management w You may receive these prompts. Just say Yes !
Open Source Package Management w All is working if you see a list of packages !
Install PHP using Yum (continued) w The yum command: w yum install php-* w TIP: Your user profile must have *ALLOBJ to install via Yum w Set up Apache web server w CommunityPlus+ has a utility to set up a new Apache server automatically w You can create more than one! Dev/test/production w Runs in parallel with Zend Server for easy testing w Or reuse existing PHP Apache instances
Configuration tips
FastCGI configuration w FastCGI prestarts PHP jobs for fast web sites w Minimal contents of fastcgi.conf (in /www/myserver/conf/): w Server type="application/x-httpd-php" CommandLine="/QOpenSys/pkgs/bin/php-cgi" StartProcesses="1” w IpcDir /www/myweb/logs w Additional/optional keys: w How many PHP jobs to start w SetEnv="PHP_FCGI_CHILDREN=20" w How long to wait before a 408 timeout w RequestTimeout="60"
Nginx alternative to Apache w nginx web server w Flexible alternative to Apache w Allows automated setup, including of SSL (no DCM) w Nginx works well with alternate FastCGI called php-fpm w Advanced option for open source gurus (popular on Linux) w How to install w ‘yum install nginx’ or via ACS
Simple editing of PHP INI settings w Php.ini settings w Edit .INI settings directly without messing anything up w /QOpenSys/etc/php.ini and /QOpenSys/etc/conf.d/ w Edit php.ini directly using EDTF / your favorite editor / vim J w Then restart web server and go! w Example: date.timezone w https://www.php.net/manual/en/timezones.php w date.timezone = America/New_York
Update easily and often
Easy updates using Yum w Use the yum command: w yum update w Or ACS “Updates available” tab
I would like security release PHP 7.4.11
“yum update” command provides!
New security update unlocked! Installing PHP can be this easy!
Services and Support
We fully support CommunityPlus+ w Installation and migration assistance w Make it easy! w Free community Q&A w Ryver (https://ibmioss.ryver.com) w IBMiOSS midrange.com list (https://archive.midrange.com/opensource) w Seiden Group support SLAs for production break/fix and developer support w Seiden Group experts with a passion for PHP and IBM i
Migration to CommunityPlus+ PHP w Work with your team to install from Seiden repository w Dev and production servers w Configure and ensure you have all needed extensions w Review current settings—timeouts for calling APIs etc, optimize w Parallel testing with previous version—including performance w Code conversion as needed w ibm_db2 to ODBC conversion if you prefer ODBC w Any updates for compatibility with PHP 7.x w Ensure toolkit calls w Installation and config of ODBC on the IBM i, if needed
Production Support for CommunityPlus+ PHP w UPTIME: Have confidence in uptime with 24x7 break/fix production support for PHP, Apache, toolkit, etc. on production IBM i server w We handle all issues, including: w Web server will not start w Issues after upgrades w Database or toolkit connectivity issues w Monitoring, proactive support and advice, free upgrade service within a minor version of PHP
Dev Server Support for IBM i PHP w Development server support for PHP and environment w Test in advance of general release, or request special components w Regular business hours or by arrangement w Refine developer environment that may be hindering productivity w Use screen share, calls, teleconferences w Configuration and setup questions w Reseller partner arrangements available
Linux and Windows Environment Support w Developer Support, business hours or by arrangement w “Call-a-friend” for advice and guidance w Some included discussion topics: w Git workflow w Automation w Faster onboarding of new developers - centralized configuration w Linux admin commands and advice w A growing area for development - save time, get better and better with our Linux and Windows environment expertise
Consulting, Training, web/API Development w API strategy -- RPG and PHP w Integration with Salesforce/Mulesoft/credit card processing etc. w Training/mentoring for IBM i developers in modern PHP skills and frameworks -- ILE to PHP in baby steps w Staff augmentation and app development w Performance optimization and scalability w Executive IT coaching / business synergy w IBM i, open source, Db2, RPG…
Reseller Partnerships w Designed for software developers and consultants w Seiden Group support for you and your customers w Choice of basic support or 24/7 if your client needs additional PHP or other support for their own development initiatives w Special builds customized for your client base, software packages, or region w Technical support for your team w You may identify/brand the support and distributions as your own or along with Seiden Group branding (your choice) w Special pricing to make the arrangement feasible and profitable for you
Contact | Stay in Touch Alan Seiden Seiden Group Open Source Support and CommunityPlus+ PHP Ho-Ho-Kus, NJ alan@seidengroup.com 201-447-2437 twitter: @alanseiden Stay in Touch: seidengroup.com/tips
You can also read