Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported in DatabaseInterface.php on line 615

You will get this error when you upgrade your PHP 7 to PHP 8 (or even 7.3 to 7.4 or something like that) but keep your old phpmyadmin version. This error can be in any code but in our case it is in phpMyAdmin\libraries\classes\DatabaseInterface.php file so we need to fix it for phpMyAdmin. We will not fix the code itself because in this case it is not needed.

The solution here is for Laragon. It is a little longer, but easy, Laragon oriented solution so you can better understand how it works. Scroll down to the end to do this manually (faster).

Laragon solution

It is possible that your Laragon came with older phpMyAdmin version. So we will tell Laragon to download the latest one.

Open your {INSTALLATION_PATH}\laragon\etc\apps\phpMyAdmin folder. Just in case, backup this phpMyAdmin folder first. Then delete all files in it so the folder is empty.

Right click the laragon tray icon, then Tools then Quick add and then Configuration…

laragon options configuration quick app

this will open packages. conf file in your text editor. Find this line :

# phpMyAdmin
phpmyadmin= *******

of course you will see a link to phpmyadmin download page. It will pobably be link to a specific version.

Change it to this (latest version of phpmyadmin) and save the file.

# phpMyAdmin
phpmyadmin=https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip

Note: if the second line starts with # you need to delete the # character.

Right click the laragon tray icon again, then Tools then Quick add and then phpmyadmin… and Laragon with automatixally downlaod the latest phpMyAdmin and install it.

laragon phpmyadmin

Restart Laragon, open yourproject.test/phpmyadmin/ in your browser (your project will be called different than yourproject.test) and phpmyadmin should work.

Manual solution

1. backup and then delete all files in {INSTALLATION_PATH}\laragon\etc\apps\phpMyAdmin folder
2. Download the latest version of phpMyAdmin from https://www.phpmyadmin.net/downloads/
3. Extract the content of downloaded ZIP file into a empty phpMyAdmin folder
4. Restart laragon and phpMyAdmin should work.

Disable Google Lens search in Chrome

this will be a short one but it is quite annoying one: Google Chrome keeps making Lens as default image search in Chrome after every few updates (not often). It is used when you right click an image on internet and select “Search image with Google”. Here is how to turn lens off:

Open a new tab and go to chrome://flags.

Search and locate the following flag: Enable Lens features in Chrome. From the drop-down, select Disabled

You need to relaunch Chrome and problem solved.

Can’t uninstall an app – app is device administrator & must be deactivated

So I installed an Camera blocking app on Android and after a while I tried to uninstall it. It kept coming back! I tried force stopping it, using few different ways to uninstall it – it kept coming back.

Turns out the reason is this app became a device administrator (to be fair, I got this warning when installing from play store) and I guess it refused to uninstall itself. I even went to Playstore to uninstall it from there but instad of Uninstall option there was a Deactivate button!

pressing Deactivate didnt do anything except show me a message : This app is a device administrator and must be deactivated before uninstalling. Thanks for nothing, google!

Sneaky app!

How do I enable or disable a device administrator app?

The solution on Android 10+ was to find it in Device Administrator settings and turn it off.

It really varies where this setting is on different phones. I could not find it myself on my phone so I just opened Settings and searched for “admin” then clicked on “Device admin apps” and sure enough, the app was there!

So I clicked on app name and then “Deactivate this device admin app” and then uninstaleld the app and it didn’t come back.

Note: Device administrator app setting can be found in various places in Settings. If you cant find it by search, open Settings then try one of these places:

  • Security & location > Advanced > Device admin apps.
  • Security > Advanced > Device admin apps.
  • Location and Security > Device Administrator
  • Security > Device administrators

Disable This app is preventing shutdown message in Windows 11/10

This is one of the more annoying features of Windows since forever. You restart or shutdown PC, only to be greeted with this kind of message:

Even worse, Windows is saying it is closing apps but many times it never closes them. Countless times I did a shutdown, went away (or even left it overnight) much later and this wwindow was still on!

I get it, this is suppose to prevent us losing some important work but I cant remember when I needed this. Even if you click Cancel it will shutdown sometimes.

Unfortunately, Microsoft doesn’t provide an easy solution/checkbox in settings. Here is how to fix it. You will need to edit registry but it is not hard.

Important: Please only do this if you know what you are doing. Call someone who knows if you don’t. You can mess up Windows if you do something wrong in Registry. I cant be responsible if something goes wrong. Thank you for understanding 🙂

1. Open registry editor.

Click on Start Menu or Search icon and just type “registry” then click on registry editor app. If Windows asks you for permissions just click YES.

2. Navigate to (open):

Computer\HKEY_CURRENT_USER\Control Panel\Desktop

3. In the right panel, right click the empty space and choose New > String. and name it AutoEndTasks. That is important, it has to be named exactly like this.

4. Double click newly created AutoEndTasks (REG_SZ) and set its Value data to 1.

Click OK, close Registry editor, restart Windows.

Note: When you restart Windows after what you just did, you might still get this annoying notice “This app is preventing shutdown message” because Windows has not yet reloaded Registry. Next time you restart or shutdown Windows you should not see this message.

If this doesn’t work, try creating DWORD Value in step 3. For me, DWORD Value didn’t work. Only after I created String value it worked.

How to remove empty lines in Visual Studio Code

For some reason every now and then I get every other line empty when opening a file with code in Visual Studio Code. Annoying. It looks like this (made up example):

