1
pegasus00321
Re: XOOPS eXtreme

I finally got sometime and installed eAccelerator (found an RPM, so made it easy), it boosts speed by 60% instead of around 50% for PHP Accelerator. http://eaccelerator.net/HomeUk

I have posted a (less lines of code) header.php and footer.php for preview for XOOPS 2.0.13.2
Header
Footer
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



2
pegasus00321
Re: XOOPS eXtreme

Its my server, so I just add it in the apache config
But it can be added via .htaccess as long as Mod_Deflate is installed
SetOutputFilter DEFLATE 
SetEnvIfNoCase Request_URI 
.(?:gif|jpg|png|mov|wmv)$ no-gzip dont-vary


Or if Mod_Gzip is installed
More Info Here

Or you could use
php_flag zlib.output_compression on
php_value zlib
.output_compression_level 5

That goes in a .htaccess file as well.
This is all assuming you use Apache. If you use IIS, read the tutorial from Brash (it-hq.org)
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



3
pegasus00321
Re: XOOPS eXtreme

Quote:

Herko Coomans wrote:
So if I'm reading this right, it's not so much a hacked XOOPS, but an optimised server and XOOPS install? Perhaps your XOOPS eXtreme would be more usefull as an optimisation guide then a codefork then?

Hekro


Well, your 50% correct there Herko.
But its still a lot of hacking on the XOOPS Side. I don't think I will have to do as much hacking of 2.2.3 to achieve a sub 0.1 page gen time.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



4
pegasus00321
Re: XOOPS eXtreme

I'm willing to release the code, but its not more code that speeds it up, its less code.

