Page 1 of 1

DB location

Posted: Wed Mar 11, 2009 11:42 pm
by Stela
Hello!

I'm doing a CMS following an on-line tutorial, I'm running a server on my Mac with MAMP.

But I can't understand the Location of the DB, here's the code for that part

class SystemComponent
{
var $settings;

function getSettings()
{
//System Variables
$settings['siteDir'] = 'path/to/intranet/';

//Database Variables
$settings['dbhost'] = 'hostname';
$settings['dbusername'] = 'dbuser';
$settings['dbpassword'] = 'dbpass';
$settings['dbname'] = 'mydb';

return $settings;
}
}

I can run php code just fine, I have the files on a folder, I can create DBs using MySQL and with the MAMP home page, but whats the 'siteDir' and 'path/to/intranet'?

Thanks for the help!

Re: DB location

Posted: Thu Mar 19, 2009 2:25 am
by jaoudestudios
Not too sure on MAP, but on LAMP it is /var/www/html/

Re: DB location

Posted: Thu Mar 19, 2009 5:14 am
by Stela
Thanks for the help.

Actually the answer was on the Start Page of MAMP, it's 'localhost'

:oops:

Re: DB location

Posted: Thu Mar 19, 2009 5:32 am
by jaoudestudios
Sorry did not realise you wanted the url, I thought you wanted the absolute path from root.

Well you found it :)

Re: DB location

Posted: Thu Mar 19, 2009 2:55 pm
by Stela
Sorry, you're right, when I post for the first time I really wanted the full path, but then I found it (//sites) and then I couldn't find the url.

Thanks again!