Hi drupal supporters,

I am new in drupal and have installed drupal core files using Acquia Dev Desktop 2 installer. However after installation is completed and configured, I could not find the base url, database url, and database array key-value pairs in the settings.php of my local server file. I need those information so I can connect my drupal site to my hosting account and make the site live. Can someone who have experiences in launching drupal site help me to solve this big issue?

Thank you.

Jason

Comments

VM’s picture

What tool is in use to view the file?

I highly suggest a tool that color codes and provides line numbers. As an example, if you are using windows then I suggest the notepad++ open source editor @ https://notepad-plus-plus.org/

turkme’s picture

Hi VMII,

Thanks for reaching out. I used sublime text 2 to view the settings.php on a mac. It can also color codes and provides line number very clearly, But I still could not locate all the database info and base URL. Can you suggest other solutions? I think the editor may not be the issue.

VM’s picture

the active lines should be the only colored lined in the file. Also of note you can perform a search within the file for $databases = array and $base_url to find those strings.

$databases = array should be aroudn line 180
$base_url around line 248. If it isn't colored, it is commented out and not being used. if you don't have a specific reason for enabling it, you shouldn't.

ionu_danic’s picture

So assuming you are talking about a drupal 7 installation.

Since you use Acquia Dev Desktop 2, there are some files generated for you.
First under /sites you will have a folder that has the domain name you used in devdesktop 2 under "Local site name" i think it is called.
That folder will be empty because aquia dev desktop 2 writes some code in the settings.php that is located under /sites/default to detect your enviroment and for each one of them it will tell drupal to use other settings.

This settings are generated in you Acquia Dev Desktop 2 installation folder, not in your drupal folder that you downloaded from drupal.org. In my case i can find this files at C:\Users\USERNAME\.acquia\DevDesktop\DrupalSettings . That is the reason you cannot find the db connection by searching in sublime, because most probably you use the "open folder" feature of sublime or create project or whatever is called and you selected your drupal installation.

There (at C:\Users\USERNAME\.acquia\DevDesktop\DrupalSettings) you should have multiple .inc files if you have multiple installations or multiple domains.
If you have only one.. open it with an editor and there you will find your db connection .. if you have multiple, find the one that is related to your installation and domain and use that.

All this happens because you use Aquia dev desktop 2, I guess acuqia dev desktop 1 behaves a bit different, and by that i think it just generated a settings.php under /sites/yourdomanname and in there you have the db connection.

You do not have to do this, you can also configure your vhosts and settings.php by yourself but i will not go into that in this post.
Actualy to move your local installation to a hosting you would only need to copy the default folder located under /sites . . rename that folder to your domain name and rename the default.setting.php to settings.php and edit that file to connect to your db.
(in default.settings.php the db connection is commented so it will not be colored in sublime.)

I hope this helps, I used my own words so it is possible some words are not exactly drupal terms but i tried to explain what i know and in a most clear way i can.

Enjoy