PDA

View Full Version : My search dosent work ...



Joe
Mon 5th Jun '00, 2:04pm
Oy, I just bought and installed vB on my site, so far so good, i imported all my UBB posts (had a few problems, but got it to work)... Now my search dosent work, i get a 404 error for every search i do, anyone know whats wrong? the URL is:
http://www.bikeforums.com/forum/index.php

Thanks in advance.

Martin
Tue 6th Jun '00, 12:13am
can we get a little info on your server and/or hosting service?

The pages are dynamic, so there shouldn't be a problem with 404 errors. If it was a database problem it would return a mySQL error.

werehere
Tue 6th Jun '00, 12:41am
It appears after searching that it goes to:

http://www.bikeforums.com/forums/search.php?blahblah


Notice that it is looking for /forums at that point, but the search starts out in the /forum directory. That appears why it is going to the 404.

Joe
Tue 6th Jun '00, 12:41am
Hmmm, I think this should tell you everything i can about my server, and how its set up, if not, let me know...
http://www.bikeforums.com/example.php3


I also did get a mySQL error / e-Mail, here it is:


Database error in vBulletin Control Panel: Invalid SQL: UPDATE user SET usertitle='Junior Member',lastpost= WHERE userid=360
mysql error: You have an error in your SQL syntax near 'WHERE userid=360' at line 1
mysql error number: 1064
Date: Tuesday 06th of June 2000 02:12:01 AM
Script: /forum/admin/misc.php
Referer: http://www.bikeforums.com/forum/admin/misc.php

Joe
Tue 6th Jun '00, 12:45am
Originally posted by werehere
It appears after searching that it goes to:

http://www.bikeforums.com/forums/search.php?blahblah


Notice that it is looking for /forums at that point, but the search starts out in the /forum directory. That appears why it is going to the 404.

WooHoo! I love you werehere ;) ... i added an extra s in my general settings bburl area... It works, sheesh, i feel so dumb :)

werehere
Tue 6th Jun '00, 12:52am
Glad that part worked :)

John
Tue 6th Jun '00, 1:23am
I have not been able to recreate or find your search error. However, you user problem I can confirm is a problem, although I cannot see how it could occur. I will include a fix in the next upload. In the meantime, if you want to correct it yourself, add this line to user.php, line 174:



$lastpost[dateline]=intval($lastpost[dateline]);


BTW, why were you updating the users. It should not be neccessary.

John

Joe
Tue 6th Jun '00, 6:36am
Originally posted by John
BTW, why were you updating the users. It should not be neccessary.

John

Hi John, thanks for the help, i'll add that code in a few min, hopefully it will work. anywho, i was updating the users becose i added the starts behind the user titles. and the script asked me to update the users :)

I got the Search working, it was my mistake, see my last post in this topic... thanks

=-=-=

Hrm, I added that code to the file, but get the same Database error... I guess it dosent really hurt the forums in any way, i'll just skip the stars for now.

[Edited by BikeForums on 06-06-2000 at 04:41 PM]

John
Tue 6th Jun '00, 7:02am
I meant misc.php . That was the file that was giving the error. Duh...I'm so silly

John

Joe
Tue 6th Jun '00, 7:27am
I totaly replace line 174 of misc.php with this code, right?


$lastpost[dateline]=intval($lastpost[dateline]);

Just making sure :)

[Edited by BikeForums on 06-06-2000 at 07:28 PM]

John
Tue 6th Jun '00, 7:39am
You insert that code at line 174 in misc.php, so that the surrounding code looks like this:



if (!$lastpost=$DB_site->query_first("SELECT dateline FROM post WHERE userid=$userid ORDER BY lastpost DESC LIMIT 1")) {
$lastpost[dateline]=0;
}
$lastpost[dateline]=intval($lastpost[dateline]);

$DB_site->query("UPDATE user SET usertitle='".addslashes($usertitle)."',lastpost=$lastpost[dateline] WHERE userid=$user[userid]");


John

Joe
Tue 6th Jun '00, 7:56am
Didnt work... I added it how you said, word for word... But i get the same errors... it looks like user ID 360 is screwd up? is there a way i can go into the database and delete that user? then add them later? Im lost :)

This is what i get when i run "Update Users Info"


User ids:
362
361
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Then in my email i get:


Database error in vBulletin Control Panel: Invalid SQL: UPDATE user SET usertitle='Junior Member',lastpost= WHERE userid=360
mysql error: You have an error in your SQL syntax near 'WHERE userid=360' at line 1
mysql error number: 1064
Date: Tuesday 06th of June 2000 07:42:59 PM
Script: /forum/admin/misc.php
Referer: http://www.bikeforums.com/forum/admin/misc.php


[Edited by BikeForums on 06-06-2000 at 07:58 PM]

Computer
Sat 10th Jun '00, 9:11pm
Hi,
did you find a sollution about this Problem ?
I have the same, user update don´t work at all. the rest update´s work fine.

doron
Sun 11th Jun '00, 9:08pm
if (!$lastpost=$DB_site->query_first("SELECT dateline FROM post WHERE userid=$userid ORDER BY lastpost DESC LIMIT 1")) {

I think the bug is in ORDER BY lastpost, as there is no lastpost in post.

Chaning that causes no error.

Joe
Sun 9th Jul '00, 5:28pm
Can anyone update there users info (user titles) in 1.1.3? I changed the names of my user titles, but when i try to update the user info in misc.php i still get an error, john, did you not fix this in the 1.1.3 update?

I really need to update the titles soon, could sombody post a fix here? I have been waiting for over a month now.

Heres the email i get when i try to update the user info:
Database error in vBulletin Control Panel: Invalid SQL: UPDATE user SET usertitle='Newbie',lastpost= WHERE userid=471
mysql error: You have an error in your SQL syntax near 'WHERE userid=471' at line 1
mysql error number: 1064
Date: Sunday 09th of July 2000 05:13:13 PM
Script: /forum/admin/misc.php
Referer: http://www.bikeforums.com/forum/admin/misc.php

Freddie Bingham
Sun 9th Jul '00, 5:43pm
Yes this bug is still in 1.1.3beta2 but I got around it by changing line 162 to this:



if ($user[customtitle]==0 and $user[posts]!=0)


It now skips all users with 0 posts as that is what generates the error. users with 0 posts don't have anything titles showing on the forums and with their first post their info will be changed anyway.