Map joomla to an old database - joomla

I have a database which I used to install joomla 1.7. Unfortunately I lost the Joomla folder which I had kept on htdocs. I want to install another Joomla site and use the old database. I have tried to install another Joomla site and connect to the old database I had used, but it seems that a new site is being created. Is there any way I can map the Joomla website to the database? I don't want to have to create another website.

Install fresh joomla and make following changes in configuration.php to use the old database.
newjoomladirectory/configuration.php
public $dbtype = 'mysqli';
public $user = '**dbusername**'; // this will be database user name of old db
public $password = 'mypassword'; // your password to access old datbase
public $db = 'jml17'; // change it to old db
public $dbprefix = 'j17_'; // change it to your old db prefix.
This will connect you to your old database.

in phpmyadmin try renaming new db to a different name and then changing backup to the currently used name. also check if there is some caching issues?

Related

Codeigniter Manage URL With Routes

I'm just starting a new saas project alone and I'm stuck in Codeigniter's URI configuration.
I'm using xampp, and so far I have a folder with my site in it with it's own database.
If a client register to my product a new subfolder will be generated also new database will be generated related to this client.
The main URL is as ex: (http://localhost/gms/admin) but how to manage urls from clients like this : (http://localhost/gms/client1/admin) .... etc and after client log with his new specific url it SHOULD load the related database.
I Took time to solve it. Please need it necessary.
in routes.php
$route['gms/(:any)/admin'] = 'gms/admin';
in gms controller
public function admin(){
$client = $this->uri->segment(2);
echo $client;
}

Tell Joomla to be set to logged-in status via outside PHP script

I have a site that I am migrating from Joomla 1.7 to 3.3 and the previous site had a PHP script that when someone logged into a different server that handles all membership accounts (and completely separate from Joomla) to go back to the Joomla site and change to logged-in status as a registered user. How would I accomplish this in Joomla 3.3?
Here's a possible start (but incomplete):
$user = JFactory::getUser();
if($_GET['login']=='true'){
$user->guest = 0;
}
Something like this might work, but at the very least I don't know what all settings Joomla needs to determine that the current user is logged in.
Try below code:
if($_GET['login']=='true'){
$userid = $_GET['userid']; //This is the user id which you get from remote website.
$user = JFactory::getUser($userid);
$session =& JFactory::getSession();
$session->set("user",$user);
}
Using about code the user will be logged in on Joomla website.

Can't login to Joomla 1.7 admin

UPDATE:
I checked the prefix_users table in phpMyAdmin and the user I was trying to login with has the usertype field set to deprecated
I'm running a site on Joomla 1.7, and recently I noticed I can't login to the administrator panel. I'm getting this error:
Username and password do not match or you do not have an account yet.
I know the username & password are correct because I checked the configuration.php file.
I set permissions to the configuration.php file to 0644, and I've tried setting
public $cookie_domain = 'mydomain.com';
public $cookie_path = '';
Initially it was public $cookie_domain = ''
but that didn't change anything.
I tried both mydomain.com/administrator and www.mydomain.com/adminitrator
I also tried with a private browsing session in order to avoid any local cookies that might have been stored on my computer in the past.
Note: after a failed login I'm redirected from mydomain.com/administrator to mydomain.com/administrator/index.php
SOLVED: changed usertype from deprecated to Super Administrator and then I used this MD5 hash generator to update the password.
I think it was because the encryption was wrong...

Codeigniter session doesn't work?

I have a website based on Codeigniter which works fine. I had to clone this site with database to an another host. I copied the database and all files. My problem is: the session doesn't work on the new site. (I recognized it at the login). The same code works on the old host, but everything is exactly the same.
Does somebody have any idea? Is it a codeigniter configuration issue?
Thanks
Check your application/config.php
especially these lines:
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;
Also: please delete your cookie-history
(if you're using Firefox: CTRL-SHIFT-DELETE)
Alternatively you could use (shameless self-plug) codeigniter-native-session
I too had a bit to much problems with the built-in session engine.
It basically mimics the Codeigniter session class so just drop in these files into your application folder and code doesn't needs any modification. (and you'll be using PHP-native-sessions)
Hope it helps.

Joomla displaying blank page after login after moving the installation from one server to another

I just moved my current office Joomla 1.5.8 instalation from the server(linux) to my local machines (winxp) so I can work locally and only upload the changes.
The thing is after downloading all the files and installing a backup of the remote DB on my local machine I found myself unable to login to the administrator panel, I can see the frontpage but not login :/
So far, I have googled alot this problem, but most people seem to be experiencing this problem while upgrading from joomla 1.0
To make sure the problem was not on permissions for the files,I did a separate brand new joomla instalation on another folder and it worked just fine, I could access the website and I also could login to admin page, then I changed the config file to connect to the joomla I'm trying to move and now I find myself again unable to login :/
I think the problem is on the DB however I already tried searching for specific paths but no luck
Does anyone has another Idea?
thanks in advance :)
Try to change following variable in your local configuration file with you local values.
var $offline = '0';
var $log_path = 'Your local joomla path\logs';
var $tmp_path = 'Your local joomla path\tmp';
var $live_site = 'local url will be here';
var $dbtype = 'mysql';
var $host = 'local db host';
var $user = 'DB user for local';
var $db = 'Db name for local';
var $dbprefix = 'DB prefix whatever you have set, by default jos_';
var $password = 'your DB password for local';
You probably have LDAP or openid authentication enabled and thats what is causing this blank page while you try to login.
Just go to your database and go to your:
jos_plugins
And edit the plugins which are either openid or LDAP
set their published status from 1 to '0'
Case solved.
Does your site use any kind of extra authentication? Mine used the LDAP Authentication plugin. MY local machine couldn't connect to the LDAP server. After turning LDAP authentication off (only use Joomla authentication) it worked.
edit the jos_plugins table in mysql to set published from 1 to 0 for any extra authentication plugins you are using.
I have discussed this issue in details here: http://www.itoctopus.com/blank-page-on-joomla-login
In most cases we have seen, Joomla is trying to load a file that no longer exists.

Resources