Goto page Previous  1, 2, 3  Next

[SOLVED] Error log lodger

661

Sat Sep 22, 2018 1:23 am
Original Poster
NOOB!!!
24 Posts
— coRpSE wrote
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.


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

hrm
Sat Sep 22, 2018 5:55 am
Clan Leader
Top Dog
2689 Posts
coRpSE
Online
Most Played:
This week: 69.4hrs.
Total Played: 69hrs.


  
Must be a looser...
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.
Sat Sep 22, 2018 6:38 am
Original Poster
NOOB!!!
24 Posts
— coRpSE wrote
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.


// 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');
}


 
Sat Sep 22, 2018 7:49 am
Clan Leader
Top Dog
2689 Posts
coRpSE
Online
Most Played:
This week: 69.4hrs.
Total Played: 69hrs.


  
Must be a looser...
— lasermail wrote
— coRpSE wrote
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.


// 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.


 
Sat Sep 22, 2018 8:10 am
Original Poster
NOOB!!!
24 Posts
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.


 
Sat Sep 22, 2018 8:46 am
Clan Leader
Top Dog
2689 Posts
coRpSE
Online
Most Played:
This week: 69.4hrs.
Total Played: 69hrs.


  
Must be a looser...
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:

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.


 
Sat Sep 22, 2018 9:31 am
Original Poster
NOOB!!!
24 Posts
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.


 
Sat Sep 22, 2018 10:33 am
Clan Leader
Top Dog
2689 Posts
coRpSE
Online
Most Played:
This week: 69.4hrs.
Total Played: 69hrs.


  
Must be a looser...
— lasermail wrote
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.


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.


 
Sat Sep 22, 2018 11:44 pm
Original Poster
NOOB!!!
24 Posts
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();)


 
Mon Sep 24, 2018 8:51 am
Original Poster
NOOB!!!
24 Posts
— coRpSE wrote
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.


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?


 
Goto page Previous  1, 2, 3  Next
Forums ©