Page 1 of 2
OpenCATS Chasejobs installation Mysql configuration help
Posted: 07 Mar 2009, 22:14
by sabby777
Hello,
I am seeking directions on changing the the helper.php to install the chasejobs backup on my site with 1and1.com i have tried making a lot of changes to this file however it is not working. I get the error
Fatal error: Call to undefined method: jexception->setquery() in /homepages/CATS/modules/mod_catsone/helper.php on line 46.
I have tried the following changes :
$options = array ( 'driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $password, 'database' => 'dbname', 'prefix' => "jos_" );
*/
$host = $conf->getValue('config.host');
$driver = $conf->getValue('config.dbtype');
$options = array ( 'driver' => $driver, 'host' => $host, 'user' => 'dbusername', 'password' => '*Database*', 'database' => 'dbname', 'prefix' => "jos_" );
$db =& JDatabase::getInstance( $options );
$query = "Select joborder.*,extra_field.*,user.user_id,user.last_name,company.company_id,company.name from joborder,extra_field,user,company where extra_field.data_item_id = joborder.joborder_id and joborder.status = 'active' and joborder.entered_by = user.user_id and joborder.company_id = company.company_id ";
//echo $query;
$db->setQuery($query); - this is line 46
Is there something which i am missing. I am looking for help fixing this
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 07 Mar 2009, 22:16
by sabby777
I have changed the dbname, username, password in both the lines starting with $options to match the details as per my hosting provider however it is not working.
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 08 Mar 2009, 12:55
by RussH
Hiya,
I really must package it properly as a component/module rather than just a backup - but it's worked perfectly for me.
you do just need to change helper.php *in the modules mod_catsone directory* to have a valid username/password/host;
Code: Select all<?php
/**
* @version $Id: helper.php 10079 2008-02-28 13:39:08Z ircmaxell $
* @package Joomla
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
class modCatsone
function getList()
{
global $mainframe;
//$user =& JFactory::getUser();
jimport('joomla.database.database');
jimport( 'joomla.database.table' );
$conf =& JFactory::getConfig();
// TODO: Cache on the fingerprint of the arguments
//$db =& JFactory::getDBO();
$host = $conf->getValue('config.host');
$driver = $conf->getValue('config.dbtype');
$options = array ( 'driver' => $driver, 'host' => 'my.webhost.com', 'user' => myuser', 'password' => 'mypassword', 'database' => 'mycatsinstall', 'prefix' => "" );
$db =& JDatabase::getInstance( $options );
$query = "Select joborder.*,extra_field.*,user.user_id,user.last_name,company.company_id,company.name from joborder,extra_field,user,company where extra_field.data_item_id = joborder.joborder_id and joborder.status = 'active' and joborder.entered_by = user.user_id and joborder.company_id = company.company_id ";
//echo $query;
$db->setQuery($query);
$lists = $db->loadObjectList();
return $lists;
}
}
...where the key line is of course;
Code: Select all $options = array ( 'driver' => $driver, 'host' => 'my.webhost.com', 'user' => myuser', 'password' => 'mypassword', 'database' => 'mycatsinstall', 'prefix' => "" );
...so please check your syntax and let me know if it's still not working!
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 28 May 2009, 21:18
by archiseek
i have
- installed opencats easily enough - works well
- installed joomla - works fine
but this is defeating me completely.....
bear with me when i talk through this
the download is an copy/archive of your installation - correct?
so i install joomlapack on my installation - correct?
after this I'm stuck -
is there a couple of dirs i can copy over from your installation archive, or how do i import your archive?
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 29 May 2009, 14:12
by RussH
archiseek wrote:i have
- installed opencats easily enough - works well
- installed joomla - works fine
but this is defeating me completely.....
bear with me when i talk through this
the download is an copy/archive of your installation - correct?
so i install joomlapack on my installation - correct?
after this I'm stuck -
is there a couple of dirs i can copy over from your installation archive, or how do i import your archive?
Yep - sorry, this is bit of a kludge. I could have packaged the component and module 'properly' - but there are allot of custom fields to be amended.
The download is just a joomlapack archive. unzip it, and upload it to your webhost. run the installer - it'll be a standard joomla installation but with the module/component already included and preconfigured to point to the chasejobs.co.uk test site. You can then run an upgrade to upgrade Joomla to the most recent version (currently 1.5.10 from memory?). THEN - you can edit the module configuration to point to your own site.
More details are in the documentation:
http://www.opencats.org/documentation/Joomla_module
Finally - IF you have your OpenCATS installation on a remote server and want to connect to it remotely - and are prepared to do more hacking..
(you'll need to permit sql queries & ftp from your webserver to your backend server) - then you can install the version of the joomla module from SVN. Read-only access is enabled by default.
http://www.opencats.org/documentation/Subversion_access
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 29 May 2009, 16:19
by archiseek
the installer fails at the Database Configuration stage.....
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 29 May 2009, 16:44
by RussH
archiseek wrote:the installer fails at the Database Configuration stage.....
Did you enter a new host (it should default to chasejobs) and username/password for the db when prompted ?
I've restored it on a few sites and it works.. may be a joomlapack issue?
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 29 May 2009, 17:40
by archiseek
yes i did - created a new db for it
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 29 May 2009, 17:44
by archiseek
are there any other alternative cms for opencats to interact with
Re: OpenCATS Chasejobs installation Mysql configuration help
Posted: 30 May 2009, 00:01
by RussH
Just Joomla to date - honestly though all you need to be able to do is poll a remote MySQL db.. there's a job filed and then you can generate a URL to apply!
If you cannot restore the Module & Component, PM me and I can take a look.