Hello/Hi/Greetings,
(Here your message)
(Copy here your environment details, found on your Piwigo page [Administration > Tools > Maintenance])
Piwigo 16.0.0 Check for upgrade
Installed on 31 January 2016, 9 years 9 months 4 weeks ago
Operating system: Darwin
PHP: 8.2.4 (Show info) [2025-11-28 22:35:05]
MySQL: 10.4.28-MariaDB [2025-11-28 16:35:05]
Graphics Library: GD bundled (2.1.0 compatible)
Cache size 17.89 Mo calculated 2 months ago Refresh
Activated plugin list 10
Admin Tools
AlwaysShowMetadata
EditorPlus
Exif View
Exiftool GPS
Exiftool Keywords
Extended Description
LocalFiles Editor
Physical Photo Move
Take A Tour of Your Piwigo
I use XAMPP on MacBook. Since Piwigo 15.6 and now Piwigo 16, I have not been able to see Exif data. It shows this error message
Piwigo URL: http://Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /Applications/XAMPP/xamppfiles/htdocs/piwigo/plugins/exiftool_keywords/main.inc.php on line 23
Please help. TIA
Offline
I think the issue causing that error message is actually with line 22 of the exiftool_keywords plugin main.inc.php file which invokes the shell_exec function to run exiftool.
Rather than returning a JSON string result from exiftool, shell_exec() is returning null there which breaks the json_decode() on line 23 producing the error. As far as I understand, a null result means that particular shell_exec() function is either producing an error or blank output.
I think it is possible that PHP on your system is unable to locate the external exiftool command on the specific path being used by that shell_exec() function. I do not have a macOS system to test with so if that is the case I don't know what the solution but it may mean the plugin needs some kind of environment variable set as part of the shell_exec call.
Offline
Thanks. I’ll just stop using that feature for now. Not a big problem
Offline
I am running ver 16.2.0 and get the same error.
I did a bit of Googling and found the following, suggesting this plugin is not compatible with my version of PHP (PHP: 8.3.6)
It looks like a simple fix for the plugin, but it's beyond my abilities so can't help:
Check the Code:
Locate the line in the specified file (main.inc.php on line 23) and ensure that the variable passed to json_decode() is not null.
Add a Condition:
Before calling json_decode(), add a check to ensure the variable is a valid JSON string. For example:
php
Insert this code:
if ($jsonString !== null) {
$data = json_decode($jsonString);
}
Offline
I am not going to mess around with these codes. I'll just have to wait it out for the next update. In my case, it is not important for me to look at the exif data.
Offline