October 24, 2016

James McDonald

“Deleted” Group Policy Deployed Printer Will Not Delete on the Client

Just had an issue where I tried to remove a printer connection on a Windows 7 Pro workstation after having deleted the printer on the Windows SBS 2011 Server (aka. Windows 2008 R2)  and on the client a dialog pops up saying that access was denied for the delete. Went back onto the server Opened the Print […]

by James at October 24, 2016 01:55 AM

October 23, 2016

James McDonald

MacOS Sierra Scanning Fail

So the upgrade to MacOS Sierra hasn’t really ran as smoothly as I would like for the following reasons There seems to be a limit to the number of kernel modules that MacOS X will load so by the time you install VMWare Fusion, VirtualBox (for a docker environment) and osxfuse (to allow you to […]

by James at October 23, 2016 11:01 PM

October 19, 2016

James McDonald

Updating a Paradox DB using PHP and the Paradox Extension

A few years ago I blogged about reading a paradox DB. Recently I had need of updating some records and thought I would blog about it. See below. Reading a Paradox DB Under Windows using XAMPP Firstly there doesn’t seem to be a modern Linux distro that comes with the PHP Paradox extension baked in. […]

by James at October 19, 2016 01:18 PM

October 13, 2016

James McDonald

A Favourite Quote That My Sister Introduced Me To

“Oh, the comfort, the inexpressible comfort of feeling safe with a person; having neither to weigh thoughts nor measure words, but to pour them all out, just as they are, chaff and grain together, knowing that a faithful hand will take and sift them, keep what is worth keeping, and then, with a breath of […]

by James at October 13, 2016 09:57 AM

September 26, 2016

James McDonald

VMWare Fusion conflicts with encfs on MacOS Sierra

I had a work-a-round for osxfuse not working but no longer works since the update to MacOS Sierra EncFS Password: the OSXFUSE file system is not available (23) fuse failed. Common problems: - fuse kernel module not installed (modprobe fuse) - invalid options -- see usage message But if you totally exit VMWare Fusion (This is […]

by James at September 26, 2016 12:50 PM

September 07, 2016

James McDonald

Home Sales and the Role of the Interior Designer

Just recently I’ve become mildly addicted to shows like Flip or Flop, Fixer Upper and Masters of Flip of these I think I like Masters of Flip the most. The interplay of the husband and wife as they try and renovate a home and on-sell it is very entertaining, and the entire process, from demolition day through […]

by James at September 07, 2016 05:16 AM

Develop CakePHP in 3 Locations – HOME TEST LIVE

I have a CakePHP application that I develop on my MacBook and then push to a “TEST” install environment and then across to a LIVE environment when I’m happy. In the past I’ve done the following at each instance after I have git pull | fetched | merged: Edit APP/Config/core.php and change debug, TRUE to FALSE […]

by James at September 07, 2016 04:14 AM

September 01, 2016

James McDonald

How to SELECT from between double quotes in a MySQL column and update a column in the same table

Note the following data: MariaDB [pallets3]> select options, title from menus where options != ''; +-------------------------------------------------------------------+------------------------------------------------+ | options | title | +-------------------------------------------------------------------+------------------------------------------------+ | array('title'=> "Print 150x200 Oil Pallet Labels") | Print 150x200 Oil Pallet Labels | | array('title'=> "Print 150x200 Marg Pallet Labels") | Print 150x200 Marg Pallet Labels | | array('title' => "View/Edit Shipments […]

by James at September 01, 2016 02:05 AM

August 15, 2016

James McDonald

X-Recruiting – Who would have thought

Was just checking a 301 redirect I’ve set up, and while looking at the the server output from the wget -S command I noticed that has an X-Recruiting header. Etsy I hope your innovation brings all the coders to the yard.  

by James at August 15, 2016 05:39 AM

July 15, 2016

James McDonald

C Struct Loses it’s Settings

A while ago I blogged about a Control system that commits a C Struct to a file on a disk and then reads the file and enters the C Struct data back into the control system. The operators started noticing inconsistent behaviours. And so I have had to investigate. After much trial and error I […]

by James at July 15, 2016 08:37 AM

July 13, 2016

James McDonald

Struct is 652 Bytes Fwrite writes 656 Bytes

I am not a programmer but I had the need to write a C struct to disk When I then tried to write another of the same files to try and work-a-round a problem with the system they are used on I got a slightly large (by 4 bytes) file I was compiling the C […]

by James at July 13, 2016 01:25 PM

June 25, 2016

James McDonald

array_merge – And the winning key is!

Just a note to self about PHP array_merge The later array passed into array_merge overwrites the former, also if it’s indexed with numerical keys then the values will just be appended. <?php $option_array = [ 'element' => 'ooa1', 'optionb' => 'ob1', 'different' => 'diff', 'notin2' => true ]; $oa2 = [ 'element' => 'ooa2', 'optionb' […]

by James at June 25, 2016 03:24 AM

June 22, 2016

James McDonald

OpenRPT Context Queries, Format Strings and URLs in PDFs

OpenRPT is a Report Write that is Bundled with xTuple in all it’s flavours. It’s simple and takes some getting used to in order to use it’s power When creating a custom report there is a thing called a Context Query.  These are the values that are available page_number report_name report_title report_description page_count This screenshot shows […]

by James at June 22, 2016 12:59 PM

June 19, 2016

James McDonald

Netbeans Removes Indent from // Comments

Been using netbeans for PHP development and discovered that it will remove the leading whitespace from comments and then the comments inside a block of code are hard up against the left margin which looks weird. Not sure if there is a setting to stop this behaviour but if you do the following you will […]

by James at June 19, 2016 11:45 PM

June 18, 2016

LOGIN Wiki Changelog

makerspace:home - [University of Newcastle Makerspace]

Welcome Please sign up the mailing list below if you're interested in becoming a member of a Newcastle hackerspace/makerspace. Note: There are two separate groups. University of Newcastle Makerspace Location: Building: EE Room: EE102 Access is by request to the president of the makerspace, Luke Simmons. Once this is done you will be required to pass the EE general access quiz and the EE unsupervised access quiz, in Blackboard.

June 18, 2016 01:38 PM

James McDonald

Making Weird Grunting Noises with CakePHP 3 & Twitter Bootstrap

This is how I got grunt running with the twbs/bootstrap plugin to automatically copy the CSS, JS and Fonts into my CakePHP 3 development environment. I did this on MacBookPro OSX 10.11.5. But this applies to Linux too. If anyone has better suggestions as to how this could be accomplished easier. I am open to […]

by James at June 18, 2016 02:16 AM

June 13, 2016

James McDonald

TCPDF KeyWords Doubled in Document Properties Description Tab – Acrobat Reader

This causes the keywords to double when viewed in File ==> Properties ==> Description Tab. $pdf->SetKeywords('CLAM, CLM, Schedule, Program, Meeting, Service Meeting'); This shows the keywords once only: $pdf->SetKeywords('CLAM CLM Schedule Program Meeting Service Meeting'); In short drop the comma’s and you will be fine.

by James at June 13, 2016 02:14 PM

June 12, 2016

James McDonald

CakePHP 3 Changes To Date/Time Formatting

The new date objects have different formatting strings $this->Time->format($assigned_part->start_time, 'h:mm') $this->Time->format($mtg->date, 'eeee MMMM d') The old ones here don’t work as the datetime helper have been rewritten.    

by James at June 12, 2016 12:43 PM

June 11, 2016

James McDonald

I have no idea what the problem is PHP CLI

Trying to do some PHP tutorials using vim and running php from the command line and I get…. nothing back. If it’s a syntax error (e.g. a missing line ending ; ) then no reply at all. If the syntax is correct and it’s something else then the error isn’t displayed Apparently PHP CLI is […]

by James at June 11, 2016 02:48 AM

June 09, 2016

James McDonald

CakePHP POST Failing

I was just trying to submit about 10 x 15 records… and found that cakephp was failing with a validation error. Found out it was due to the following in the php error log. [09-Jun-2016 19:16:22 Australia/Melbourne] PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on […]

by James at June 09, 2016 09:28 AM

June 08, 2016

James McDonald

Adding new fonts to TCPDF

Less agony way of doing it. Download your fonts and then run the following cd  /Users/jmcd/Sites/clam/vendor/tecnickcom/tcpdf tools/tcpdf_addfont.php -i /Users/jmcd/Downloads/liberation-sans/LiberationSans-BoldItalic.ttf cd fonts/   ls | grep libera liberationsans.ctg.z liberationsans.php liberationsans.z liberationsansb.ctg.z liberationsansb.php liberationsansb.z liberationsansbi.ctg.z liberationsansbi.php liberationsansbi.z liberationsansi.ctg.z liberationsansi.php liberationsansi.z

by James at June 08, 2016 11:30 AM

June 06, 2016

James McDonald

CakePHP – Call to a member function format() on array!

// failing validator rule $validator ->date('date') ->add('date', 'unique', [ 'rule' => 'validateUnique', 'provider' => 'table', 'message' => "One of the dates you submitted already exists!" ]); // working buildRules public function buildRules(...){ //... other rules here ... $rules->add($rules->isUnique(['date'])); } Error: Call to a member function format() on array File /Users/user/Sites/clam/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php Line: 108

by James at June 06, 2016 03:47 PM

June 02, 2016

James McDonald

CakePHP “public $paginate =” overwritten by action “$this->paginate =” Gotcha

If you have a the following code class PartsController extends AppController { /** * Index method * * @return \Cake\Network\Response|null */ public function index() { $this->paginate = [ 'contain' => ['Sections'] ]; $parts = $this->paginate($this->Parts); $this->set(compact('parts')); $this->set('_serialize', ['parts']); } and then you define a public $paginate value in the class as thus: class PartsController extends […]

by James at June 02, 2016 09:52 PM

May 29, 2016

James McDonald

CakePHP 3 – TCPDF Install and Usage

In your CakePHP top level folder (the one that has composer.json, src/, vendors/, config/, webroot/) run: composer require tecnickcom/tcpdf You should now have vendor/tecnickcom/tcpdf Now in a controller src/Controller/<ControllerName>Controller.php create an action: public function pdfView($schedule_id = null){ $this->viewBuilder()->layout('ajax'); $this->set('title', 'My Great Title'); $this->set('file_name', '2016-06' . '_June_CLM.pdf'); $this->response->type('pdf'); } Then create a view in src/Template/<ControllerName>/pdf_view.ctp class xtcpdf […]

by James at May 29, 2016 09:19 PM

May 28, 2016

James McDonald

CakePHP 3 – Escape to the Global Namespace

This code in CakePHP 3: <?php $date = '31/01/1973'; $ymd = DateTime::createFromFormat('!d/m/Y', $date)->format('Y-m-d'); Causes this error Error: Class ‘App\Controller\DateTime’ not found This code fixes it: <?php $date = '31/01/1973'; $ymd = \DateTime::createFromFormat('!d/m/Y', $date)->format('Y-m-d'); Apparently the \ backslash escapes the namespace and instead of it looking for DateTime in the current namespace it looks for it […]

by James at May 28, 2016 10:59 AM

May 25, 2016

James McDonald

Checking for port errors on Cisco Switches

Recently had a macbook pro which had a network dongle that was very hot and the network connection stopped working. Found that the dongle was sending garbled signal down the wire and the Cisco switch shutdown the port. # all status show interfaces status # port shutdown due to line errors show interfaces status | […]

by James at May 25, 2016 11:58 PM

Symantec Endpoint Protection Cloud – NIS.exe High CPU on Windows XP SP3 VMWare VMs

Just discovered that one of the patches I installed today on my VMWare hosts fixed an issue I had after installing Symantec Endpoint Protection for Small Business Cloud Hosted Edition The old ESXi build was 106549 the new one is 3872664 ( vSphere 5.1 3b ) I don’t know exactly which patch fixed it because […]

by James at May 25, 2016 07:54 AM


Secure Connection Failed An error occurred during a connection to 172.16.98.XXX. You have received an invalid certificate. Please contact the server administrator or email correspondent and give them the following information: Your certificate contains the same serial number as another certificate issued by the certificate authority. Please get a new certificate containing a unique serial […]

by James at May 25, 2016 05:19 AM

May 12, 2016

James McDonald

nginx suddenly can’t proxy to non-standard ports – Boolean SeLinux

I did an upgrade recently and suddenly nginx wasn’t forwarding requests to remote hosts on non-standard ports…. this was on a CentOS host which had seLinux enabled. Turn seLinux off temporarily setenforce 0 Does nginx now work proxying to non-standard ports? Turn it back on setenforce 1 Does nginx now fail to proxy to non-standard […]

by James at May 12, 2016 08:54 AM

May 03, 2016

James McDonald

Fixed: Second Windows App Runing under Wine 1.8.1 on OSX 10.11.4 Won’t Accept Keyboard Input

I have two wine apps I typically use. If I launch both of them then I can’t enter anything into the form fields of either. To fix this I have ran winecfg and unchecked the “Allow the window manager to control the windows” option on the Graphics tab of Wine Configuration dialog. Versions: wine-1.8.1 OSX […]

by James at May 03, 2016 01:03 PM

April 27, 2016

James McDonald

IE11 Wonky Bootstrap Rendering

Problem: Internet Explorer 11 on Windows 7 Professional renders a bootstrap website with form controls in the wrong place and the layout is corrupt Cause: Internet Explorer 11 has been configured to display legacy banking website with ancient IE8 settings Resolution: Install a meta tag in the <head></head> section of the web page. <meta http-equiv="X-UA-Compatible" content="IE=edge" /> For […]

by James at April 27, 2016 12:59 PM

April 18, 2016

James McDonald

CakePHP 2 Slightly Better Looking than Default Pagination

Just trying to make my pagination in CakePHP 2 better looking. I added the first and last links but still had a radius on my previous and next links which looked odd and my ‘last >>’ link had a square end too. So a bit ugly really. Following is an example of pagination links after I […]

by James at April 18, 2016 04:41 AM

April 14, 2016

James McDonald

Welcome to the Internet Helpdesk

On one of my client sites they have a Telstra Internet connection. An Exchange server sits on the network and forwards mail out to the Telstra Smarthost After an update to a Dansguardian proxy server and the subsequent failure of clamd to launch (due to the update changing the permissions of /var/lib/clamav) Dansguardian went on an […]

by James at April 14, 2016 06:47 AM

April 13, 2016

James McDonald

Gaining Access to A Windows Computer when you don’t know the Password

“The trust relationship with this workstation and the primary domain has failed” This error message isn’t a big problem when you still have the local computers administrative usernames and login passwords. You just change your login details from DOMAINNAME\Administrator to COMPUTERNAME\Administrator enter you password, remove the computer from the domain by adding it to a […]

by James at April 13, 2016 05:52 AM

April 11, 2016

James McDonald

Bootstrap CakePHP 3 Bootstrap-ui

In my learnings for make self glorious user of Twitter Bootstrap I have been looking at I’m using as a place to stash my code so I don’t blow my laptop away and then lose it one day and as the demo site. Really in the end you need to read the documentation at and then use […]

by James at April 11, 2016 01:12 PM

April 06, 2016

James McDonald

White and Nerdy

Weird Al: Saying it like it is  

by James at April 06, 2016 02:08 AM

Synology Diskstation NAS appearing in Finder as not connected of connection failed

My DS415+ Synology NAS has just been updated to DSM 6.0 In my Mac Book Pro running OS X El Capitan 10.11.4 the NAS was appearing in Finder but when I clicked on it the finder pane showed “Not Connected” or “Connection Failed” and clicking the connect as… button didn’t pop up window. My fix […]

by James at April 06, 2016 01:54 AM

April 01, 2016

James McDonald

CakePHP 3: Ain’t gonna GET if it ain’t gotta GET

Just installed CakePHP3 under nginx and tried to switch between pages of a paginated view and every time it would return the default 1st page. The url for each page was Discovered using debug_kit that the GET request QUERY_STRING parameters weren’t being sent to CakePHP. The query string is everything after the question mark in the […]

by James at April 01, 2016 06:38 AM

March 31, 2016

James McDonald

CakePHP 3: _serialize is a View Killer

Note to self: If $this->set(‘_serialize’, [ ‘content’ ]);  then a request for content type of ‘application/json’ or ‘application/xml’ will automagically return the correct data without needing a view file. But if $this->set(‘_serialize’, false); isn’t set then a request for content type of  ‘application/json’ or ‘application/xml’ will expect a view file to format and return the data and you […]

by James at March 31, 2016 06:07 AM

March 29, 2016

James McDonald

DebugKit not Loading Toolbar in CakePHP 3

Problem: debug set to true in config/app.php, vendor/cakephp/debug_kit exists but debug kit toolbar not appearing in browser, debug_kit/js/toolbar.js shows a 404 when viewing page load in Developer Tools in browser. Cause: symlink from vendor/cakephp/debug_kit/webroot to webroot/debug_kit is missing which causes the toolbar.js not to be found and loaded. Resolution:  [root@mypc cake3]# bin/cake plugin assets symlink […]

by James at March 29, 2016 11:24 PM

Powered by Planet!
Last updated: October 25, 2016 11:00 PM

RSS 20 Atom