Toggen Blog
Tech tips
Articles
Latest
CakePHP 4 has Deprecated File & Folder
So recently my code editor has been putting a line through File because it is going to removed in CakePHP 5 So here is an example of code that uses the deprecated methods and the suggested SplFileObject Using File public function createTempFile($print_content,...
Intelephense squiggly line under function
Adding a missing function definition Using the VS Code Intelephense Extension. You get a squiggly line under a function you know exists. When you hover over it the popup says "Undefined function ... " Go to Preferences and Settings [ Ctrl + , ], search for stubs and...
CakePHP 4 $this->request->referer() not working in production
Just had a situation where I couldn't get a redirect to work. My CakePHP app is in an Apache enabled docker container behind an nginx reverse proxy $this->redirect($this->request->referer()); The above simply refused to work in my development environment it worked...
Reverse Proxy Cups in Nginx
The process is similar to my previous post on proxying a sub directory back to the root. For example https://example.com/test => proxies back to / in the docker container upstream cups-endpoint { # in my case I'm using cups inside # a docker container and exposing #...
June 20 – Moved to Amazon Sydney
So for a while I have been using a Digital Ocean droplet based in Singapore and it is cheaper than an AWS EC2 Instance However I did some tests and found that ping times to Sydney from Melbourne were ~20ms and to Singapore ~400ms I noticed some lag problems with a web...
Why you should put your compute as close as possible to your users
I'm in Melbourne notice the round trip time from my browser to Sydney Amazon Servers 30ms You can test this by finding a ping-able IP address in the cloud you are using to host your VM and compare with one from the another location...
