Which version of PHP is your server on?
I will take a look tomorrow morning. This should not be happening, so I will need to check my server logs for this.
I checked the code after changing my PHP version to 8.2, but it doesn’t seem to be triggering this error. Are you getting this all the time, or did it just occur once and then stop?
If you are seeing this error happen a few times but your site is running absolutely fine, this could be due to a different reason: typically, you would see such errors if someone was directly trying to load the file (generally hackers try to load PHP files directly to try and exploit issues). If a hacker tries to directly load the file, they would get an error (which is a good thing), since this file is not supposed to be loaded directly – rather, it is called by internal files that define PHOTONIC_PATH before the file is accessed.
As long as your site is working fine, you can ignore these errors, since these are not caused by bad plugin code.
Errors only a few times today. Yes, indeed it could be hackers.
[Sun Mar 24 02:50:14.705821 2024] [php:error] [pid 67522] [client 52.167.144.229:32869] PHP Fatal error: Uncaught Error: Class “Photonic_Plugin\Options\Option_Tab” not found in /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Options/SmugMug.php:7\nStack trace:\n#0 {main}\n thrown in /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Options/SmugMug.php on line 7
[Sun Mar 24 06:10:05.815890 2024] [php:error] [pid 73687] [client 207.46.13.128:42533] PHP Fatal error: Uncaught Error: Undefined constant “Photonic_Plugin\Platforms\PHOTONIC_PATH” in /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/Base.php:9\nStack trace:\n#0 /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/OAuth2.php(7): require_once()\n#1 /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/Lightroom.php(8): require_once(‘…’)\n#2 {main}\n thrown in /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/Base.php on line 9
[Sun Mar 24 13:02:03.723162 2024] [php:error] [pid 87127] [client 40.77.167.18:58521] PHP Fatal error: Uncaught Error: Undefined constant “Photonic_Plugin\Platforms\PHOTONIC_PATH” in /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/Base.php:9\nStack trace:\n#0 /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/OAuth1.php(8): require_once()\n#1 /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/SmugMug.php(16): require_once(‘…’)\n#2 {main}\n thrown in /var/www/lyridsfolkdancefestival.org/public_html/wp-content/plugins/photonic/Platforms/Base.php on line 9
It is definitely from hackers attempting to get in. If you see the line that says “Lightroom.php”, that file is in the code, but not used anywhere in the plugin – I had started creating it in the hopes of supporting Adobe Lightroom at some point, but not referenced it in the code. The fact that you are seeing it in your logs means that someone is directly trying to access files outside standard processes.
You might want to set up something like WordFence or WP Cerber to prevent such access attempts.