PHP

Discover what PHP can do.

Creating a Docker Container for a Legacy PHP 5.6 System with SSL on Apache

Hello, developers! Today’s blog post is a special one for those working on legacy systems. We’re going to walk through creating a Docker container for a legacy PHP 5.6 application, complete with Apache and self-signed SSL certificates. Perfect for local development environments where you need to keep older systems up and running securely. Let’s get… Read more Creating a Docker Container for a Legacy PHP 5.6 System with SSL on Apache

How SOLID is the STRATEGY PATTERN?

STRATEGY PATTERN In a strategy pattern the main value is in being able to switch out different algorithms for different situations. Imagine that you had an application component that renders graphs for a website depending on what kind of device made the request. The application code could detect the type of browser and then use… Read more How SOLID is the STRATEGY PATTERN?

operator not supported for strings slider_markup_init.php [SOLVED]

This error comes from an older version of the   WordPress LayerSlider plugin after an upgrade to PHP 7. In case you are unable to upgrade your LayerSlider plugin, or do not wish to,  here is a patch to fix the issue. Don’t worry it’s pretty easy.  : ) How to resolve error: operator not supported… Read more operator not supported for strings slider_markup_init.php [SOLVED]

Resolve Website Issues After PHP upgrade 2017 [SOLVED]

Site Issues after upgrading PHP After upgrading to PHP 7, you may notice that your site is having issues. For example on a WordPress site, certain plugins will be disabled and you will see messages stating that certain PHP modules are missing. eg. requires the function mb_detect_encoding to import and export CSV files …currently has… Read more Resolve Website Issues After PHP upgrade 2017 [SOLVED]

PHP: Dynamically refer to an object property

Sometimes you may need to programmatically determine which property of an object you would like to call. Are you trying to dynamically refer to an object property? In order to do this, you need to get past an issue with ambiguity. The PHP documentations says: …if you write$$a[1] then the parser needs to know if you… Read more PHP: Dynamically refer to an object property

PHP Find php.ini and edit configuration settings from command line

Manipulating the PHP ini file from the command line is really quite straight forward. To get yourself started on the command line, just ask PHP for help like this: pauL ⨊ $ php -help You’ll see a list of options and arguments. From the php help output one can see that the -i option will show… Read more PHP Find php.ini and edit configuration settings from command line

PHP What is Opcode Cache and When to Use it

Are you wondering: What is Opcode Cache and When to Use it? I just read an excellent article entitled PHP Performance I: Everything You Need To Know About OpCode Caches published by Engine Yard. The article is a transcript of a video on PHP opcode cache, actually. Engine Yard goes into just enough detail, allowing… Read more PHP What is Opcode Cache and When to Use it

How to Configure a Custom php.ini file for a Website

There are a few ways to create a custom php.ini configuration directives for an apache website. Create a phpinfo.php file with the following content within your document root. View this file in your browser and look near the top for which Server API is running PHP. If PHP is being run by CGI If the phpinfo.php file’s… Read more How to Configure a Custom php.ini file for a Website