Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kevin Schroeder:
Monitoring Magento Jobs and Crons
Jul 20, 2018 @ 14:34:37

Kevin Schroeder has a post to his site sharing some helpful tips for monitoring Magento jobs and crons to help provide a bit more information about the job and its current state.

About a month ago a client of mine was lamenting the fact that they didn’t have insight into what was going on with their cron jobs. So I did what any idiot would do and built out a service that does just that. It works with any Magento version, 1 or 2, system crons, and you can use an API to integrate it with your own system with a very minimal amount of work. I call it the 10n Job Health Vault. With Magento 1 or 2 you can have it set up and running in under 5 minutes (minus DI compilation time, of course).

The tool tracks the execution of the job and notifies you if something's wrong and it hasn't finished. This also means it can track the execution time and report back if it's slower than usual. You can find out more information about this Magento monitoring tool on its website.

tagged: magento cron job execution monitor service

Link: https://www.eschrade.com/page/monitoring-magento-jobs-and-crons

SitePoint PHP Blog:
How to Fix Magento Login Issues with Cookies and Sessions
May 21, 2018 @ 16:30:01

On the SitePoint PHP blog there's a new tutorial posted showing how to fix Magento login issue with cookies and sessions. This issue can cause a redirect loop but can be fixed.

In this article are looking at how Magento cookies can create issues with the login functionality of both the customer-facing front-end and admin back-end, the reason it occurs and how it should be resolved.

This is also known as the looping issue, as the screen redirects itself to the same screen, even though the username and password is correct.

The post starts with some basic definitions of "cookie" and "session" and gets into more detail on how Magento stores sessions and the places it can store them. The tutorial then covers each of the cookies used and three reasons the login issues might be happening:

  • Cookie domain does not match server domain
  • Multiple subdomains used and Magento’s cookie configuration is incorrect
  • Double front-end cookies causing intermittent login issues

For each several solutions are included with any code or SQL changes that need to happen to correct it.

tagged: magento tutorial fix login issue cookie session

Link: https://www.sitepoint.com/fix-magento-login-issues-cookies-sessions/

Voices of the ElePHPant:
Interview with TJ Gamble
May 09, 2018 @ 17:15:33

The Voices of the ElePHPant podcast, hosted by community member Cal Evans, has posted their latest interview with a member of the PHP community. In this latest show Cal talks with TJ Gamble, a self-professed "Ecommerce-Aholic" and Top 50 Magento contributor.

In the episode Cal and TJ are at Magento Imagine 2018 and talk about why TJ comes to the conference and the Magento community. They also talk about some of the recent updates to the Magento project.

You can listen to this latest episode either using the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to follow them on Twitter and subscribe to their feed to get updates when new shows are released.

tagged: voicesoftheelephpant podcast interview tjgamble magento

Link: https://voicesoftheelephpant.com/2018/05/08/interview-with-tj-gamble/

Michaelangelo van Dam:
Testing your e-commerce PHP application
May 02, 2018 @ 15:10:45

Michelangelo van Dam has a new post on his site sharing some helpful hints you can use to test your e-commerce application, be it WooCommerce or other popular PHP-based e-commerce packages.

I'm participating (as much as possible) in the #30daysoftesting challenge organised by Ministry of Testing and SauceLabs. If you're interested, read the full 30 Days of E-Commerce Testing article and join this fun and educational challenge.

The 2nd challenge on the list was to read and share interesting blog articles about E-commerce testing. Since I'm working as a PHP professional I thought it would be great if I oriented my focus on testing PHP based E-commerce platforms. I picked WooCommerce as it's an easy to install and use E-commerce solution. For Magento, PrestaShop and others I've added useful links at the bottom of this article.

He then gets into the details of WooCommerce and what it has available from a testing perspective. He also includes links to a few resources for more general WordPress testing too. The remainder of the post consists of links to more information about testing the other popular e-commerce packages: Magento, PrestaShop, OpenCart, Sylius and Laravel-based packages.

tagged: testing ecommerce application woocommerce magento prestashop

Link: https://www.dragonbe.com/2018/05/testing-your-e-commerce-php-application.html

php[architect] Podcast:
Episode 4: Modern Magento
Dec 07, 2017 @ 17:25:52

The php[architect] podcast, hosted by PHP community members Eric van Johnson and John Congdon, has posted their latest episode today: Episode 4 - Modern Magento.

In this episode, we dive into the November 2017 issue and how to use Magento as your ecommerce platform.

Topics covered include debugging, contributing to Magento, payment gateways and headless applications. Oscar Merida and Eric Mann also stop in to talk about development environments and PCI-DSS. You can listen to this latest episode either using the in-page audio player or by downloading the show directly for listening at your leisure. If you enjoy the episode, be sure to subscribe to their feed to get updates when new shows are released.

tagged: podcast phparchitect magento ep4 november2017 issue

Link: https://www.phparch.com/podcast/episode-4-modern-magento/

php[architect]:
November 2017 Issue Released - Modern Magento
Nov 07, 2017 @ 17:30:20

php[architect] magazine has released their latest issue - the November 2017 edition, "Modern Magento".

Articles in this month's issue include:

  • 11 Debugging Tricks in Magento by Sergii Kovalenko
  • Editing the Magento Core For Fun and Profit by Joshua Warren
  • Command and Query API Design in Magento 2 by Igor Miniailo
  • Headless and Serverless: Writing Modern PHP Applications by Eugene Tulika

All of the usual columns are returning too including the "Education Station", "Community Corner" and "Artisanal". This month's issue is completely free to give you an idea of what kind of content you can expect from the magazine. You can pick up a copy of your own (or subscribe for the year) over on the php[architect] site.

