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 […]

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 […]

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 […]

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:

You’ll see a list of options and arguments. From the php help output one can see that the -i option will show what amounts to the […]

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 […]

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 […]

How to Add Current URL from Within Symfony2 Controller

I am building a REST app and wanted to include the resources “href” with every response. Being able to easily do this from with a Symfony2 Controller is very convenient. Here’s the code:

Hope this helped you find it fast!

Drupal Role Specific Development Feedback

On rare occasions you may have to work on a production site and need some development feedback. If you want to control which role sees your output, this snippet can help. With this logic in place, only appropriate roles will see your working on the site.