Goto page 1, 2, 3  Next

[SOLVED] Error log lodger

661

Wed Sep 19, 2018 6:57 am
NOOB!!!
24 Posts
I have been trying in vain to track down the cause and subsequent fix for an error on my site for sometime...my Error log is spammed daily with

PHP Warning:  preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in /home/xxxxxx/public_html/includes/classes/class.identify.php on line 182

Line 182 reads preg_replace_callback($pattern, $replacement, $agent);

Can anyone suggest a suitable fix?
Wed Sep 19, 2018 12:18 pm
Clan Leader
Top Dog
2600 Posts
Can you pack your file into a .zip or a .rar and attach the file you have to a post here so I can see it better. I am guessing that it's a file that lonestar pushed out for its a PHP 7.x fix.


Expand
Thu Sep 20, 2018 12:41 am
NOOB!!!
24 Posts
As requested


 
Thu Sep 20, 2018 12:20 pm
Clan Leader
Top Dog
2600 Posts
Okay, did you modify this file or did you download this from somewhere?


 
Fri Sep 21, 2018 12:32 am
NOOB!!!
24 Posts
— coRpSE wrote
Okay, did you modify this file or did you download this from somewhere?


Must admit when I looked at it I thought, that does not look like a file lonestar edited, too old. I have not modified it as far as I know. My website is using 2.0.9d files, updated from 2.0.7 and that might too have been an update of an earlier version? I have installed a few bits and pieces since, some of them claimed fixes for errors. I might have fixed one thing to break another? My server hosts too have dabbled about on the site from time to time. Other than that I would say, when migrating thousands of files via FTP (using FileZilla and it is one of the better ones) things do not always go to plan.

If the version of class.identify.php I am using is out of date, corrupt or an unknown import, I guess I should simply obtain a new one and try it?


 
Fri Sep 21, 2018 9:55 am
Clan Leader
Top Dog
2600 Posts
Well, it looks like that was edited for PHP7, but not correctly. What version of PHP are you using on your site? If your running PHP 5.6, then I would grab a new class.identify.php from the download and add that to your site. If your on PHP7, then I will get you a working file.


 
Fri Sep 21, 2018 12:27 pm
NOOB!!!
24 Posts
— coRpSE wrote
Well, it looks like that was edited for PHP7, but not correctly. What version of PHP are you using on your site? If your running PHP 5.6, then I would grab a new class.identify.php from the download and add that to your site. If your on PHP7, then I will get you a working file.


If I check on my hosts cpanel PHP Version reads 5.6.37
If I check on Nuke Evo system info panel it reads as PHP Version 5.5.38

I will guess I am using 5.6 and at least not PHP 7 and so try the version in your download. I will update the thread with the result in due course.


 
Fri Sep 21, 2018 12:40 pm
NOOB!!!
24 Posts
Okay did a quick backup of the current mystery file, installed the one in your current download instant white screen 500 error.

HP Fatal error:  Class 'DBException' not found in /home/xxxxx/public_html/includes/db/mysql.php on line 251

Restored with the backup.

CENSORED!!!


 
Fri Sep 21, 2018 1:39 pm
Clan Leader
Top Dog
2600 Posts
That happened probably because you have several other files, possibly the public_html/includes/db/mysql.php that has been changed.
Do you happen to have the files that you uploaded and overwritten the original files?


 
Fri Sep 21, 2018 4:44 pm
Clan Leader
Top Dog
2600 Posts
Okay, try this, make a backup of what you have now and download the attached file and give this a try. I just modified the one you sent with a pretty original function.


 
Goto page 1, 2, 3  Next
Forums ©