CodeIgniter Forums
1and1 database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: 1and1 database (/thread-45861.html)



1and1 database - El Forum - 10-09-2011

[eluser]Bianca Migueis[/eluser]
hi guys,

im working on this website thats hosted at 1and1.com. I'm using their own database and they give me the hostname, user and batabase info and I just changed the password so I'm sure it's right. however everytime i plug in the information it says
Code:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/39/d194325816/htdocs/new/system/core/Config.php on line 279
but it works when i use my localhost database.

my config/database.php is like this
Code:
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'db11111111.db.1and1.com';
$db['default']['username'] = 'dbo11111111';
$db['default']['password'] = '*******';
$db['default']['database'] = 'db11111111';
$db['default']['dbdriver'] = 'mysql';

as I said it works fine on my machine... I even tried putting localhost on the hostname and keeping everything else... am I using the wrong hostname? its what 1and1 gave me...


1and1 database - El Forum - 05-02-2012

[eluser]mr_madness[/eluser]
@LuckyFella73 @adammorland Thanks guys ! You saved me a whole day I would probably spend looking for this problem resolution ! LOL

LuckyFella solution worked like a charm in here... and this means the problem with CI is a shame on 1and1.com Tongue