****** ***
I managed to make two sites work with common user base, I decided to share how it should be done step by step.

What is the solution?

Allows two or more Joomla! sites to have one and the same user base and sessions.

It could be used for other stuff (i.e. banners, sections etc.) however this is not subject of this guide. We will review only users and sessions.

What the solution is not?

It is not a bridge, a component, module, plugin or something like this. This is a solution on database level.

If you want to share components, articles etc. it is much more complicated, however not impossible. But this is not something we will review here.

It is not recommended to use this solution for two already existing sites, as at least one of them will either crash, or you will at least lose its user base.

The users in the two (or more) sites will have one and the same access rights (i.e. super admin in one will be super admin in the others as well and so on, you cannot set different rights for the different sites).

Requirements:

MySQL 5

PHP 5

Joomla! 1.5

The sites should share one and the same database server and the database user should have access rights to all databases in use.

BEFORE DOING ANYTHING TO YOUR EXISTING WEB SITES, MAKE A BACKUP, AS YOU MAY LOSE DATA.

Install second Joomla! on localhost/site2 (or any domain) with database name site2 – it is important that the database user for both sites is one and the same.

Open the configuration.php files of both installations and copy the secret value ($secret = ‘somesymbolshere’;) from the configuration of site1 to the configuration to site2. So both installations should have one and the same secret key in their configuration. If you want to add even more sites, the other sites should also have the same key for secret.

Open phpMyAdmin of the database of site2 and execute one by one (each row is one execution) the following:

And that is all. Both sites will now have one and the same users and sessions. Adding more sites is easy, just follow the instructions here for site2 database and configuration file.
If you have existing site and you want the new one you are setting up to have all of the users of the old one, you can do it, by just imaging that your old site is site1 in this example and follow the instructions post installation.

If you have two existing sites – THIS IS NOT THE RIGHT SOLUTION FOR YOU.

Updating Joomla?
As for versions 1.5 – there is no problem. Upgrade both of your installations without any worries.
As for version 1.6 – it is hard to say yet, as it is not stable enough.

Hope you find it useful. If you have any questions, ask in that thread.

Some applications require finding out what the current time would be in a particular timezone. Another similar requirement would be to convert a given date/time value to a different timezone.

PHP has very powerful date handling functions and it makes the above very simple and easy. We have tried to use quite a few readymade timezone conversion classes but either they had a bug or they were too complicated. Hence we came up with our own class. The actual conversion code is only about 4 lines of code.

What it does is convert the time string argument from the source timezone into GMT time and then convert into the target timezone. This approach was far simpler than trying to directly convert from source timezone into the target timezone.

The first call to function converts 14 Sep, 2011, 02 am from the my timezone GMT+0530hrs to GMT-600hrs
here I am passing my time zone i.e. +5.30— my current time & date in format(2011-0-14 02:00:00)here
the time in 24hours– last parameter to which time zone you want to convert..here I put
the timezone of Texa-USA i.e. -6
After running the program.. I got result as ‘2011-09-14 02:00:00’.

Many times people ask me, how you secure your joomla website,specially how to protect your admin side of website.So I think about to change the admin url.
By default, every joomla programmer know the default url of admin directory i.e. http://sitename.com/administrator/ .

So I want to hide or just don’t want to give direct access to that url, after googling, found that changing the folder name ‘administrator’ to ‘myadmin” & change the ,

define( ‘JPATH_ADMINISTRATOR’, JPATH_ROOT.DS.’administrator’ ); to

define( ‘JPATH_ADMINISTRATOR’, JPATH_ROOT.DS.’myadmin’ );

in the ‘includes->defines.php’ & ‘administrator->includes->defines.php’ doesn create some problem in thired party component.

In order to redirect all of the requests for yourdomain.com to http://www.yourdomain.com, you should set the appropriate rewrite rule. This can be done by adding the following lines at the beginning of the .htaccess file in your WWW folder:

How to enable error reporting in php

In Shared Web hosting, normally we won’t be having access to the root folder php.ini file for changing any settings.

Some settings can be changed by putting another php.ini in our required folder. In this case the value will be taken from php.ini located in our folder instead of from the root folder.

But it will not be applicable for all the settings. Some settings can not be overridden.

Say for example, display of error message in the browser will be disabled by default in all production environments. But it seems putting this setting should be changed only in the php.ini file available in root folder.

But we may need to see the error message if our webpage is not working properly. We can not ask the shared web hosting company to turn on the error message. Because it will affect other people websites also.

To avoid this issue, the below code can be placed in the php file for enabling the error message display for the particular page.

<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);
/**Or you can write code as below**/