joomla_cms

Since my server is still suffering, Ive decide today to take some actions.

user: changes can be done on shared hosting with limited user rights.
root. changes require a full access to the server (root access with secure shell ssh)

I have currently per months, 160.000 visitors and 2 Millions Hits.or per day 8000 visitors and 24000 pages view.
Server has only 1GB RAM.

UPDATE: I found one/THE reason why my host is slowing down...SPAMMERS!

click read more

user: Joomla! settings
  • I switch enable gzip compression OFF. Since this is meant to reduce the usage of bandwidth, not the load on my  server. The server has to encode all the files in order to send them, which only puts additional load on your page.
  • I switch Joomla!! statistics off, as AWSTATS is providing a much better job.
user: MySQL maintenance

I Optimize (repair, refresh statistics) MySQL tables through MySQL admin, but It can be done through PLESK
user: Tune Joomla!! cache

I Increase Joomla! cache lifetime from 900seconds to 24 hours as it better reflect the way I update my site (daily)
user: keep pages small

  • Reduce size of banner, using GIMP so they are using a web palette, most of them were shrink from 40kb to 7kb
  • I remove all un-needed space from the main templates file (index.php), an action which will help first users visitors only.
  • Attention, it is a never ending task...
user: Hunting software bugs
By switching the site to debug mode, I notice some nasty queries (select count(*) from), all created by my statistics module ( Content Statistics on right side), In fact Joomla!! module do not inherit from Joomla!! cache automatically. I fix value in this module since I do not want to program cache support in it right now.
root One more cache

I decide to install a PHP accelerator: PHPA from  http://www.php-accelerator.co.uk/
" The ionCube PHP Accelerator is an easily installed PHP Zend engine extension that provides a PHP cache, and is capable of delivering a substantial acceleration of PHP scripts without requiring any script changes, loss of dynamic content, or other application compromises."

Install is straightforward: just copy library into /usr/local/lib/php_accelerator_1.3.3r2.so
and add these lines to /etc/php.ini

; PHP Accelerator extension
zend_extension="/usr/local/lib/php_accelerator_1.3.3r2.so"
phpa = on
phpa.c0_size = 64
phpa.cache_dir = /tmp
phpa.c0_logging = on


;The shm_stats_check_period is the minimum interval between checks of the
;cache for expired scripts. The first server request after the interval has
;elapsed will trigger a scan of the cache for expired scripts, and remove
;any entries that it finds.
phpa.c0_stats_check_period = 5m

;The shm_ttl value is the value used to set the
;time-to-expiry value when a script is accessed. Put another way, the shm_ttl
;value is the period after which an unaccessed script expires.
phpa.c0_ttl = 12h

;phpa.ignore_files = ""
;phpa.ignore_dirs = ""

I use that tool: HTTP Viewer to check if my page now contains a header X-Accelerated-By:·PHPA/1.3.3r2

