Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: ɔɔɔɔɔɔuɥoɾ on July 28, 2009, 01:21:17 PM

Title: critical error
Post by: ɔɔɔɔɔɔuɥoɾ on July 28, 2009, 01:21:17 PM
Quotehttp://www.requestiso.com/index.php?action=search2
Wrong value type sent to the database. Integer expected. (timestamp_maximum_age)
Function: plushsearch2
File: /home/reque4/public_html/Sources/Search.php
                              Line: 396                            

I have no idea whats causing this, and how bad this error is and what security vulnerabilities it can cause. All I can see here is maybe it has something to do with searching, but I dont know, can anybody help me with this issue.

Thanks in Advanced.
Title: Re: critical error
Post by: tyty1234 on July 28, 2009, 03:15:51 PM
Have you recently installed any mods?
Title: Re: critical error
Post by: ɔɔɔɔɔɔuɥoɾ on July 29, 2009, 11:41:21 PM
Recently Installed Link checker mod from M-DVD, but its disabled at the moment, and that post has no checkable links in it, so I have ruled that out, its only happening on the "WAP" pages though, its all I can notice that may help figure this problem out
Title: Re: critical error
Post by: tyty1234 on July 30, 2009, 06:49:36 PM
Can you please attach your Search.php file?
Title: Re: critical error
Post by: ɔɔɔɔɔɔuɥoɾ on August 01, 2009, 01:35:30 PM
here is my search.php file from Sources directory.
Title: Re: critical error
Post by: tyty1234 on August 01, 2009, 01:59:06 PM
Honestly, there is nothing wrong with that error. It seems to be right, but I can't debug where it's coming from either... :(
Title: Re: critical error
Post by: ɔɔɔɔɔɔuɥoɾ on August 01, 2009, 10:02:26 PM
Well, I guess it must be something else, Case open for some experts...

EDIT:
This is another error (database error) also currectly in support (mod). Maybe it can help.

Quote
http://www.requestiso.com/index.php?topic=663.10;wap2

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND b.contributionsEnable
GROUP BY t.id_member_started' at line 5

File: /home/reque4/public_html/Sources/Display.php
Line: 1030

(currently in support for contributions mod as it seems like the culprit.)
http://www.simplemachines.org/community/index.php?topic=286299.msg2181079#msg2181079

Title: Re: critical error
Post by: Sarge on August 07, 2009, 09:53:42 PM

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND b.contributionsEnable
GROUP BY t.id_member_started' at line 5


What this means is that the query has a problem before the shown lines. Can you attach Display.php too?
Title: Re: critical error
Post by: Sarge on August 07, 2009, 10:59:12 PM
Quote from: johncccccc on July 28, 2009, 01:21:17 PM
Quotehttp://www.requestiso.com/index.php?action=search2
Wrong value type sent to the database. Integer expected. (timestamp_maximum_age)
Function: plushsearch2
File: /home/reque4/public_html/Sources/Search.php
                              Line: 396                            

I have no idea whats causing this, and how bad this error is and what security vulnerabilities it can cause. All I can see here is maybe it has something to do with searching, but I dont know, can anybody help me with this issue.

Thanks in Advanced.

This can happen when the maximum message age in the search page is a very large value higher than 9999 (four nines). I replicated the issue when I tried with 99999 (five nines):

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Feasycaptures.com%2Ffs%2Fuploaded%2F319%2F2637678676.png&hash=f9cea128b6f330fbcdd8d053ac114a06b7cca329)

What is the default value for the max age in the search page of your forum?
Title: Re: critical error
Post by: Sarge on August 08, 2009, 12:20:47 AM
Reported to the SMF bugtracker: [3650] Maximum message age is not properly checked when searching (http://dev.simplemachines.org/mantis/view.php?id=3650)

I proposed a solution in the report. Try it and let us know. :)
Title: Re: critical error
Post by: ɔɔɔɔɔɔuɥoɾ on August 08, 2009, 01:52:50 PM
attachments:

Display.PHP
Search.PHP

from SOURCES DIR.

Im still reading the above message and looking into the solution posted, there are the files :)


EDIT:
Im looking for the"Message Age" option, I dont see it, where is it?

Thanks in Advanced :D

EDIT 2:
tried solution, cleaned error log, lets wait and see :D
Title: Re: critical error
Post by: Sarge on August 08, 2009, 07:53:14 PM
Let us know how it goes. :)
Title: Got a Critical Error in Log
Post by: ɔɔɔɔɔɔuɥoɾ on February 14, 2010, 12:43:26 PM
Got a Critical Error in Log:


hxxp://www.requestiso.com/index.php?action=search2
Wrong value type sent to the database. Integer expected. (timestamp_maximum_age)
Function: plushsearch2
File: /home/reque4/public_html/Sources/Search.php
Line: 396



This error occurred by the same user twice
SMF 2.0 RC1.2 SteelV theme (currently not in theme site).

Thanks in Advanced
Title: Re: critical error
Post by: Kill Em All on February 14, 2010, 01:54:26 PM
I merged both your topics, please do not create multiple topics regarding the same issue.

Have you tried the above solutions? I also suggesting upgrading SMF to RC2 as that is currently the latest one.
Title: Re: critical error
Post by: ɔɔɔɔɔɔuɥoɾ on February 14, 2010, 05:59:04 PM
Oh yes, I forgot about that, its been so long... sorry...

Anyway, I have not changed any of the files nor installed any mods since then, So, yes all above suggestions have been tried from the last time.

Any ideas on something thats not actually critical that can cause this error, like a search term that was used maybe, or possibly something else similar ???


EDIT:

I just re-checked my search.php file and the error fix was not applied, I had changed it before, well I have changed it again, lets see what happens :)

Quote
Proposed solution:

Search.php, line 370:
    if (!empty($search_params['maxage']) || (!empty($_REQUEST['maxage']) && $_REQUEST['maxage'] != 9999))

Replace != 9999 with < 9999.