— coRpSE wroteOkay, 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.
I don't have any backups of any older files. What is in situ has been running for a while now. I may have edited it in accordance with some online forum advice on an old support website (now closed), but I can't remember any specifics - I'm just guessing on that tbh.
I tried the file you prepared that gave an instant HTTP 500 error.
PHP Strict Standards: Â Non-static method identify::identify_agent() should not be called statically in /home/xxxxx/public_html/mainfile.php on line 181
PHP Fatal error: Â Using $this when not in object context in /home/xxxxx/public_html/includes/classes/class.identify.php on line 189
I considered taking a backup of my existing "includes" folder, replacing it with the latest folder and all contents. Then decided to wait and see if you think that might just open up another can of worms.php
Okay, can you open up your mainfile.php file and send me 5 lines before and after that line that was throwing out that error.
— coRpSE wroteOkay, can you open up your mainfile.php file and send me 5 lines before and after that line that was throwing out that error.
// Include the required files
@require_once(NUKE_DB_DIR.'db.php');
//$db->debug = true;
// Include Error Logger and identify class
@require_once(NUKE_CLASSES_DIR.'class.identify.php');
global $agent;
$agent = identify::identify_agent();
@require_once(NUKE_INCLUDE_DIR.'log.php');
if (ini_get('output_buffering') && !isset($agent['bot'])) {
ob_end_clean();
header('Content-Encoding: none');
}
— lasermail wrote— coRpSE wroteOkay, can you open up your mainfile.php file and send me 5 lines before and after that line that was throwing out that error.
// Include the required files
@require_once(NUKE_DB_DIR.'db.php');
//$db->debug = true;
// Include Error Logger and identify class
@require_once(NUKE_CLASSES_DIR.'class.identify.php');
global $agent;
$agent = identify::identify_agent();
@require_once(NUKE_INCLUDE_DIR.'log.php');
if (ini_get('output_buffering') && !isset($agent['bot'])) {
  ob_end_clean();
  header('Content-Encoding: none');
}
Okay, use the class.identify.php file that I sent you before, and do this change to your mainfile.php.
Find:
PHP: [ Select all ]
global $agent;
$agent = identify::identify_agent();
Replace with:
PHP: [ Select all ]
global $agent;
$identify = new identify();
$agent = $identify->identify_agent();
You know, if you have TS3, Discord, or Skype, let me know, we can talk on there which would be faster then in here.
Okay tried those, HTTP 500 error with ...
PHP Strict Standards: Non-static method identify::identify_agent() should not be called statically in /home/xxxxx/public_html/header.php on line 147
PHP Fatal error: Using $this when not in object context in /home/xxxxx/public_html/includes/classes/class.identify.php on line 189
Sorry I know this is a long winded way of seeking your help, but I don't make use of any voice or messenger apps these days. For my part I am more than happy to keep trying things you suggest in your own time, as I can recover quickly from failures there is no urgency. I am very grateful for your efforts. Ultimately I have lived this bug spamming my error log (I clear it weekly) for some time.
PHP Strict Standards: Non-static method identify::identify_agent() should not be called statically in /home/xxxxx/public_html/header.php on line 147
PHP Fatal error: Using $this when not in object context in /home/xxxxx/public_html/includes/classes/class.identify.php on line 189
Sorry I know this is a long winded way of seeking your help, but I don't make use of any voice or messenger apps these days. For my part I am more than happy to keep trying things you suggest in your own time, as I can recover quickly from failures there is no urgency. I am very grateful for your efforts. Ultimately I have lived this bug spamming my error log (I clear it weekly) for some time.
Okay, well, it seems that we will be chasing down all these changes. My question to you is, how much custom coding do you have into your site ATM?
It may be best to grab all new files and upload them. You more and likely would need to chase every file basically reverting it back to the default that comes with the CMS. I don't know what files you grabbed to create this mess, I looked both on the Evo site and Lonestars site and couldn't find these changes, unless its earlier edits that someone else did years ago.
But like the edits above, you would want to follow that error into your header.php file, find the line
identify::identify_agent();
and change to
$identify->identify_agent();
You will also want to look above, that line for a "global". for example:
and you would want to add in a new global $identify into it, so it would look something like
But overall, just grabbing a fresh copy of the CMS, and readding all the mods and themes you have to that might be faster and easier to do than chasing down all these errors and fixing them individually.
It may be best to grab all new files and upload them. You more and likely would need to chase every file basically reverting it back to the default that comes with the CMS. I don't know what files you grabbed to create this mess, I looked both on the Evo site and Lonestars site and couldn't find these changes, unless its earlier edits that someone else did years ago.
But like the edits above, you would want to follow that error into your header.php file, find the line
identify::identify_agent();
and change to
$identify->identify_agent();
You will also want to look above, that line for a "global". for example:
PHP: [ Select all ]
global $prefix, $db, $name, $board_config, $userinfo;
and you would want to add in a new global $identify into it, so it would look something like
PHP: [ Select all ]
global $prefix, $db, $name, $board_config, $userinfo, $identify;
But overall, just grabbing a fresh copy of the CMS, and readding all the mods and themes you have to that might be faster and easier to do than chasing down all these errors and fixing them individually.
I tried that next step edit you suggested and not unexpected HTTP 500 this time with ....
PHP Warning: preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in /home/xxxxx/public_html/includes/classes/class.identify.php on line 182
PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/c426886/public_html/header.php on line 147
So I think it best we halt the piecemeal edits. I could be one more edit away, or dozens? I will do a series of backups and then install again using the version you provide. I have created some blocks, modules and numerous forum icons and images, it should be simple enough to backup, install again and recover where needed at least I assume that is the best way to use proven files over corrupt?
Thanks for giving this some of your time.
PHP Warning: preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in /home/xxxxx/public_html/includes/classes/class.identify.php on line 182
PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/c426886/public_html/header.php on line 147
So I think it best we halt the piecemeal edits. I could be one more edit away, or dozens? I will do a series of backups and then install again using the version you provide. I have created some blocks, modules and numerous forum icons and images, it should be simple enough to backup, install again and recover where needed at least I assume that is the best way to use proven files over corrupt?
Thanks for giving this some of your time.
— lasermail wroteI tried that next step edit you suggested and not unexpected HTTP 500 this time with ....
PHP Warning: Â preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in /home/xxxxx/public_html/includes/classes/class.identify.php on line 182
PHP Parse error: Â syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/c426886/public_html/header.php on line 147
So I think it best we halt the piecemeal edits. I could be one more edit away, or dozens? I will do a series of backups and then install again using the version you provide. I have created some blocks, modules and numerous forum icons and images, it should be simple enough to backup, install again and recover where needed at least I assume that is the best way to use proven files over corrupt?
Thanks for giving this some of your time.
Well, you got that error because you need to have all 3 things done. What I have been doing with you is chasing out all the bugs. You fix one, then when the next one appears, you do the next fix, and so on, but you need to have all of them in place for it to work right, You can't do one, then remove it and expect the next to work without the first fix. We were making progress.
The class.identify.php file I sent you, the mainfile.php, and the header edit all need to be done together at the same time.
But overall, Only things you need to upload is the folder includes, and maybe admin. Then the files you would want to upload from your root is the header.php, footer.php, mainfile.php, admin.php and index.php. So, ot make it more simple, just make a backup of your site, replace those files/folder(s).
Your files aren't corrupt, just, they coding is either old, or poorly updated.
I should probably have confirmed it for you in my post, but the HTTP 500 and errors was with all three edited files in place. I understood the need to use all three. I created a simple backup folder and upload folder to ensure uploads and any fixes went easily, I even ran it twice to be sure.
To convince myself I did not err, I repeated the 3 files test this morning..with the expected HTTP 500 result
PHP Parse error: Â syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/xxxxx/public_html/header.php on line 147
I think where I misled you is that I copied and pasted the line 182 error in with my previous post, which is of course the error that is the root error, and so you would think he forgot to fix that, it was a call from before the test.
So to be more accurate it is now barking out this syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/xxxxx/public_html/header.php on line 147
which is in fact one of the lines recently edited ( $user_agent = identify->identify_agent();)
To convince myself I did not err, I repeated the 3 files test this morning..with the expected HTTP 500 result
PHP Parse error: Â syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/xxxxx/public_html/header.php on line 147
I think where I misled you is that I copied and pasted the line 182 error in with my previous post, which is of course the error that is the root error, and so you would think he forgot to fix that, it was a call from before the test.
So to be more accurate it is now barking out this syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/xxxxx/public_html/header.php on line 147
which is in fact one of the lines recently edited ( $user_agent = identify->identify_agent();)
— coRpSE wroteBut overall, Only things you need to upload is the folder includes, and maybe admin. Then the files you would want to upload from your root is the header.php, footer.php, mainfile.php, admin.php and index.php. So, ot make it more simple, just make a backup of your site, replace those files/folder(s).Your files aren't corrupt, just, they coding is either old, or poorly updated.
Holding off doing what you have suggested above as my hosts have had some network issues. It took my site down for several hours today. So I will give it a day or two to settle, in case things take a dive again when I am mid way through trying different files etc...it would add confusion I do not need.
I prepared all backups, and updated files/folders to upload, taking into account stuff I added recently such as Honeypot.
I will update this thread in the next few days to hopefully to give it closure. Someone else might have a similar issue one day?