Reduce surface of attack: I found my components that were not used by Joomla! (very old code and uused components . So go through all directories with FTp/SCP and remove any un-needed code....


Review table data directly in the database...
This is how I found 27 000 spams in my gallery (Zoom gallery)
solution:
  • I remove all entries
  • Disallow comments operations (in Zoom gallery admin panel),
but spammers were still able to insert comments, so I edit the file components/com_zoom/lib/image.class.php
//add because of spammers
header("HTTP/1.0 403 Forbidden");
//$database->setQuery("INSERT INTO __zoom_comments (imgid,cmtname,cmtcontent,cmtdate) VALUES ('".mysql_escape_str

Note: I  recommend You to use also mod_evasive and mod_security  (root access needed), see aprevious article on my site



Some links, where I borrow some ideas:


http://www.primakoala.com/tutorials/guides/speeding_up_joomla.html
http://forum.joomla.org/index.php/topic,50278.0.html
http://forum.joomla.org/index.php/topic,54175.0.html

You might like also

Alternate method to install Joomla/Drupal on Synology NAS
If you want more control, want to install Joomla yourself or want to install any other CMS, you may also want to try this method. It require some basic knowledge about SSH / file transfer through. Main differences compare to the other method You won’t have any icons into the packages manager, You wont be able to stop this services, More prone to errors How to Install In the Control Panel of your Synology DSM NAS, go to “Web Services” …
2957 Days ago
Running Joomla! on Synology NAS
From small-and-medium business to individual users, Synology products offer a full range of choices to fulfill different needs, while sharing some similar characteristics- eco-friendly, quiet, and versatile. Pre requisites Download the Synology package #Joomla-1.7.2.spk In the Control Panel of your Synology DSM NAS, go to “Web Services” and activate Enable Web Station Enable MySQL …
2957 Days ago
How to Solve a Problem with Joomla! jos_session
I was not seeing this error since at least 3 years: DB function failed with error number 1016 Can't open file: 'jos_session.MYI' (errno: 145) SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( '4bc998b10d92bf4107976d0edacdbb26','1246725653','','0','1','0' ) It happen sometimes and cause are unknown. While it is quite disturbing to have no more access to #Joomla! frontend or backend, the fix is quite easy. You must repair this table jos_session, If you have access to PhpMyAdmin Require an access to the Plesk/CPA panel. …
3627 Days ago
Digital watermarking with PHP and GD2
Digital watermarking is the process of possibly irreversibly embedding information into a digital signal. The signal may be audio, pictures or video, for example. If the signal is copied, then the information is also carried in the copy. In visible watermarking, the information is visible in the picture or video. Typically, the information is text or a logo which identifies the owner of the media. [Wikipedia] If you decide to go with an online watermarking, you can let watermark picture …
3701 Days ago
Watermarking your images with ImageMagick
Digital watermarking is the process of possibly irreversibly embedding information into a digital signal. The signal may be audio, pictures or video, for example. If the signal is copied, then the information is also carried in the copy. In visible watermarking, the information is visible in the picture or video. Typically, the information is text or a logo which identifies the owner of the media. [Wikipedia]   I decide to go with an offline watermarking first, but you can let …
3716 Days ago
Joomlacomment 4.0 jQuery optimization
I did install yesterday evening the latest version of !JoomlaComment !JoomlaComment is one of the first extensions for #Joomla,that let you comment under articles. The !JoomlaComment system can be installed on any joomla website within seconds! Make your website more interactive! Main Features: ajax-based captcha protection akismet support ubb code support threathed/nested comments multilanguage support mail, website input See more features here Joomla support templates, depending on which templates you use MTdefault-emotop, these templates MTxxxx use mootols 1.11 JQdefaut-emotop, these …
3726 Days ago
Optimize Joomla! site
I did optimize a bit my #Joomla! homepage in the last few days. This has been achieved with Enabling #Joomla module caching in all 3rd party module where it was missing/ not implemented at all, Starting to offload some assets (JavaScript) to faster hosting, Click read more to apply the same for your internet site. …
3732 Days ago
Joomla! php, FastCGI, blank page and duplicate header 'Status'
Since months, now I (understand also YOU) receive some blank page when browsing my Internet homepage. This strange behavior seems to occur only when having PHP running as FastCGI FastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface (CGI); FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests at once. …
3950 Days ago
Skype me button for Joomla!
Thanks to Skype web integration, making a button to show your online status has never been so easier. Attention, you will also Somehow loose some privacy as anybody will be able to call you/chat with you Need to change your Skype privacy settings to show your status online learn more Create your html code Snippet by going to     Note: the online generator always create call URL, if you want to allow only chat, just alter slightly the URL, …
3956 Days ago
Joomla Components troubleshootings, support, help
Golden Rules Do not contact me first directly, these components are used worldwide (in the million range for some of them) and I can not help personally all people, even if I try... Use Google first Do yourself a favor, use Google, you'll get a response (nearly) at the speed of light, try to copy your error message or summarize your issue in keyword and append (or not) the name of the component like for example SecurityImages + require GD2 …
4104 Days ago