Monday, December 29, 2014

Joomla jos_session problem

The use of CMS in the web world are now widely used. Ease of managing the content of the web and many features provided, greatly helps web designer to create beautiful view of the web. Likewise with me were very keen to use the CMS. In case this is Joomla is arguably the most popular of several existing CMS. Some time ago there was a bit of a problem arising from the web that I manage. Error message is like this:
This is because jos_session is used to manage user sessions, so it is written to frequently. The most common cause of a corrupted table is a failed write. When the server runs out of resources, it is usually in the middle of a write, This the corrupt jos_session table.
After looking at several forums references and do some experiments there is a solution that might help to resolve the problem of the session. The first solution is to delete and re-create jos_session table using SQL commands:
DROP TABLE IF EXISTS `jos_session`;
CREATE TABLE IF NOT EXISTS `jos_session` ( `username` varchar (150) default '', `time` varchar (14) default '', `session_id` varchar (200) NOT NULL default '0', `guest` tinyint (4) default '1', userid` `int (11) default '0', `usertype` varchar (50) default '', `gid` tinyint (3) unsigned NOT NULL default '0', `client_id` tinyint (3) unsigned NOT NULL default '0', `data` LONGTEXT, PRIMARY KEY (`session_id` (64)), KEY `whosonline` (guest``, `usertype`), KEY `userid` (` userid`), KEY `time` (` time`) ) ENGINE = MyISAM DEFAULT charset = utf8;
The second solution to fix jos_session table using phpmyadmin: Find Joomla database in phpmyadmin then find table jos_session, repair that table
The third solution by modifying existing files in the directory joomla itself. For this section there are some files that are modified to overcome the problem session:
1. Edit the file libraries / joomla / database / table / session.php
function insert ($ sessionId, $ ClientID)
{ $ url = 'http: //'.$_SERVER [' SERVER_NAME ']. $ _ SERVER [' REQUEST_URI '];
$ this-> session_id = $ sessionId; $ this-> client_id = $ ClientID; $ this-> time = time ();
if ($ this-> guest! = 1 || stristr ($ url, '/ administrator')) $ ret = $ this -> _ db-> insertObject ($ this -> _ tbl, $ this, 'session_id');
if (! $ ret && $ this-> guest! = 1) { $ this-> setError (strtolower (get_class ($ this)). "::". JText :: _ ('store failed'). "
". $ this -> _ db-> stderr ()); return false; } else { return true; } }
 2. Edit the file /index.php
/ ** * CREATE THE APPLICATION * * NOTE: * / $ mainframe = & JFactory :: getApplication ('site');
 Change to:
$ mainframe = & JFactory :: getApplication ('site', array ('session' => false));
The next solution is to change the configuration in Joomla. Joomla by default tracks jos_session session data in the table, as I see you've figured out. However, you can disable this by going Easily to your admin panel - Global Configuration - System - Session Settings and change the session handler from "database" to "None".

And the last is the patience and prayer to overcome the problem.
Read More

Wednesday, September 3, 2014

MySQL: Too Many Connection Error

It has been very much used MySQL since introduced around the year 2005, and this leads to a real DBMS Engine which allows the direction of the Enterprise. More economical than the use of another engine such as MS SQL or Oracle. But there are to watch out for with the economic value, is the issue of too many connection, many servers that have a very high visitor is having trouble. And I feel it when going on a website that I have ever manage at FMIPA Universitas Jember
Too Many Connection occurs because of some problems like this: too many connections that occur simultaneously, often experienced by these sites that weve crowded. packet flooding defect occurs to the port that MySQL is used, this can be tested by doing a telnet to 3306 too many connections are already obsolete, but not in the release or in-free
For the first cause, which occurs because the force is due to conditions that occur simultaneous connections. To solve this problem is to tweak the mysql configuration file (my.ini or my.cnf) and increase the value of the max_connections variable. Default variable values ​​100 For websites that crowded, maybe less default settings. Or it could be another way to dispose of or give a # at the max_connections variable. 

For the second cause, there are many defects in the pool MySQL package, how to fix this is to do mysqladmin flush using the tools. make a batch-script that contents mysqladmin flush-hosts then attach a handler in the web server or on a desktop program (adjust with the environment) if you find an error in MySQL engines with error code SQLSTATE = 08S01 (for server-related error bad packet) or 46000 (to a server error relating to that connection) 

For the third cause, too many connections that are already obsolete, but not in the release or in the free, this is a coding issue. Code that is not good, it will leave a lot of junk in the cache server. For the coder, may know how to connect to the DBMS, whether by way of persistent-connection or non-persistent. What is gained if you have too many connection, he replied restart the server. But if we understand the 3 terms above may be a bit inevitable. I HOPE
Read More

Thursday, June 12, 2014

Internal Error Ubuntu 12.04

internal error message

In ubuntu discussion this time is about error messages that often appear in the ubuntu desktop. Ubuntu users must have got the message as shown above

Users do not get a choice but to press the Continue button. This error message is inadvertently displayed in Ubuntu 12.04 LTS with the goal of the developers can find out the bug / problem that can be fixed later for desktop users as we might a little disturbing because this message will appear any time if there is a bug / problem in ubuntu that we use.

There is a suggestion that this feature remains enabled, but not one as well to know a simple way to disable this feature.
1. Open a terminal or console (ctrl + alt + t)
2. Use any editor (gedit, vim, pico, nano) in this case I use vim sudo vim /etc/default/apport
3. At the line enabled = 0 to disable the content parameters, while 1 to re-activate.

vim editor to open apport

May be useful for us all
Read More

Tuesday, June 3, 2014

Ubuntu 14.04 Upgrade HowTo

14.04 LTS Ubuntu has been released last April 2014. For users of earlier versions of Ubuntu such as 13.10, 13.04 or 12.04 LTS there would be a question of how to upgrade to the latest edition of ubuntu 14.04 LTS? You can upgrade from a minor or major release of Ubuntu Easily and recommended for all users There are several steps that must be done to upgrade to Ubuntu 14.04 LTS:

1. Perform backups of your important data. Can save to another partition on the computer or storage media which you have.
2. Ensure release of Ubuntu you type the following command in the shell (to simplify the example I give a command shell and as root)
root@yoyok:~# uname -mrs
root@yoyok:~# lsb_release -a
the result are
Linux 3.2.0-51-generic x86_64 No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise

3. How do I upgrade to a newer version of Ubuntu 14.04, from an older Ubuntu? Type the following command to update package list and install the update-manager-core package if it is not already installed:

yyp@yoyok:~# sudo apt-get update
yyp@yoyok:~# sudo apt-get install update-manager-core

Next, type the following command to upgrade the Ubuntu to the latest release such as LTS 14.04 from the command-line.

yyp@yoyok:~# sudo do-release-upgrade

The do-release-upgrade will launch the upgrade tool. You need to follow the on-screen instructions. 

4. Fixing and forcing upgrade You may end up getting the following message on screen when you run sudo do-release-upgrade

Checking for a new Ubuntu release No new release found
To force upgrade pass the -d option to sudo do-release-upgrade command:
yyp@yoyok:~# sudo do-release-upgrade -d
5. Reboot the desktop or server Reboot the system
yyp@yoyok:~# sudo reboot
Verify, your new settings:
root@yoyok:~# lsb_release -a
root@yoyok:~# uname -mrs
Read More