tagged: phparchitect magazine november2017 modern magento issue release

Link: https://www.phparch.com/magazine/2017-2/november/

Kevin Schroeder:
Magento 2 Performance on Docker (a preliminary test)
Aug 14, 2017 @ 14:58:17

Kevin Schroeder has a post to his site sharing some of the results from his initial testing with Magento in a Docker-built environment.

I can’t speak to the cost of Docker experts (I’m not one, but my experience is that once you get through the annoyance of the Dockerfile it doesn’t require much more advanced knowledge than a regular sysadmin), but I found the response interesting because my experience with Docker in production has been so good that I’ve Dockerized practically everything, including this blog. But this guy knows his stuff, and I give a lot of weight to his perspective. But my experience has been different.

Except in one place. Magento 2 on Docker on Mac is a horrible experience and it is specifically because of file system performance. But on Linux I’ve had good experiences. However, those experiences were with Magento 1 and not Magento 2. Magento 2 relies on the file system more than Magento 1 so it is quite plausible that Magento 2 is slow as molasses on Docker.

He decided that he'd try a different platform and see if the results were similar to those on an OSX system. He includes a list of four caveats and the setup including the fact that it is a "smoke test" (prelimary results) and that the rest was being done on a bit older machine. He shares the testing setup and what he used to test and compares the results to it running on "bare metal" (a normal custom setup server). His findings show that the "bare metal" instance ran only slightly better than the Dockerized version. He includes graphs for the requests handled, CPU usage and throughput from each of the tests executed.

tagged: magento docker performance testing results

Link: http://www.eschrade.com/page/magento-2-performance-on-docker

Fabian Schmengler:
Collection Pipelines in PHP
Dec 28, 2016 @ 18:24:24

In a new post to his site Fabian Schmengler has written up an introduction to collection pipelines and how it could be applied to a Magento-based environment.

If you read the book “Refactoring to Collections” or saw screencasts and talks by Adam Wathan about collection pipelines, but do not work with Laravel, you might have asked yourself how to apply these techniques to other PHP applications, for example Magento.

[...] This is very similar to Unix pipes, where the individual commands are the operations, and the lines passed through input and output stream, the collection.

He starts by illustrating the idea in Bash and Ruby, showing the three main types of collection operations: map, filter and reduce. He talks about the advantages these methods have over traditional looping and what kind of value they can provide in both Laravel and plain old PHP. He illustrates the PHP-only versions using the array_filter, array_map and array_reduce functions and some thoughts on when it's good to use them over normal looping (and when it's not). He then gets into the Magento-specific handling and making use of a package to handle collections: Knapsack. He shows how to use the library to work with collections and, as another option, a "home-grown" version that lives in a single class. The post wraps up with the Magento integration of this functionality, a brief mention of functional programming and "the hard part" of issues with debugging.

tagged: collection pipeline package knapsack magento integration tutorial introduction map reduce filter

Link: https://www.schmengler-se.de/en/2016/12/collection-pipelines-in-magento/

Magium Blog:
3 Best Practices for Selenium Testing when Constructing Your Page
Feb 17, 2016 @ 15:55:26

In a new post to the Magium site Kevin Schroeder shares three helpful tips you can use for the Selenium testing of your application based on some of his recent development on the project.

Having spent now about two months building out Magium there are a couple of things that are worth sharing as I’ve been working through several different versions of Magento. These practices (best practices?) may or may not be “officialized” by the Overlords of the Internet but what I have found is that I have the most trouble when these practices are not executed.

The basic premise behind each of these is that the quickest path to the most specific element is best.

His three tips avoid things like long XPath expressions to locate single items and favor consistency and simplicity:

  • Wrap ALL text in an HTML element – leave no orphaned text
  • If an element has function, identify it.
  • Group data using classes and IDs

He ends the post with a reminder that a well-structured page not only helps with testing but is also a good goal to strive for related to maintainability.

tagged: selenium testing magento tips top3 structure

Link: http://magiumlib.com/blog/3-best-practices-for-selenium-testing-when-constructing-your-page/

Kinsta Blog:
The Definitive PHP 7.0 & HHVM Benchmark
Dec 09, 2015 @ 15:07:44

On the Kinsta blog Mark Gavalda has shared their latest PHP 7 versus HHVM benchmarks now that the first official stable release of PHP 7 has been unleashed for public consumption. They opted for testing with a large variety of tools and software rather than simple benchmarking scripts to give a more "real world" look at the difference between the two.

To see how much of an improvement we can expect from this new PHP interpreter we put the public release version of PHP 7.0 to test and compared a couple of popular software suites’ performance using PHP 5.6.16, PHP 7.0 and HHVM 3.10.1 on a bare metal server (so virtualization doesn’t interfere with the results). Tested software includes WordPress 4.3.1, Drupal 8, Magento 2.0 CE, OctoberCMS build 309, PyroCMS v3 beta2, and Flarum v0.1.0-beta.4.

The basic tl;dr of the post is that HHVM still performs better for all of the software tested but PHP 7 is not too far off on some of them. They share the specifications of the machine (bare metal) they used for testing and get into the results for each of the seven pieces of software tested. Their results are in transactions per second and both graphed and numeric results are shown. Unfortunately, though, the Flarum software had to be kept on a "pending" list as it doesn't run on either PHP 7 or HHVM properly.

tagged: hhvm php7 benchmark popular software wordpress drupal magento octobercms pyrocms flarum

Link: https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/


Trending Topics: