Search not working
« on: September 15, 2014, 02:45:43 AM »
I've just installed the latest version of OSDate however the search box on the login page does not seem to bring back any results. There are no users in the system apart from those that come pre-installed. Is this a known bug in the system or how can I work around it?

The advsearch.php script works and returns users just as it should but searchmatch.php does not seem to return anyone no matter what parameters are fed into it even if it is called directly from a URL such as : searchmatch.php?txtgender=F&txtlookgender=M&txtlookagestart=16&txtlookageend=90&lookcountry=AA&srchzip=

Your help is much appreciated.
« Last Edit: September 15, 2014, 03:07:54 AM by box200 »

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Search not working
« Reply #1 on: September 15, 2014, 03:13:08 AM »
I've just installed the latest version of OSDate however the search box on the login page does not seem to bring back any results. There are no users in the system apart from those that come pre-installed. Is this a known bug in the system or how can I work around it?

The advsearch.php script works and returns users just as it should but searchmatch.php does not seem to return anyone no matter what parameters are fed into it even if it is called directly from a URL such as : searchmatch.php?txtgender=F&txtlookgender=M&txtlookagestart=16&txtlookageend=90&lookcountry=AA&srchzip=

Your help is much appreciated.

Hi box200,

If you check in the admin, you might find that the pre-installed users are expired, this could the reason why your getting no result or
your are searching in the wrong country as most of the installed users are from the USA and United Kingdom.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: Search not working
« Reply #2 on: September 15, 2014, 03:18:40 AM »
Thank you for your quick reply, however all 11 profiles that come with the installation are active - the system was only installed a couple of days ago. I have tried searching in the US and UK for users but nothing is ever returned from searchmatch.php

Re: Search not working
« Reply #3 on: September 15, 2014, 03:52:04 AM »
Here's something else that's interesting with the search box* If you set the "to" age in the search box to, say 30, then repeatedly press the "search" button the "to" age as displayed in the "to" age search box increases by one every time the button is pressed. Maybe the value of a variable is getting mixed up somewhere in the code? Could this affect the reason why the search from searchmatch.php does not produce anything?

In fact if you search through searchmatch.php for "+1" in a text editor (I used Notepad) it reveals that "+1" is indeed added to variable such as "txtlookageend" and near the end of the script is the following line which re-assigns txtlookageend back to the session variable with "+1" added - could this be the source of the increasing "to" age?

$_SESSION['simplesearch']['lookageend'] = (isset($_REQUEST['txtlookageend'] )?($_REQUEST['txtlookageend'] + 1):($config['default_start_agerange']+1));

In the line of code (above) why is "+1" added to default_start_agerange too? And... if throughout the searchmatch.php script +1 had to be added to ageend why isn't -1 subtracted from the start age variable?

*I tried this on my site installed with the latest version of OSDate as well as a "demo" site of a template reseller and it happens on both sites.
« Last Edit: September 15, 2014, 04:07:11 AM by box200 »

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Search not working
« Reply #4 on: September 15, 2014, 04:22:15 AM »
Hi box200,

What version osDate have you installed and what version php is on your host?

If you have anything higher than php 5.4 with osDate 2.6.5 then you will have lots of problems.
Other things that can cause these errors is that the upload may have corrupted some of the script, try replaceing
the searchmatch.php and the showsimpsh.tpl plus the userresultviewsmall.tpl, the smallprofile.tpl.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: Search not working
« Reply #5 on: September 15, 2014, 04:27:36 AM »
The server is running PHP version 5.3 with OSDate 2.6.5

However I downloaded osDate_v219.zip from the downloads area of this site and replaced the searchmatch.php on my live site (which has the latest version of OSDate on it) with the searchmatch.php from the osDate_v219.zip file and..... IT ALL STARTS WORKING!

It would be nice if the searchmatch.php in OSDate 2.6.5 worked too.
« Last Edit: September 15, 2014, 04:29:43 AM by box200 »

Re: Search not working
« Reply #6 on: September 15, 2014, 04:36:28 AM »
I re-installed the PHP on the server using the hosting control panel and.... the searchmatch.php in OSDate 2.6.5 now works  :) however the "to" age still counts up every time the search button is pressed, set it at 30, press search and it comes back as 31, then 32.....

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Search not working
« Reply #7 on: September 15, 2014, 06:32:32 AM »
The server is running PHP version 5.3 with OSDate 2.6.5

However I downloaded osDate_v219.zip from the downloads area of this site and replaced the searchmatch.php on my live site (which has the latest version of OSDate on it) with the searchmatch.php from the osDate_v219.zip file and..... IT ALL STARTS WORKING!

It would be nice if the searchmatch.php in OSDate 2.6.5 worked too.

Very odd and have never seen this problem before.
OsDate 2.19 shouldn't work in osDate 2.6.5 they are way different and not compatible with each other, plus osDate files wont all work on php 5.3 and higher.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Pharg

  • *****
  • 2,071
  • osDate Version: osDate Evo v1.0
Re: Search not working
« Reply #8 on: September 15, 2014, 06:39:16 AM »
I re-installed the PHP on the server using the hosting control panel and.... the searchmatch.php in OSDate 2.6.5 now works  :) however the "to" age still counts up every time the search button is pressed, set it at 30, press search and it comes back as 31, then 32.....

That's not really a major problem at the moment so I wouldn't worry about to much.
Not many people or members sit there clicking search over and over again
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35