Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Tuesday, August 17, 2010

How to Enable Legacy Mode in Joomla! 1.5

The future of Joomla! CMS, Jomla! version 1.5, has new framework with code based for the Joomla! core completely re-written and built with PHP 5. Thus, a lot of existing extensions, plugins, templates and modules for Joomla! version 1.0.x does not work or fail to work properly in the Joomla! 1.5, sometimes not even able to upload and install the package. Users will get error messages such as “Direct Access to this location is not allowed” and “Must Enable Legacy Mode In Global Config To Complete This Task.” Joomla! developers is kind enough to provide a legacy mode in Joomla! 1.5 that supports compatibility with extensions designed and developed for older version of Joomla.

So how to enable and switch on legacy mode in Joomla! 1.5? In early beta release of Joomla! 1.5 (e.g. beta1 and beta2), option to enable and turn on the legacy mode is part of the Global Configuration. However, in the latest RC release of Joomla! (i.e Joomla! 1.5RC3) and final gold release of Joomla! 1.5, the legacy mode support has been moved to be provided by plugin. Thus to enable the legacy mode, simply follow steps in trick below to publish the Legacy Mode plug-in.

  1. Login to Joomla! 1.5 Site Administrator panel (http://www.domain.com/administrator).
  2. Mouse over Extensions in the main horizontal menu, then click on Plugin Manager.

    Joomla Plugin Manager

  3. Locate plugin named System – Legacy, and then click on the check box in front of it.
  4. Click on Enable button.

    Enable Joomla 1.5 Legacy Mode

  5. Ensure that Legacy: 1.0 status appears on the top right corner, and the Enabled column for “System – Legacy” is ticked. The Legacy Mode has been enabled.

    Joomla! 1.5 Legacy Mode 1.0 Compatibility Mode

With Legacy Mode, users can now use extensions, modules, plugins and templates from Joomla! 1.0.x series in Joomla! 1.5 and ensure that the modules are working properly. Joomla! 1.5 now is compatible with Joomla! 1.0.

Note that if you don’t install and populate Joomla! with sample data when installing Joomla!, the default modules and plugins are not loaded into the Site Administrator Panel. If you cannot find the Legacy Module plugin, try to build the sample data again.

Tuesday, June 1, 2010

How to Enable MySQL InnoDB Storage Engine Support in XAMPP Installation

XAMPP from Apache Friends is a collection of free open source apps that make it easy to install Apache distribution containing MySQL, PHP and Perl. There are four XAMPP distributions for Windows, Linux, Mac OS X and Solaris. To set up an Apache web server with XAMPP, simply download and extract XAMPP, and the Apache HTTPD web server is ready after one or two more auto-execute scripts. There are no changes to the Windows registry (unless you’re using Widows installer version of XAMPP) and it’s not necessary to edit any configuration files.

However, by default, InnoDB MySQL database storage engine is not enabled in the my.cnf configuration file. If a webmaster plans to use InnoDB features, such as one to many or many to many table relationships on foreign key constraints, or transaction-safe commands such as commit, rollback and crash recovery capabilities.

To enable the support of MySQL server on InnoDB storage engine, locate the “my.cnf” config file (normally in /installation_path/xampp/mysql/bin/ directory), and edit the my.cnf with any text editor such as vi.

Search and locate each of the following lines (except the lines in italic where they’re comments):

- Comment the following line to unskip and use InnoDB
skip-innodb

- Uncomment the following options for InnoDB database if you are using InnoDB tables.
#innodb_data_home_dir = C:/xampp/xampp/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:/xampp/xampp/mysql/data/
#innodb_log_arch_dir = C:/xampp/xampp/mysql/data/

- Uncomment the lines and set innodb_buffer_pool_size up to 50% – 80% of RAM for optimization of InnoDB databases, try not to memory usage too high.
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M

- Uncomment the lines and set innodb_log_file_size to 25% of InnoDB buffer pool size for optimisation.
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = innodb_lock_wait_timeout=50

After modification, the code for each lines should look like this:

# skip-innodb

innodb_data_home_dir = C:/xampp/xampp/mysql/data/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = C:/xampp/xampp/mysql/data/
innodb_log_arch_dir = C:/xampp/xampp/mysql/data/

set-variable = innodb_buffer_pool_size=16M
set-variable = innodb_additional_mem_pool_size=2M

set-variable = innodb_log_file_size=5M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=50

When InnoDB is not enable and MySQL uses MyISAM database storage engine instead, some errors that may be returned include:

Undefined GET property or variable in ‘A_Class’ class: A_Class_Object

Fatal error: Call to undefined method Object::Function() in /xampp/htdocs/wwwroot/a_page.php on line 87


Enjoy ubuntu... ;)

Saturday, January 30, 2010

How to install LAMP on ubuntu

Start install Apache:
1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal

2. Install apache2 using apt-get by typing the following

Quote : sudo apt-get install apache2

Note that you should know the root password.
Now everything should be downloaded and installed automatically.

To start/stop apache2 write:

Quote : sudo /etc/init.d/apache2 start
Quote : sudo /etc/init.d/apache2 stop

Your www folder should be in: /var/www/

Then install PHP / PHP5:
1. Also in terminal write:

Quote : sudo apt-get install php5 libapache2-mod-php5

Then install MySQL:
1. In terminal execute :

Quote : sudo apt-get install mysql-server

2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address

3. set your root password (although mysql should ask you about that when installing)

mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘xxxxxx’);

4. Try running it

mysql -u root -p xxx

where xxx is your password.
Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing

Qoute : sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin


Enjoy ubuntu... ;)

Tuesday, May 26, 2009

How to update user mysql using command line on windows

1. Quote : cd apache/mysql/bin

2. Quote : mysql -u root -p

3. Quote : use mysql

4. Quote : set password for 'root'@'localhost' = OLD_PASSWORD('newpassword');

5. Quote : update user set password = OLD_PASSWORD('newpassword') where Host = 'localhost' AND User = 'root';

6. Quote : flush privileges;

Enjoy ubuntu... ;)

kunkun-laptop .... ;)