0

I cloned an entire site from git. I cannot install it.

  1. Inside the foo.com/sites folder there are a couple folders. The settings.php file is in the folder dev.foo.com rather than the default folder.(I know this is how multisite is.)

I have added a line in my hosts file

    127.0.0.1       dev.foo.com

I have added a stanza to the http.conf file

    <VirtualHost *:80>
DocumentRoot /var/www/foo.com
ServerName dev.foo.com
    </VirtualHost>

Restart Apache - then I go to dev.foo.com - then I see the It Works! file created by apache rather than the drupal installer that I should see from dev.foo.com

How come?

2.. How can I use the database of the site I cloned? With Backup and Migrate?

EDIT: tried the site in a couple other browsers and I see this

Site off-line

The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.

If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

3...Looks like I need the database before trying to install? Yeah?

  • What is your Drupal version? – marcvangend May 24 '11 at 10:50
1
  1. If you see "it works", Apache hasn't recognised index.php - either you are being served files from the wrong directory, or Apache isn't configured to use index.php as the default file in a directory. You can test the latter readily: http://dev.foo.com/index.php will show the correct page while http://dev.foo.com/ will display "It works".

  2. mysqldump, backup and restore, PHPMyAdmin ... whatever tools you have available.

  3. Yes, you need a working DB locally to install Drupal. And you need the values in settings.php to work to load your existing DB.

1

I got it to work. Kind of. Aside from this

What did it was -

  • I made a backup of the database with Backup and Migrate module from the Production site.
  • I created a database and user with phpmyadmin that matched the settings.php file.(locally)
  • I ran the dev.foo.com/install.php and it went though.
  • After that I enabled the Backup and Migrate module.
  • Then imported the database from the initial backup. (there was a problem with the php only allowing 2M for import so I hunted down php.ini and changed the value to something high enough.
  • Site was there.

I understand this is a round-about way. I know there are better ways to import/export the database thought the command line.

But is there a way to get the site to work without making a database that matches the settings.php file? Or is that the best way?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.