News & Blog

How To Install SOAP for PHP on a 1&1 VPS

July 30th, 2015 - Posted by Steve Marks to PHP, Server Management, Web Development.
If working with a third party service it’s possible that you might need to communicate with it using SOAP. This is exactly the scenario we found ourselves in today. The issue was however that the 1&1 VPS that the site was hosted on didn’t have SOAP, and inparticular SOAPCl...

Sorting a PHP Array with a Key of Decimal Type

April 28th, 2015 - Posted by Steve Marks to PHP.
There are many PHP functions available that assist with sorting arrays. The one we’ll be talking about in this article is the ksort() function which is intended to sort an array by key. Now, to sort an array where the keys are of type decimal you would ordinarily think the following ...

Solving Error “ERROR 1 (HY000): Can’t create/write to file ‘/tmp/#sql_9f3_0.MYI’ (Errcode: 17)”

March 31st, 2015 - Posted by Steve Marks to MySQL, PHP, Web Development.
Recently a site that we manage stopped working all of a sudden. The error being returned from the MySQL query was as follows: ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_9f3_0.MYI' (Errcode: 17) The error states that a file in the ‘/tmp/’ folder can’t be writte...

Removing the Query String from $_SERVER[‘REQUEST_URI’] in PHP

December 16th, 2014 - Posted by Steve Marks to PHP, Web Development.
When trying to get the current request URI in a PHP file you would normally use: echo $_SERVER['REQUEST_URI']; When recently using this however I found that it could also contain the current query string. After digging a bit deeper it turns that the addition of the query string can differ ...

Add Character Between Menu Items in WordPress using wp_nav_menu() Function

November 26th, 2014 - Posted by Steve Marks to PHP, Web Development.
Allowing navigation menus to be controlled from within WordPress makes amending the sites structure a simple task for the user. When setting up a menu you’d normally register it in your theme’s functions.php file then output it using the wp_nav_menu() function. Most of the time...

Resolving Error with Sending Emails via SMTP Using CodeIgniter

November 18th, 2014 - Posted by Steve Marks to PHP, Web Development.
When sending emails using the CodeIgniter Email Class, I’ve always just kept the protocol as ‘mail‘ meaning emails get sent using the standard PHP mail() function. Recently however, on an application we had been developing, emails were a critical part of the system. We ha...

Limit WooCommerce Product Quantity to One

October 23rd, 2014 - Posted by Steve Marks to PHP, Software, Web Development.
Sometimes you might want to restrict customers of a WooCommerce site from purchasing more than one of any product. Fortunately this is made simple through use of the options already available in WooCommerce. Simply edit the product in question, navigate to the ‘Inventory’ tab a...

Remove Whitespace Between List Items Generated By wp_nav_menu()

September 26th, 2014 - Posted by Steve Marks to (X)HTML / CSS, PHP, Web Development.
Earlier today I was using wp_nav_menu() function within WordPress to output a navigation menu on a site. I was getting an issue however whereby the whitespace between the list items (<li>) was causing spaces between the menu items on the frontend. My list items had the ‘display...

Change Author Base URL in WordPress Permalinks

August 26th, 2014 - Posted by Steve Marks to PHP, Web Development.
By default when viewing a user’s profile page on the front end of a WordPress site, the URL will looks something like so: http://mysite.com/author/joe-bloggs The base URL will be ‘author’ followed by the users name. This is fine and works if users in the system are author...

WordPress Plugin Released: Link Picker Field for Advanced Custom Fields

July 25th, 2014 - Posted by Steve Marks to PHP, Web Development.
We’re pleased to announce the release of our fourth WordPress plugin; an add-on field for the already established Advanced Custom Fields plugin. Download on WordPress > View Github repository > In the standard ACF plugin there are a few ways to allow a user to select a link: 1....