Category: PHP

PHP Upgrades At Reliable Penguin

Learn why PHP upgrades matter, how they affect your website’s security and performance, and what Reliable Penguin customers (and any PHP-powered site owner) should know to stay current and protected.

Read More »

Enabling TLS for CodeIgniter (MySQLi) on Amazon RDS

Transport Layer Security (TLS) encrypts traffic between your app and database, protecting credentials and data in transit. This guide shows how to enable and verify TLS for a CodeIgniter 4 app using the MySQLi driver against Amazon RDS/Aurora MySQL—whether you have root on the host or not. It also covers enforcing TLS at the database and common pitfalls. What you’ll do Download the Amazon RDS CA bundle Point CodeIgniter’s MySQLi connection at that CA Verify the connection is encrypted (with either MySQL or MariaDB clients) Optionally require TLS at the DB parameter group level 1) Get the Amazon RDS CA bundle Use either the global bundle (works for all commercial regions) or a region-specific bundle (e.g., us-east-1). Global (covers any commercial region): https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem Regional example (N. Virginia): https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem With root (system-wide location)

Without root (per-site location, safe for Plesk)

Sanity checks:

Plesk note: if PHP has open_basedir

Read More »

Clearing PHP opcache

Great article on how to clear the PHP opcache: https://ma.ttias.be/how-to-clear-php-opcache/ To facilitate use on a Plesk server created script and mapped into namespace: https://acme.com/opcache_clear Here’s the script: And here’s the Apache config to map into a virtual host: This above config should be placed in the “Apache & nginx setting” screen in the “Additional directives for https” field. In addition to setting the alias path we’re also setting the PHP handler. Additionally under “Password protected directories” added password protection for “/opcache_clear”. This is just a placeholder for the password file which is referenced in the above config.

Read More »

Magento SUPEE-7405 Parse Error

Applying the new SUPEE-7405 patch to Magento 1.7.0.2 (and probably other versions) results in a parse error in the sales order view page (admin/sales_order/view/order_id) if the site is running under PHP5.3. Here’s the error message:

The offending line is:

it can be changed to:

PHP 5.3 does not support the “[]” syntax for array initialization. Of course you should not be running PHP 5.3!

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.