Previous Thread
Next Thread
Print Thread
Hop To
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Under Control Panel » Feature Settings - Search

I don't see a way to set the default. Currently it defaults to 1 Weeks. How can I change that to default to 3 Years?

Do I have to modify the php code ?


Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

You can change the Search Template (templates/default/search.tpl)

Lines 83-90 (in T7.00) you'll see something similar to this:
Code
{$lang.NEWER} <input type="text" name="newerval" size="2" class="form-input" value="3" />
<select name="newertype" class="form-select">
<option value=""></option>
<option value="d">{$lang.DAY}</option>
<option value="w">{$lang.WEEK}</option>
<option value="m">{$lang.MONTH}</option>
<option value="y" selected="selected">{$lang.YEAR}</option>
</select>

Replace what you have with what's above.

In the first line, you'll want value="3" (like above) if you want to search NEWER than 3 DAYS/WEEKS/MONTHS/YEARS.

In the last line you see selected="selected" in the YEARS row, because you want YEARS selected rather than WEEKS (you want to cut/paste that, not copy/paste -- you don't want "selected" in there for years & weeks, just years)



GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Thanks much jgeoff - worked a treat. grin


Now just need Rick to add stuff like that to the Admin Console to be able to easily modify vars like that.


Last edited by ntdoc; 11/29/2006 10:06 PM.
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well now.. not sure if related but seems something is now pissed off on the box.


Quote
Fatal error: Maximum execution time of 30 seconds exceeded in mysite.org\html\forums\libs\smarty\internals\core.write_file.php on line 28

Could be coincident but sure great timing if it is.


Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
That's one of the reason why the default is only at 1 week. wink Searches on the database going back several years are extremely intensive depending on the database size and speed of the server. If you have several people making a search and it's searching back several years it can totally lock up the database.

We set the default to 1 week as in many cases that's far enough back as people are searching for something they've seen before. You want the user to make a conscientious effort to make it search a wider range and only if they really need to search that far back.

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well not sure. I had 3 instances of PHP running and each was taking about 30% of the CPU plus other stuff till the CPU was at 100%.

Dang... well the nature of our board and scripting does often make us search way back in time. We had 6.5.1 set to 3 years as the default as well and did not run into this issue so something is not as fine tuned as it was in previous version if this is in fact the cause.


Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
6.5 wasn't using full text searches though, whereas 7.0 does


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well it's not the searches. I've put the original file back in place from the original zip source and I've rebooted the Server.

Every time PHP launches (nothing to do with searching) just pulling up a link or anything it takes about 1/3 of the CPU and about 10MB of RAM. So basically once 3 people are on or if you do something to cause 3 separate instances of PHP you've maxed the server out.

The system has been running fine now for a few days, only real change was that search file, but now it's back to oem.

Doing some other dianostics on the system now, but something is causing the board to hang now. Just clicking to the main forum site hangs it.



Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
This sounds like a problem I worked on before where the system had a session file problem in their PHP configuration. They had so many session files it was making the server barf. Might not be the same issue but worth taking a look inside your sessions directory and making sure you don't see any files more than an hour or two old.

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Had 3 from about a year old. All the others seem to be within about an hour. Is it safe to remove all the sessions and just have people log back on?

Okay I "thought" I put the file back, but when I go into Control Panel - Styles and edit the search file it says 1 week, but on the board when I click the SEARCH link it still says 3 years even though I've replaced the file from source as well. Have rebooted the server and have logged out and back in.

Where else is this being cached maybe?


Last edited by ntdoc; 11/30/2006 2:10 AM.
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
So what is different about the board here?

I just did a search and set it to 4 years (Rick must have changed that quite recently) and it completed the search in like 3 or 4 seconds and did not seem to impact the system.

My site used to be quick, now it won't even run faster than an old Chevy Vega


Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

Not for nothin', but I know my mod didn't cause that wink

I've had mine set for *4* years since I installed 7.0 and never had a problem (with a decent-sized forum)... and I'm on a shared server with over 10 of my own sites on it, let alone others'... so it can't be that... I hope. lol



GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
Originally Posted by ntdoc
We had 6.5.1 set to 3 years as the default as well and did not run into this issue...

I came from Classic 6.7.2 and it searched since Day 1 without a problem. I was actually looking for a "search all" option, so I wouldn't have to change the "year" value every year.

Rick - Just out of curiosity, tho... and assuming the server could handle it... My BB has been live for just over 5 years. What would happen if I set the search range above that, say to 10 or 20 or even 1000 years? Would it break, or work as "all time"?



GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well you got any ideas why the SEARCH still says 3 Years when I've replaced the file with the oem file and rebooted even.

Have logged out of the site, deleted the cookie, log back on hit Search link and it still says 3 years.

Now.... board keeps giving the timeout error and can't even log onto the site right now.


Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

Have you tried clearing the cache via Control Panel?


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Originally Posted by jgeoff
Have you tried clearing the cache via Control Panel?

Just did that too and same thing. Still set to 3 Years.

Okay... at this point not sure but looking like I'm going to have to do a restore to get back to normal again.

This is REALLY starting to suck though. This is now the 2nd time I will have had to do a restore to fix an UNKNOWN problem that can't seem to be resolved.


Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

I'm no server expert, but it sounds much more serious than some HTML edit to me... :/


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well this SUCKS

I don't think editing of STYLES from the Control Panel works.

I'm not sure the delete does either. There are still files in the CACHE folder even after I said to delete.

Is it safe to delete all the files in the CACHE folder?


Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
Give the /styles directory 777 permissions if you haven't already...

As for the /cache directory -- I would think it'd be safe to empty it. Considering caches are meant to be temporary anyway.



GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Since I was specifically asked to post my opinions on this matter (even though they've already been stated) I'm here...

It sounds like either your computer is caching data, or the forum is, I'd suggest first clearing your cookies on your pc then delete your temporary internet files.

IF that doesn't work, clear your forum cache.

If this doesn't work, delete the appropriate cached files from your cached folder; I wouldn't recommend removing *all* files from the cache, but considering I purge them for a beta test it shouldn't be too much of an issue.

And for note, it's not necessarily only files that you don't need in your cache, classic stored other files in the cache directory as well that one wouldn't have to routinely purge.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Dang.. my own ISP dropped me for about an hour.

Did all that and still some problem going on.

Well I'm on a Windows 2003 Server and ACL permissions seem fine. The TESTS from control panel all say okay for perms.

I did a restore of the site from yesterday and still something wrong. Every time PHP launches it sucks way too much resources and takes a long time to launch the site.

Analyze of the MySQL files did not show any issues either.

Will look at dropping the database and doing a restore and see if that fixes it. Really weird.


Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Well kiss my A** drop the database and re-import from a backup earlier today and now the site is fine again.

mad mad mad

So maybe lost a few posts but site is now back to being speedy again. Weird since MySQL Analize of the tables did not show any issues.

Well I certainly hope the site doesn't crap out again anytime soon. Wish I could pin point the cause of the failure too.


Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
What the heck are all these SMARTY temp files ? They all start with like WRT?????.tmp

They look like this in the beginning

Quote
<?php /* Smarty version 2.6.9, created on 2006-11-30 11:08:15
compiled from header.tpl */ ?>

But I had over 65,000 of them in my C:\WINDOWS\TEMP folder taking up almost 800MB. I deleted them all, rebooted and there are now 175 of them again and my site has only been up for a few minutes.

That many dang temp files on a Windows box could be an issue.

Why are they there? Why don't they auto cleanup on their own?
Can I schedule a task to delete those files once a day?


Last edited by ntdoc; 11/30/2006 6:28 AM.
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Already back up to about 800 files and about 10MB of these files in the C:\WINDOWS\TEMP folder again.

Rick... what gives? This will deplete my OS volume within a few weeks or less if some routine doesn't clean up these files.


Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
What version of PHP are you running? PHP is supposed to delete those as soon as it's done, but I know in older versions there was a bug under Windows that the temp files were created with readonly permissions so PHP couldn't delete them. Fairly common complaint when doing a quick google.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Once the tmp file situation is figured out if you can open a ticket or send me a PM with the admin info to your forum I'd like to take a look at the indexes to make sure they've been created and are being used properly.

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
PHP Version 4.4.1

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
So do you have a link to this PHP bug you're speaking of. Saw some hits on Google but nothing definitive and version bound.

My current version is: PHP Version 4.4.1

I want to update the PHP version to 5.20 anyways but would still like to confirm if 4.4.1 is the root cause of my issues or not.

Thanks

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
The one actual bug report is here. But it's fairly old, I think the version you're using came out after that.

One thing to do is check the actual permissions on that folder and some of the tmp files within. The session problem I was referring to before turned out to be a permission issue on the directory itself so PHP could create and write to the files, but couldn't delete them.

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Just want to say a BIG THANKS to Rick.

Rick worked quite a bit with my yesterday debugging what was going on with my site.

1. Seems a possible setting in PHP.ini might have been the root cause of the %temp% files not being auto cleaned. They are now cleaning up just fine.
2. Compile folder under Templates was not set to allow IIS rights to modify, it only had read rights.
3. Index files were not working correctly.

Big difference so far. My site is now MUCH more responsive, I've set the default search period to 4 years and it comes back normally within 1 second with the search results.

Modifying Templates now works as it's supposed to, now that IIS has modify rights.

Rick said he would review the docs on ACL permissions for Windows and get back with me, but so far all seems fine with that one change.


Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
Originally Posted by ntdoc
Just want to say a BIG THANKS to Rick.

Rick worked quite a bit with my yesterday debugging what was going on with my site.

1. Seems a possible setting in PHP.ini might have been the root cause of the %temp% files not being auto cleaned. They are now cleaning up just fine.
2. Compile folder under Templates was not set to allow IIS rights to modify, it only had read rights.
3. Index files were not working correctly.

Big difference so far. My site is now MUCH more responsive, I've set the default search period to 4 years and it comes back normally within 1 second with the search results.

Modifying Templates now works as it's supposed to, now that IIS has modify rights.

Rick said he would review the docs on ACL permissions for Windows and get back with me, but so far all seems fine with that one change.
(Re-quoted because I started a new page)

Good to hear that! cool

So it wasn't my mod after all? laugh wink


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Sounds great, glad you got it working properly smile


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
2 members (Havenofsobriety, rootman), 624 guests, and 106 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)