Bad error on subs.php

Started by wynnyelle, December 22, 2011, 12:51:53 PM

Previous topic - Next topic

wynnyelle

I was told I have a bad error here:

Quote
/home/warrior/public_html/Sources/Subs.php on line 3065

I don't know what the error is, would anyone know what might go wrong on there?

Illori

what is the whole error message? it should tell you what the error is on that line, and without your file we cant tell you what the fix may be.

wynnyelle

This is what I got:

Quote
[Wed Dec 21 19:20:42 2011] [error] [client 72.9.153.236] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/warrior/public_html/Sources/Subs.php on line 3065

Illori



Illori

http://www.simplemachines.org/community/index.php?topic=380927.0 seems to be the only thing related to this, in trunk that line has been changed to what is in the last post in that thread

Joker™

Can you give us more details regarding this, as who produced the error "guest" or "member".

Also is this error generated frequently?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

wynnyelle

I'm sorry...you guys totally lost me. I don't understand, and right now I have no further information. I have attached the file. I don't know what to do to fix it.

Yes, it is a frequent error.

Joker™

Quote from: Groovystar on December 22, 2011, 03:19:17 PM
I'm sorry...you guys totally lost me. I don't understand, and right now I have no further information. I have attached the file. I don't know what to do to fix it.

Yes, it is a frequent error.
As illori suggested, have you tried the code change provided in this reply?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

wynnyelle

That error is on a different line, so I didn't want to do anything yet until I spoke to Flamer, who is the one who found the error.

Illori

that is because you have mods installed, it is still the same code that needs to be replaced.

wynnyelle

Oh it is? I'm sorry! I didn't know.

I will try the fix and get back to you.

Joker™

Quote from: Groovystar on December 22, 2011, 04:02:20 PM
That error is on a different line, so I didn't want to do anything yet until I spoke to Flamer, who is the one who found the error.
Please do give us the feedback about how the fix went for you.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

wynnyelle

I totally don';t know what I am supposed to put into that line. Where does it actually tell you what to change it to?

Joker™

Quote from: Groovystar on December 22, 2011, 01:29:29 PM
This is what I got:

Quote
[Wed Dec 21 19:20:42 2011] [error] [client 72.9.153.236] PHP Notice: Undefined index: HTTP_USER_AGENT in /home/warrior/public_html/Sources/Subs.php on line 3065

Make backup of file before editing it

Sources/Subs.php

Line: 3065
Code (Find:) Select
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

Code (Replace it with:) Select
$_SESSION['USER_AGENT'] = empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT'];
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

wynnyelle

I tried it and the entire site wouldn't work. I re-uploaded the old file.

wynnyelle

The code editor won't input the edits without wiping the file. That's why, I discovered. I'm helpless here. I can't fix the file and when I try to open it in notepad on my own computer, the entire thing's a mess.

live627

You need something that recognises Unix line endings, ssuch as Notepad++,  not the one that comes with Windows.

live627

I edited the file accordingly.

wynnyelle

Thank you. Would I be able to get Notepad++ for free, or does it cost something?

Illori


wynnyelle

Thanks, I'll look it up.

So this edit--it should fix the error I've been getting? Is this a common error?

Illori

it does not seem to be common, only other thread i found on the issue is the one i linked to above.

wynnyelle

Thank you to everyone for your help here. The fix seems to have solved this problem!

zinyaw

QuoteStrict Standards: require_once() [function.require-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/myanmar9/public_html/Sources/Subs.php on line 936

Parse error: syntax error, unexpected '*' in /home/myanmar9/public_html/Sources/Subs.php on line 936


what this error? Please explain . Thank

Illori

please open a separate thread for your issue, this thread belongs to someone else and is marked solved. also please dont bump old threads.

Advertisement: