File Genie PHP Support Product Page


Strict Standards: error

Reported 14 Aug 2012 21:39:03
has this problem
14 Aug 2012 21:39:03 Phil Boyle posted:
I have started seeing this error message when using filegenie. I have posted this as a new question because the other person that reported it didn't seem to get an answer.

Strict Standards: usort() expects parameter 2 to be a valid callback, non-static method fileObj::cmp_fileName() should not be called statically in C:\xampp\htdocs\NZW\ScriptLibrary\incFileGenie.php on line 169



Replied 15 Aug 2012 06:29:06
15 Aug 2012 06:29:06 Teodor Kuduschiev replied:
Hello Phil,

can you please send me your php file for a review to:
Replied 15 Aug 2012 21:44:45
15 Aug 2012 21:44:45 Phil Boyle replied:
Hi Teodor
Here is the absolute basics of the page below. I have used file genie plenty of times but I think the error has only just started happening on my local computer and I have recently upgraded to Apache 2.2.21
+ MySQL 5.5.16
+ PHP 5.3.8

I haven't found it happening on any of my live websites yet:

Page code here:

<?php require_once('ScriptLibrary/incFileGenie.php'); ?>
// *** Folder List 1.05
$holiday_snaps = new fileGenie();
$holiday_snaps->path = "cms/galleryphotos";
$holiday_snaps->allowedExtensions = "GIF,JPG,JPEG,BMP,PNG";
$holiday_snaps->includeFolders = false;
$holiday_snaps->showThumbnailsOnly = true;
$holiday_snaps->thumbnailsSuffix = "thumb_";
$holiday_snaps->naming = "prefix";
$holiday_snaps->thumbPath = "cms/galleryphotos";
$holiday_snaps->processFolder("fileName", "ASC");
// *** Folder List Repeater Vars 1.04

<!DOCTYPE html >

<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/jquery.easing.1.3.js"></script>

<!--[if IE]><script type="text/javascript" src="dmx/lib/excanvas-compressed.js"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="dmx/widgets/Lightbox/styles/default/style.css" />

<script type="text/javascript" src="dmx/dmx.core.js"></script>
<script type="text/javascript" src="dmx/widgets/Lightbox/dmx.lightbox.js"></script>
// *** Folder List Repeater Start
while ($holiday_snaps->canRepeat()) {
?>[*]<a href="<?php echo $holiday_snaps->folderList("path"); ?>" title="Working Holidays in NZ" rel="dmxLightbox" rev="{group:'holiday snaps', preset:'minimalistic'}" ><?php echo $holiday_snaps->folderList("thumbnailImage"); ?></a>[/*]
// *** Folder List Repeater End

Replied 22 Mar 2014 06:54:31
22 Mar 2014 06:54:31 Phil Boyle replied:
I need an answer to this because the error has just started happening on a website where it has worked for years . It is working on my local testing server where I have php5.4.16 and my hosting company has php5.4.24 and I have tried the latest version of the extension.
Replied 24 Mar 2014 10:38:55
24 Mar 2014 10:38:55 Teodor Kuduschiev replied:
Hello Phil,
Can you please check the php.ini file of your server for this:
error_reporting = ....
What is the value there?
Replied 25 Mar 2014 21:00:05
25 Mar 2014 21:00:05 Phil Boyle replied:
Hi Teodor
This is the current error and it is happening on a live server:

Strict Standards: usort() expects parameter 2 to be a valid callback, non-static method fileObj::cmp_fileName() should not be called statically in C:\HostingSpaces\NCS\\wwwroot\ScriptLibrary\incFileGenie.php on line 193

The hosting company say this:

error_reporting = E_ALL & ~E_DEPRECATED

Replied 01 Apr 2014 20:40:30
01 Apr 2014 20:40:30 Phil Boyle replied:
Is this being looked at?
Replied 02 Apr 2014 12:00:06
02 Apr 2014 12:00:06 Teodor Kuduschiev replied:
In your php.ini change
error_reporting = E_ALL & ~E_DEPRECATED
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
If you don't have access to the php.ini, you can potentially put this in your .htaccess file:
php_value error_reporting 30711
If you don't have access to the .htaccess file or it's not enabled, you'll probably need to put this at the top of the PHP section of your page:
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT );
Replied 06 Apr 2014 22:56:30
06 Apr 2014 22:56:30 Phil Boyle replied:
Thanks I will give then a go.
Replied 07 Apr 2014 21:38:10
07 Apr 2014 21:38:10 Phil Boyle replied:
I went to try and implement your ideas, checked on the website first and found that the error message was no longer happening. Don't know why, it had been working perfectly well for 3 years previously. It must be something on the hosting companies web server but they aren't saying.

Thanks for your ideas.
Replied 19 Nov 2014 03:16:49
19 Nov 2014 03:16:49 Margaret Brosco replied:
Thank you very much. That advice helped me also.

Reply to this topic