Articles

News and updates that you might be interested in reading.

Install SSL certificate from GoDaddy into an Amazon EC2 Ubuntu instance

Below are the steps to install SSL certificate from GoDaddy into an Amazon EC2 instance based on my experience. My server is Ubuntu 18.04 LTS. After you had purchased the SSL certificate, you need to supply the CSR (Certificate Signing Request) from your server. To do that, access your server via PuTTY or SSH and Read more about Install SSL certificate from GoDaddy into an Amazon EC2 Ubuntu instance[…]

Amazon MWS SubmitFeed API suddenly stops working anymore

I had developed an application years ago that submit tracking info back at Amazon via the SubmitFeed API using the POST_ORDER_FULFILLMENT_DATA feed type. All is well for the past few years until it just stops working today. I had checked the response and this is what it returned: HTTP/1.1 400 Bad Request <error> <type>Sender <code>InvalidParameterValue</code> Read more about Amazon MWS SubmitFeed API suddenly stops working anymore[…]

DOMPDF fonts not rendering correctly when transferred from localhost to live

Fonts in DOMPDF are working alright doesn’t matter if its a custom font or default font when you are developing in localhost, but when you had transferred it to your live hosting, the font behavior that is rendering is not quite the same (font-size, font-weight, etc.) Solution 1: Delete the lib/fonts/dompdf_font_family_cache.php in your DOMPDF installation. Read more about DOMPDF fonts not rendering correctly when transferred from localhost to live[…]

packagist.phpcomposer json could not be downloaded error in Laravel solution

I had encountered an issue on composer when I am installing a package in Laravel via composer, then it just hangs or stops on the line:Updating dependencies (including require-dev) and is returning errors like: The “https://packagist.phpcomposer.com/[…..].json” file could not be downloaded (HTTP 1.1 404 Not Found) I had run composer clear-cache and composer diagnose to Read more about packagist.phpcomposer json could not be downloaded error in Laravel solution[…]

DOMPDF not rendering text underline correctly FIX solution

I had encountered a bug in DOMPDF with the underline overlapping the text when I am using a custom font. The fix is quite simple, open the src/Renderer/Text.php file of your dompdf installation and adjust (increase) the value of UNDERLINE_OFFSET constant until the underline position the text has correctly placed underneath the text. const UNDERLINE_OFFSET Read more about DOMPDF not rendering text underline correctly FIX solution[…]

How to install PhpSpreadsheet in Laravel

Before, I am using PHPExcel library to create, parse, and manipulate excel and csv files in Laravel. However, the project was officially deprecated in 2017 and permanently archived in 2019. The authors recommended migrating to PhpSpreadsheet as an alternative. Most of the functions of PhpSpreadsheet is similar to PHPExcel so it’s easy to transition between Read more about How to install PhpSpreadsheet in Laravel[…]

Laravel Database Query Builder insertGetId() method always returning 2147483647

When you are using Laravel insertGetId() method to insert a record and retrieve the ID and is consistently 2147483647 value, but when you check the database it is not the normal value you would expect, it is because your PHP is running in 32bit mode and the range of the int value on this mode Read more about Laravel Database Query Builder insertGetId() method always returning 2147483647[…]