gibby

Topic: Installing 1.9

Hi

Would you suggest it is OK to install 1.9 now or will there be major changes to the script before the official release?

Thanks

Gibby

filipcte

Re: Installing 1.9

Hi Gibby,
feel free to install 1.9 now. here's the install guide, if you need it: http://wiki.jobberbase.com/install/guide-for-apache

there won't be any other changes in 1.9 before the official release, we're just finishing some documentation before the launch.

Original jobberBase author
www.filipcte.com

gibby

Re: Installing 1.9

Will do thanks and looking forward to getting stuck in :-)

gibby

Re: Installing 1.9

Hi

I got scared at this point

Do I just change the "live" or the "local" or both...?

I have uploaded to www.mysite.com/china

Thanks for the help

Gibby

Code:
<?php
/**
 * Define environments
 *
 */

// local (http://localhost/jobberbase/public)
$__instances['local'] = array(
    // should be a unique part of the url (or the entire url if you wish)
    'prefix' => 'localhost',
    // mysql credentials
    'db_host' => 'localhost',
    'db_port' => 3306,
    'db_user' => 'root',
    'db_password' => '',
    'db_name' => 'jobberbase',
    'db_prefix' => '',
    // your site's full url
    'app_url' => 'http://localhost/jobberbase/trunk/public/',
    // error reporting
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'On',
    // environment setting 1 (use 'local' for localhost/testing OR 'online' for live, production environment)
    'location' => 'local',
    // environment setting 2 (use 'dev' together with 'local' in the previous setting OR 'prod' with 'online')
    'environment' => 'dev',
    //'apache_mod_rewrite', 'iis_url_rewrite' -microsoft URL Rewrite module, 'iis_isapi_rewrite'
    'rewrite_mode' => 'apache_mod_rewrite'
);

// live (http://www.yourjobberbasedomain.com)
$__instances['live'] = array(
    'prefix' => 'yourjobberbasedomain.com',
    'db_host' => 'localhost',
    'db_port' => 3306,
    'db_user' => 'root',
    'db_password' => '',
    'db_name' => 'jobberbase',
    'db_prefix' => '',
    'app_url' => 'http://www.yourjobberbasedomain.com/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'Off',
    'location' => 'online',
    'environment' => 'prod',
    'rewrite_mode' => 'apache_mod_rewrite'
);


// setup current instance
foreach ($__instances as $__instance)
{
    // http requests
    if (isset($_SERVER['HTTP_HOST']))
    {
        $_compare_to = $_SERVER['HTTP_HOST'];
    }

    if (strstr($_compare_to, $__instance['prefix']))
    {
        define('DB_HOST', $__instance['db_host']);
        define('DB_PORT', $__instance['db_port']);
        define('DB_USER', $__instance['db_user']);
        define('DB_PASS', $__instance['db_password']);
        define('DB_NAME', $__instance['db_name']);
        define('DB_PREFIX', $__instance['db_prefix']);

        // values kind of redundant, they indicate wether this is a live/production or dev/testing environment
        define('LOCATION', $__instance['location']);
        define('ENVIRONMENT', $__instance['environment']);
        
        // base url of the app
        define('APP_URL', $__instance['app_url']);
        define('REWRITE_MODE', $__instance['rewrite_mode']);
        // error reporting
        ini_set('error_reporting', $__instance['ini_error_reporting']);
        ini_set('display_errors', $__instance['ini_display_errors']);
        
        break;
    }
}
?>

Last edited by gibby (2010-03-29 15:49:25)

putypuruty

Re: Installing 1.9

You only have to change the 'live' part wink

For example, you should have http://www.mysite.com/china/ as 'app_url' and mysite.com as 'prefix'.

Please let us know if it worked.

gibby

Re: Installing 1.9

Hi

Must be me :-( I tried but only get a blank page ...

I guess you would call me a dummy when it comes to this kind of stuff ...

I will wait for the release

Thanks for your kind help

Gibby

gibby

Re: Installing 1.9

Would you believe it was an extra space in the config file :-)

I will now test

Thanks

Looking forward to getting stuck in ....

gibby

Re: Installing 1.9

.htaccess file

Your instructions are GREAT

Time to test :-)

Gibby

Last edited by gibby (2010-03-30 02:56:31)

aznoe

Re: Installing 1.9

Hi Guys,

I read all the messages but I am getting this error message

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2005): Unknown MySQL server host 'localhost:/tmp/mysql5.sock' (1) in /home/aznoe/www/www/_includes/class.Db.php on line 20

but that is what my hosting company specified
Note: Most PHP applications/scripts will accept the following syntax:
MySQL Host: localhost:/tmp/mysql5.sock

Remote (MySQL clients):
Host: mysql5.server284.com
Port: 3307

so in my settings i have
$__instances['live'] = array(
    'prefix' => 'aznoe.com',
    'db_host' => 'localhost:/tmp/mysql5.sock',
    'db_port' => 3307,
    'db_user' => 'xxx',
    'db_password' => 'xxx',
    'db_name' => 'aznoe_xxx',
    'db_prefix' => '',
    'app_url' => 'http://www.aznoe.com/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'On',
    'location' => 'online',
    'environment' => 'prod',
    'rewrite_mode' => 'apache_mod_rewrite'
);

am i doing anything wrong?
my website is http://aznoe.com

putypuruty

Re: Installing 1.9

Please try with mysql5.server284.com as your db_host

sjackson

Re: Installing 1.9

Thanks for the information, very useful and clear, if you have more information please tell us, thanks for sharing.