0

I've setup ddev for a Silverstripe PHP project, with existing files. I can get to the site. I can get to the phpmyadmin link given by ddev describe and I have ran ddev import-db successfully.

When I go to the site's ddev link, I get missing table errors and the phpMyAdmin is not showing any of the imported data.

What am I missing to get the database that the CLI is using to be the one the browser based site & phpMyAdmin are using?

Will
  • 4,498
  • 2
  • 38
  • 65
  • 1
    Great to have you working with Silverstripe! If you `ddev ssh` and then run `mysql`, and `SHOW TABLES;` do you see the expected tables? Is it possible that your import file does not have the expected contents in it, or that it specifies a different database? I'd recommend poking around with mysql to see what happened. Note that you can also import inside either the web container or the db container just using `mysql`. – rfay Mar 21 '19 at 12:29
  • Hi! It says : Empty set (0.00 sec) – Will Mar 21 '19 at 13:01
  • ok, so thanks. I edited the sql import to not specify a db. I then had a couple of things to fix in the silverstripe setup, ssh into the webroot and run "php framework/cli-script.php dev/build " and it's working. – Will Mar 21 '19 at 13:10
  • well, except .htaccess doesn't seem to work? – Will Mar 21 '19 at 13:14
  • 1
    .htaccess is a feature of Apache. The default webserver_type in ddev is nginx. So change the webserver_type in .ddev/config.yaml to `apache-fpm` and you should be good to go. – rfay Mar 21 '19 at 13:18
  • 1
    I'd love it if you would write up your setup for ddev on Stack Overflow. Ask the question "How do I set up the Silverstripe CMS with ddev?" and ask the question, then click the checkbox to answer your own question, and give a detailed set up setup instructions. That would be awesome! – rfay Mar 21 '19 at 13:19
  • Ok, thanks. It works! ill do that – Will Mar 21 '19 at 13:21

0 Answers0