How to remove empty lines in Visual Studio Code

Here is how to get rid of these empty lines:

  1. From Edit Menu, select Replace or press command + Option + F on Mac or Ctrl + H on Windows
  2. In the find box type \n\n
  3. In the replace box type \n
  4. Select the ‘Use Regular Expression’ button (top red arrow)
  5. Click on the ‘Replace All’ button (bottom red arrow)

Here is a photo of the search/replace box:
search replace empty lines  code

If you are not sure then you can replace it one by one but that is not really necessary. If you see something is wrong then just press CTRL-Z on Windows and VS Code will revert back to code before replacement.

and this is how it should look like after you remove all empty lines:
vs code empty lines removed

Much nicer and as it should.

Download latest Laragon & Install Laravel 9

I like to use Laragon sometimes for my Laravel development. I had Laragon 5 installed and wanted to create new Laravel 9 project. When I selected Quick App-> Laravel it installed Laravel 8! I looked at Laragon website but the latest one there is Laragon 5 with PHP 7. Laravel 9 requires PHP 8.

Good news is that Laragon has already updated to Laragon 6 with PHP 8 but for some reason there is no downlaod link on their downlaod page (at the time of writing this post).

So what you need to do is go to Laragon github page and download latest laragon-wamp.exe from there. Then you do a backup of your current laragon folder on your PC and then just install the latest Laragon – it will keep all your files and settings, just upgrade to latest Laragon with PHP 8.

After you are done right click the Laragon icon, quick app and Laravel and it will install Laravel 9 (and probably next versions as long as they require PHP 8)

Either “name” or “item.name” should be specified (in “itemListElement”) error

There are few different reasons to get this error but here is my case: It involved WordPress and Yoast SEO plugin. I suddenly received this error from google search console, it said:

“New Breadcrumbs structured data issues detected”

Top critical issues*
Either “name” or “item.name” should be specified (in “itemListElement”)

*Critical issues prevent your page or feature from appearing in Search results.

Now that sounds serious, right? Not have your site or page appear in Search results? Ouch!

One of the solutions for this is to go to WordPress settings -> Reading and then select a page for your homepage. This is where Yoast SEO will read the missing data.

But in my case I could not do this because there is no homepage, I use “Your latest posts” as a default “homepage”. So somehow this confused Yoaast SEO plugin (can also be other plugins). Luckily there was an easy fix within Yoast.

In WP admin select Yoast SEO -> Search Appearance then breadcrumbs tab and then find the Anchor text for the Homepage field. Fill it with anything you want, I used “Home”.

Save it and if needed wipe the site cache and the problem should be solved.

Keep in mind that this error can appear on any page that has this name tag empty. This solution is just for HOMEPAGE problem, because that is what Google search console told me: root URL had this problem. If you have the problem with specific subpages or posts then this will probably not solve your problem.

Laravel – Remove Public from URL

Why is my Laravel URL mysite.com/public by default and how do I remove “public” from URL?

Probably the first question most people ask when they install their new Laravel site.

Here are 2 ways, luckily it is easy to do.

1. The most standard one is to just edit .htaccess file and add these lines:

<IfModule mod_rewrite.c>
   RewriteEngine On 
   RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Note: For this to work you must have mod_rewrite enabled on your Apache server because rewrite module is required to apply these settings.

2. This option is either easier or more complicated, depending on if you can edit ‘Document root’ on your hosting server. So, if you have access to Cpanel of your hosting AND they allow you to change ‘Document root’ then change it from let say “/public_html” to “/public_html/public”. That should do the trick.

If you can’t edit ‘Document root’ by yourself (security measure etc) then the best is to ask your host support to change it to “/public_html/public” (assuming your root folder for website is /public_html . If it is /www then let them change it to /www/public).

Google Drive is almost empty but shows several GB used

I guess you cant blame Google for trying to sell extra storage but this problem was really annoying me for a long time. Google kept telling me my account is full and it showed ~7GB in Google Drive. When I clicked on Drive icon there were just few files in it, totaling less than 1MB! No matter how much I kept clicking, files just weren’t there. Trash and everything else was empty. Of course on every page there was an offer for buying additional storage.

Well, finally I found what is clogging my drive: it was hidden app data, more specifically from chat app that drive was also backed up. I wish Google would tell me this, but of course it is in their interest to try to make us use pay for exra space.

How to see what is clogging up your drive (desktop):

1. Visit https://drive.google.com/ from your PC.

2. Click the gears icon and select Settings

Scroll down and you will see if an app is keeping hidden files in your drive. In my case it was chat app (I hid the name). If you see few GB of hiden app data then this is the answer to what is clogging up your Drive.

Important: I am not 100% sure what this data contains or if it is just a backup. If you are not sure what you are doing then do NOT delete the app data. I cant take any responsibly if those disappear. So I am not going to tell you how to gain back space, just that this is how I found out WHY my drive is full. This way you know what is the problem is so maybe deleting old photos and videos (or even clean or redo a backup) from your app on your phone will also delete it from drive.

How to display all the committed files in Git repository

Here are few ways to display all committed files in Git repository.

The command will list all the files currently being tracked under the branch master
git ls-tree -r master --name-only

List files of the current branch
git ls-tree -r master --name-only

show all of the tracked files that have been committed (on the current branch),
git ls-tree --full-tree --name-only -r HEAD