Faulty and useless piece of software
-
I installed this plugin which destroyed the database of my site, let me explain how…
I got “maxconnection” errors a few minutes after setting up a dynamic QRcode on the homepage. By security the service provider closed every access to my website (including PhpMyAdmin) so I had no other alternative than reverting to day-1 backup.
A likely reason is that the code dealing with dynamic QRcode performs an “open” statement and forgets to close, which ends up saturating the site if the page is often accessed.
I spent another day trying other plugins for (static) QRcodes, one of which created PHP errors resulting in disrupted display of the theme… In the end, I understood that the simplest and safest way to produce QRcode is to install a PHP widget and run the following code that calls Google’s service to display a QRcode with the URL of the current page (or anything else you wish):
==========
<?php
function curPageURL() {
$pageURL = ‘http’;
if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;}
$pageURL .= “://”;
if ($_SERVER[“SERVER_PORT”] <> “80”) {
$pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”];
} else {
$pageURL .= $_SERVER[“SERVER_NAME”].$_SERVER[“REQUEST_URI”];
}
return $pageURL;
}
$url = curPageURL();
$call = “https://chart.googleapis.com/chart?cht=qr&chl=”.$url.”&chs=160×160″;
echo ““;
?>
============
This code is for instance running on my page:
https://lebonheurestpossible.org/dawn-phenomenon/
- The topic ‘Faulty and useless piece of software’ is closed to new replies.