vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Plugin Based Template Cache (https://vborg.vbsupport.ru/showthread.php?t=113002)

orban 05-18-2006 12:24 AM

Well, instead of adding

Code:

if ($badfadf)
{
$post['blabdfd'] = '234324'324'324234'34;
$do
$some
$very
$complicated
$stuff
}
else
{
$more stuff
}

to, for example, the hook "post_display_complete", you move the code to a function and just call the function "do_very_complicated_things()" in the hook "post_display_complete". The function itself is in the file plugins.php and gets include('plugins.php'); in the hook "global_start"

Robbed 05-18-2006 12:47 AM

How does it compare to this hack

https://vborg.vbsupport.ru/showthread.php?t=107615

Would it have to be unistalled?

orban 05-18-2006 11:18 AM

If you are using gzip the template compression hack is near to useless I think.

But it *should* work with it (you should be able to use both at the same time).

MissKalunji 05-18-2006 11:25 AM

Ok i get it orban
Thanks

Still chineese for me tho :(

orban 05-18-2006 11:31 AM

Hehehe :)

almqdad 05-18-2006 02:26 PM

Hello

thanks orban

I have instaled the plugin

I also have Vbulletin Template Compressor

no problem so far

Robbed 05-18-2006 03:27 PM

Quote:

Originally Posted by orban
If you are using gzip the template compression hack is near to useless I think.

But it *should* work with it (you should be able to use both at the same time).

OK, I will give it a try

Zia 05-20-2006 09:50 AM

Hello Orban,

We need a real urgent help...
The folder "Template's" chmood needed to be 777.
But our host doesnt allow 777.They are allowing 755 instead of 777.

Could we have an alternate way to install this hack using chmood 755.

Waiting for ur help.

orban 05-20-2006 10:29 AM

Is he running SuEXEC? Then even 700 is fine.

The problem is that usually PHP runs as a different user than the script is, so to write in folders they have to writeable by world.

You could also ask him to chown the templates/ folder "to PHP" so PHP can write files there.

Zia 05-21-2006 02:57 AM

Quote:

Originally Posted by orban
Is he running SuEXEC? Then even 700 is fine.

Here Is our System :
System :FreeBSD clust07-www02.powweb.com 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Thu Ma i386

Quote:

Originally Posted by orban
The problem is that usually PHP runs as a different user than the script is, so to write in folders they have to writeable by world.
You could also ask him to chown the templates/ folder "to PHP" so PHP can write files there.

In our host, the host provider does'nt allow ssh. We use Flash FXP for ftp..
would u mind to provide lil.bit more help..how could we do that "to PHP" using FlashFXP ?

Waiting for ur help..

Thnx.

Edit:I search host's forum

http://forum.powweb.com/showpost.php...55&postcount=5
Quote:

As PowWeb uses SuEXECed CGI/PHP, you don't need to use these unsafe permissions of 666/777,
unless the script is badly written and checks the permission explicitly even they are not required.
Reasonable vendors should be able to correct their code without ptoblem.
Using these unsafe permissions on shared hosting is a suicidal act, with the current situation of the internet.
Can we step forward now?

orban 05-21-2006 08:50 AM

Yes. You can skip the "777" part, just create the folder and you should be fine.

Zia 05-22-2006 05:45 AM

Thanx Orban...

Its working.in the folder */templates.
there are lots of "0236aa96292f9f5152491448c0274cb8.php" this kinda names of file are there..yet not checkd the size(mb)...
can them be deleted or i should keep them?

btw can u tell me...how could i check 1 query per page is saved..?
only see in forum home 1 query saved..(it was 22 now 21) but in the other page..? any way to check that 1 query is saved ?

orban 05-22-2006 10:30 AM

You can turn the extension off (in the vBulletin Options), refresh the page, check the number of queries, then turn it on again, refresh, and check the number again. :)

All the "0236aa96292f9f5152491448c0274cb8.php" type of files are in use and should not be deleted. But it won't break anything if you do, because they just will be recreated.

TomasDR 05-23-2006 04:12 AM

I will keep it marked installed to see if there is a solution but I am having one issue with this hack so I do have it disabled since my members enjoy the following hack so much.

It breaks the "Who has read" hack: https://vborg.vbsupport.ru/showthread.php?t=112192

Any thoughts?

orban 05-23-2006 10:50 AM

Yeah, you have to add SHOWTHREAD to "Exclude Templates".

orban 05-24-2006 09:11 PM

Worked?

Zia 05-25-2006 02:02 AM

Helo Orban,