Like here is the header.php (XOOPS v.2.0.13.2) - 2.2 has less code than this for the header
<?php
if (!defined("XOOPS_ROOT_PATH")) { die("Hacking Attempt Header"); }
include_once 
XOOPS_ROOT_PATH.'/class/xoopsblock.php';
$xoopsOption['theme_use_smarty'] = 1;
require_once 
XOOPS_ROOT_PATH.'/class/template.php';
$xoopsTpl = new XoopsTpl();
$xoopsTpl->xoops_setCaching(2);
//if ($xoopsConfig['debug_mode'] == 3) { $xoopsTpl->xoops_setDebugging(true); }
$xoopsTpl->assign(array('xoops_theme' => $xoopsConfig['theme_set'], 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/''xoops_themecss'=> xoops_getcss($xoopsConfig['theme_set']), 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
$config_handler =& xoops_gethandler('config');
$criteria = new CriteriaCompo(new Criteria('conf_modid'0));
$criteria->add(new Criteria('conf_catid'XOOPS_CONF_METAFOOTER));
$config =& $config_handler->getConfigs($criteriatrue);
foreach (
array_keys($config) as $i) {
$xoopsTpl->assign('xoops_'.$config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
}
$xoopsTpl->assign('xoops_js''//--></script><script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script><script type="text/javascript"><!--');
$xoopsblock = new XoopsBlock();
$block_arr = array();
if (
$xoopsUser != '') {
$xoopsTpl->assign(array('xoops_isuser' => true'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin));
$groups $xoopsUser->getGroups();
} else {
$xoopsTpl->assign(array('xoops_isuser' => false'xoops_isadmin' => false));
$groups XOOPS_GROUP_ANONYMOUS;
}
$toppage false;
if (isset(
$xoopsModule) && is_object($xoopsModule)) {
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->getVar('name'));
$xoopsTpl->assign('xoops_dirname'$xoopsModule->getVar('dirname'));
$moduleid $xoopsModule->getVar('mid');
if (
preg_match("/index.php$/i"xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
$toppage true;
}
} else {
$xoopsTpl->assign('xoops_pagetitle''All About Emma Watson');
$xoopsTpl->assign('xoops_dirname'"system");
$moduleid 0;
//if (!empty($xoopsOption['show_cblock'])) {
//$toppage = true;
//}
}
/*
if (!isset($show_rblock)) {
$xoopsTpl->assign('xoops_showrblock', 0);
}
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 0);
}
if (!isset($show_lblock)) {
$xoopsTpl->assign('xoops_showlblock', 0);
}
*/
if (xoops_getenv('REQUEST_METHOD') != 'POST' && !empty($xoopsModule) && !empty($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')])) {
$xoopsTpl->xoops_setCaching(2);
$xoopsTpl->xoops_setCacheTime($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]);
if (!isset(
$xoopsOption['template_main'])) {
$xoopsCachedTemplate 'db:system_dummy.html';
} else {
$xoopsCachedTemplate 'db:'.$xoopsOption['template_main'];
}
$xoopsCachedTemplateId 'mod_'.$xoopsModule->getVar('dirname').'|'.md5(str_replace(XOOPS_URL''$GLOBALS['xoopsRequestUri']));
if (
$xoopsTpl->is_cached($xoopsCachedTemplate$xoopsCachedTemplateId)) {
$xoopsLogger->addExtra($xoopsCachedTemplatesprintf('Cached (regenerates every %d seconds)'$xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]));
$xoopsTpl->assign('xoops_contents'$xoopsTpl->fetch($xoopsCachedTemplate$xoopsCachedTemplateId));
$xoopsTpl->xoops_setCaching(0);
if (!
headers_sent()) { header ('Content-Type:text/html; charset='._CHARSET); }
$xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html');
exit();
}
} else {
$xoopsTpl->xoops_setCaching(0);
}
if (!isset(
$xoopsOption['template_main'])) {
include 
XOOPS_ROOT_PATH.'/include/old_theme_functions.php';
$xoopsTheme['thename'] = $xoopsConfig['theme_set'];
ob_start();
}
if (isset(
$_COOKIE[$xoopsConfig['usercookie']])) { $xoopsTpl->assign('unamevalue'$_COOKIE[$xoopsConfig['usercookie']]); }
//echo '<!--'.$xoopsLogger->dumpAll().'-->';
$cmodule = isset($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('dirname') : "system";
$xoopsTpl->assign('cmodule'$cmodule);
$xoopsTpl->assign('nojavascript''no');
?>


Heres my plan, I'm going to make it a priority to upgrade that XOOPS site to 2.2.3 and then I will try to hack that as much as I can and write a guide about it at the sametime.

It seems like that I need to wait sometime before I do this upgrade since I have to upgrade it, hack it, update X-IPB, hack that.

Is everyone ok with me writing a guide for 2.0.13.2? It doesn't seem like I'll be on 2.2 for a while.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



5
pegasus00321
Re: XOOPS eXtreme

You may notice that the News module front page isnt that fast though.

<!-- 0.1281 | 15 | news-->

But then again, its using 15 queries.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



6
pegasus00321
Re: XOOPS eXtreme

Yeah, the source is kinda hard to view sometimes in IE due to Gzip Compression.

That site has the most hacks of all my XOOPS sites.

Why does it run so fast?
And its not because of the Celeron Server,

1. Uses PHP Accelerator (eAccelerator is better, but I was lazy)
2. Doesn't use XOOPS Blocks, those are somewhat slow, slightly better in 2.2.x
and lots of other minor things.

If you use a php caching program, such as APC, PHP Accelerator, or eAccelerator, that will speed up your scripts by about 20-40%. Before I had PHP Accelerator on there, it was at around 0.13 secs for the homepage.
Zend Optimizer really doesnt do much, especially for XOOPS.

So if you want speed, switch to 2.2.x (i seriously hope its stable, because I'm thinking about upgrading)!
I'll release a guide, hopefully soon since I've got a lot of school work.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



7
pegasus00321
Re: XOOPS eXtreme

I dont do PHP Programming, I know how to, but I don't

If you wanted to see a heavily hacked XOOPS 2.0.13.1 site, you can look at this XOOPS site I've made, here.
It also has the X-IPB Mod by Koudanshi.

All page gen times are in the source, at the very bottom.
Front page gen time is around 0.06 at best with 3 queries logged out and 5 logged in.

Something like this:
<!-- 0.0587 | 5 | home-->
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



8
pegasus00321
Re: XOOPS eXtreme

Because XOOPS 2.2.x is coming out this weekend, I will be creating a XOOPS eXtreme for that version after its confirmed to be stable.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



9
pegasus00321
Re: XOOPS eXtreme

Unfortunitly, the MotherBoard on my computer fried and I had to send it in for repair. Like 5 to 7 days before I get it back. The release is gonna get pushed back at least 2 weeks.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc



10
pegasus00321
Re: Big Time Hackers

Nothing is completely secure, not even XOOPS. Buts its pretty close. It would be great to have a security professional look at 2.2.x before it is released.

But also, just remember that its not always XOOPS itself thats exploited, you have modules installed. I'm sure theres a exploit here and there in CBB, Newbb, or other modules.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc




TopTop
(1) 2 3 4 ... 26 »



Login

Who's Online

164 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits