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/ Bulk Load Multiple TTF's for i in ls...
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(...){...
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);...
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...
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 =...
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...
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...
Dell iDRAC 6 – SEC_ERROR_REUSED_ISSUER_AND_SERIAL Firefox Error
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...
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...
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...