we gor it installed.Its working...Thnx Man.
Need lil.bit help..
Like: whenever is there any change in template,we have cache the template again ,right?? But How ?
Every time uninstall ,delete all the ***.php file in */forum/templates ??
its really compliccated...

so if y added a acp option of uncaching..it will be really nice...

plz give a thought on it..

orban 05-25-2006 09:31 AM

It's automatically removing all the files in templates/ folder when you edit/add any templates.

If this doesn't work for you let me know...!

Kihon Kata 05-25-2006 01:13 PM

Hey...just wanted to pop in and update everyone who uses this hack. We run a semi active site (1,500-2,200 posts/day). I am running MySQL 4 (with caching) and ALSO caching PHP with eAccelerator. We are Caching Templates Seperately with this hack. The hack is one of the best ones I have ever seen for performance. It seriously sped things up for our site. Our templates folder runs at about 20mbs at any one time.

~Thanks Orban

Zia 05-27-2006 03:18 AM

Quote:

Originally Posted by orban
It's automatically removing all the files in templates/ folder when you edit/add any templates.

If this doesn't work for you let me know...!

helo Orban,

nop it does'nt remove all the *************.php files in */forum/templates
we had to del all the files manually..we un-install this & re-install again for cache again...after template edit.

one more point:
to cache all template separately- php acclerator needed to be installed
In our host
Quote:

the Zend Optimizer info is there. So your PHP processes 'are' being accelerated.
so we can cache template separately using this zend optimizer?

waiting for ur early reply..

Thnx.

orban 05-27-2006 07:55 AM

Thank you Kihon Kata!

Quote:

Originally Posted by Zia
nop it does'nt remove all the *************.php files in */forum/templates
we had to del all the files manually..we un-install this & re-install again for cache again...after template edit.

Can you check if the plugin "include template_cache.php & clear template cache" in the hook "admin_global" is installed in your installation?

That hook holds the function to clear the templates/ folder if either a new template is added or a template is edited.

This works for me and I hope for the other customers in here because if it was an issue I'm sure it would have come up. It's maybe a special problem with your PHP environment. What versions are you running? It's really hard to debug such things over a web forum if you really want it fixed you might need to let somebody on it who knows PHP and all that stuff and can check it over FTP on your installation or something.

Quote:

Originally Posted by Zia
one more point:
to cache all template separately- php acclerator needed to be installed
In our host

so we can cache template separately using this zend optimizer?

