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?
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?
As requested
Okay, did you modify this file or did you download this from somewhere?
— coRpSE wroteOkay, 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?
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.
— coRpSE wroteWell, 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.
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.
HP Fatal error: Class 'DBException' not found in /home/xxxxx/public_html/includes/db/mysql.php on line 251
Restored with the backup.
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?
Do you happen to have the files that you uploaded and overwritten the original files?
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.