Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Installing Nubuilder in a hosting domain

Post Reply
thunderpedro
Posts: 1
Joined: Wed Feb 24, 2010 10:55 pm

Installing Nubuilder in a hosting domain

Unread post by thunderpedro »

Hi!

I have a domain at fastdomain, [...], where i have installed the nubuilder.

I followed the instrutions on the wiki and created the databases. At the point i get the nuBuilder login page for the sample, Sample Debtors and the setup nuBuilder as you can check. But i always get the error "Could not connect to database" or at the setup "Could not could not establish MySQL connection..."

I think that the problem is related to Path to SQL file... but i am not very experient.

Any similar issues or clue to this problem?

Thank you very much.

Pedro
michael
Posts: 40
Joined: Mon Jun 15, 2009 9:50 am

Re: Installing Nubuilder in a hosting domain

Unread post by michael »

Hi Pedro,

The "could not connect to database" and "could not establish MySQL connection" errors are normally due to a MySQL username/password or username/database privilege configuration issue. Also, shared hosting accounts such as FastDomain generally create MySQL users with the account name as a prefix. For example, if you account name is ligao7729 and you create a MySQL user called nubuilder, the actual MySQL username will be ligao7729_nubuilder. Then for nuBuilder to work properly, ligao7729_nubuilder needs to be grant all privileges on ligao7729_sample, for example.

I noticed the "Path to SQL file" field is showing up blank for both of the sample sites which get installed with nuBuilder. If these are blank the setup script will not be able to initialize the databases for nuBuilder. Are the files still present in the nuBuilder directory wwwroot? They should be in the same directory as setup.php.

Michael
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Installing Nubuilder in a hosting domain

Unread post by admin »

Hi Pedro,

I have just edited your original post to remove the link to your website because there was a visible link to the setup script which contains passwords. You may want to consider changing your accounts passwords (databases included) just to be on the safe side.

Michael
JeffTaylor
Posts: 11
Joined: Tue Sep 21, 2010 3:21 am

Re: Installing Nubuilder in a hosting domain

Unread post by JeffTaylor »

Hey guys!

Just wanted to say that I had the same initial issue, with my hosting being with justhost, which uses MYSQL database wizard to create databases and users and uses PHPMyAdmin for database admin.

To get the site to work, I created the database, knowing it was <prefix>_<myDatabaseName> , and also assigned a user with full privileges which was <prefix>_<myUserName>.

I copied the sample site, since I wanted to make my own, and uploaded it to the db folder with a folder name of <prefix>_<myDatabaseName>.

In the DB folder, I:
- opened index.php and renamed the PHP variable $dbfolder (line 3) to "<prefix>_<myDatabaseName>"
- opened config.php and set the $DBName variable(line 4) to "<prefix>_<myDatabaseName>" and set the $DBUser variable (line5) to "<prefix>_<myUserName>" and set the $DBPassword to the password I had set up when I created the user.

I then went into the WWWRoot Directory, and edited the sample.sql as follows:
Removed CREATE DATABASE sample
Removed CREATE USER
Removed GRANT PRIVILEGES

Finally, I went into PHPMyAdmin, selected the new database and clicked import, and imported the http://<yourdomain>/sample.sql file.

I was able to successfully log in.

However, the database has some tables I would expect to have rows in empty, and instead has them in <tableName>_messed_up ... so i'll look into that now.

** It is just the style and font and images that appear in messed_up, but site has full functionality.
michael
Posts: 40
Joined: Mon Jun 15, 2009 9:50 am

Re: Installing Nubuilder in a hosting domain

Unread post by michael »

Hi Jeff,


Those tables were accidentally left in the site databases when we built nuBuilder. It won't cause any problems if you drop those tables...

I'm glad you were able to solve that initial issue, and thanks for posting what you did to get it to work!


Cheers

Michael
JeffTaylor
Posts: 11
Joined: Tue Sep 21, 2010 3:21 am

Re: Installing Nubuilder in a hosting domain

Unread post by JeffTaylor »

Hey guys, i'm still having trouble with magic quotes goofing up my ' 's :P
At the moment, i'm just manually hacking the database everytime I make a change which is starting to get old

Could we please have a rundown on how to do a runtime override, and where to stick the set_ini override so that it will remove the magic quotes for good!

I've tried sticking
ini_set("magic_quotes_gpc", "off");
in
common.php
nubuilder.php

Can we have a function maybe that will determine whether magic_quotes are on, and if so disable them? That would be great!
JeffTaylor
Posts: 11
Joined: Tue Sep 21, 2010 3:21 am

Re: Installing Nubuilder in a hosting domain

Unread post by JeffTaylor »

Ahhh worked it out.. php settings were disabled in the hosters .htaccess file, but I can put a local php.ini in all the directories, which has fixed the problem.
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Installing Nubuilder in a hosting domain

Unread post by admin »

.
Post Reply