Category Archives: CentOS

Renewing Let’s Encrypt certificate

Have the following command setup in my crontab to renew the certificate for this blog, and for the main website –

This causes the command to run,

At 03:30 on day-of-month 1 in every 2nd month.


Incase you want to add more domains to an existing certificate, you can use the following command –

This assumes that you have only a single certificate. If you’ve more, you’ll have to use --cert-name. Read more here.

Just putting this here for reference, and with the hope that it might be useful for someone else.

get_results PHP function not working on CentOS

There are instances where the PHP function – get_results will not work on CentOS (this maybe the case with other Linux based operating systems as well). I faced this issue while deploying a project on CentOS which was originally developed on Windows. All my INSERT, UPDATE and DELETE database statements were working properly, but bulk SELECTstatements had issues. Closer inspection narrowed down the problem to the get_results function.

I came across this on the get_results PHP documentation page –

I was able to determine if mysqlnd driver was installed using this post on StackOverflow as reference. As expected, it wasn’t.

Here’s the relevant php code from the StackOverflow post –

Now that I new that we needed to install the mysqlnd driver, here are the steps that I followed to get the mysqlnd driver working on CentOS,

After installing the mysqlnd driver the get_results function worked just fine.