As far as I know Zend Optimizer does not cache PHP code, it just optimizes it. So the option to cache templates seperately is probably not recommended for you (I'd only recommend using it when you use a PHP cache like APC/eAccelerator/...

Zia 05-27-2006 08:18 AM

oh..okay then.....

if i send u our php.ini can u understand the situation?

orban 05-27-2006 08:23 AM

A phpinfo() would be enough, I'll try to find something out but can't guarantee anything :(

Zia 05-27-2006 08:50 AM

helo Orban,

PHP Version 4.4.2
Build Date Feb 22 2006 18:00:44
Configure Command:'./configure' '--prefix=/usr/local/php4' '--with-pear=/usr/local/lib/php' '--with-pspell' '--with-t1lib' '--with-mime-magic' '--enable-force-cgi-redirect' '--enable-safe-mode' '--enable-versioning' '--with-mysql=/usr/local' '--with-enabled-local-infile' '--with-dbase' '--enable-ftp' '--with-openssl' '--with-imap' '--with-imap-ssl' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-freetype-dir' '--with-jpeg-dir=/usr/local' '--with-zlib' '--enable-libgcc' '--enable-mbstring' '--enable-xslt' '--with-xslt-sablot' '--with-gettext' '--with-curl' '--with-mcrypt' '--with-dom' '--with-dom-xslt' '--with-mhash' '--with-zip' '--with-bz2' '--with-iconv' '--enable-exif' '--enable-bcmath' '--enable-calendar' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-wddx'

Server API : CGI
PHP API : 20020918
PHP Extension: 20020429
Zend Extension : 20050606

Zend Memory Manager : enabled
Registered PHP Streams : php, http, ftp, https, ftps, compress.bzip2, compress.zlib

Optimization Pass 1 enabled
Optimization Pass 2 enabled
Optimization Pass 3 enabled
Optimization Pass 4 enabled
Optimization Pass 9 disabled
Zend Loader enabled

els that if u need any more info..i can give u..admin pass/ftp pass

plz have a look

Thnx man for ur support

Zia 05-27-2006 09:05 AM

zend cache will do the work ?

orban 05-27-2006 10:32 AM

Quote:

Originally Posted by Zia
zend cache will do the work ?

Yes, Zend Cache caches PHP scripts as far as I know.

dutchbb 05-28-2006 03:14 PM

Wel, it seems to be working, but my plugins have no effect anymore. There just gone....

So is disables other hacks, too bad have to uninstall this then..

orban 05-28-2006 03:16 PM

It doesn't disable anything.

What plugins do not work? Can you disable the "Cache Templates Seperatly" option and see if they work?

dutchbb 05-28-2006 03:21 PM

When I disable that the plugins work again yes, however:

Quote:

This option is only recommended if you use a PHP cache like APC/eAccelerator/etc. This can also decrease performance if you're not using a PHP cache.
I do use eAccelerator, so disabling it wouldn't be a good idea?

Besides that it does seem to make the board faster, lower the load and if i'm correct there is a query gone on every page, so nice hack.

orban 05-28-2006 03:34 PM

Let me know with what plugins you have problems. It's just most likely due to the fact that they are not compatible with the "Cache Templates Seperatly" and you can partially fix that by excluding some templates.

dutchbb 05-28-2006 04:01 PM

Quote:

Originally Posted by orban
Let me know with what plugins you have problems. It's just most likely due to the fact that they are not compatible with the "Cache Templates Seperatly" and you can partially fix that by excluding some templates.

Well AFAICS

- Add PhotoPost Pro to each forum 1.0 Add PhotoPost Pro to each forum

- Bump Threads/Make Threads older 1.0.0 This Hack allows you to bump Threads or make them older


The rest seem to be working ok.

orban 05-28-2006 05:35 PM

Add SHOWTHREAD and FORUMDISPLAY to the templates to be excluded.

Zia 05-29-2006 04:04 AM

Quote:

Originally Posted by orban
Yes, Zend Cache caches PHP scripts as far as I know.

Helo Orban,
I have send u am PW containing some information.
Plz check ur pm

dutchbb 06-01-2006 10:56 AM

Well I uninstalled this now because it gave me nothing but problems, even with templates exccluded it doesn't work together with vBSEO!

Now still after it's uninstalled it screwed up my whole board, members get "page cannot be found" almost every 4 clicks and I have it too. It's very clear that this hack made this problem.

I'm so mad, don't even know where to search for the problem seems like my database is completely corrupt now :mad:

orban 06-01-2006 11:09 AM

It's not my fault this doesn't work with vBSEO which is a commercial product that probably modifies vBulletin heavily, I have no way to get a copy of vBSEO to test this extension with it. This extension requires vBulletin 3.5.4.

What steps did you do to uninstall this extension?

If you remove the product.xml no traces are left in your installation except the template_cache.php and the templates folder which you can delete in your FTP program or SSH access.

This extension does not modify the database or any files.

If you are still experiencing problems please:
-Remove all products and plugins related to this extension (there's 4 plugins and 1 product)
-Clear the templates/ folder and make sure no new files are created
-Delete the templates/ folder
-Delete template_cache.php

dutchbb 06-01-2006 11:35 AM

Thanks,

I cleaned out the eaccelerator cache and now all problems are over. But it doesn't work well with vbseo, so be warned if you use that.

MissKalunji 06-01-2006 11:36 AM

Quote:

Originally Posted by Triple_T
Thanks

I cleaned out the eaccelerator cache and now all problems are over. But it doesn't work well with vbseo, so be warned if you use that.

I beg to differ i have vbseo and its working like a charm!

orban 06-01-2006 11:51 AM

Quote:

Originally Posted by Triple_T
Thanks,

I cleaned out the eaccelerator cache and now all problems are over. But it doesn't work well with vbseo, so be warned if you use that.

Ah right, sorry, I'm using APC and it automatically removed them when I removed the templates/ folder on my test installation.

What errors were you getting? Is there a way to get a vBSEO trial or something so I can check that out? Are you using the latest vBSEO & vBulletin?

kellyandmike 06-02-2006 12:36 AM

I am a newbie installing this and I get this error. Can someone help me?

Warning: Unknown(template_cache.php): failed to open stream: No such file or directory in /admincp/options.php(843) : eval()'d code on line 6

Warning: (null)(): Failed opening 'template_cache.php' for inclusion (include_path='.:/usr/local/lib/php') in /admincp/options.php(843) : eval()'d code on line 6

Fatal error: Call to undefined function: clear_template_cache() in /home/myusername/public_html/feedback/admincp/options.php(843) : eval()'d code on line 7

orban 06-02-2006 12:45 AM

Did you follow the install steps?


All times are GMT. The time now is 11:07 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01570 seconds
  • Memory Usage 1,831KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete