Database tables not created by setup.php
- Dominant language
- Makefile
- Stars
- 63
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
After setting up the docker containers on Ubuntu 22.04 with the commands:
git clone https://github.com/cytopia/docker-dvwa
make start
This produces the following output:
Starting DVWA
docker-compose up -d
Creating network "docker-dvwa_dvwa-net" with driver "bridge"
Creating docker-dvwa_dvwa_web_1 ... done
Creating docker-dvwa_dvwa_db_1 ... done
docker-compose logs dvwa_web 2>&1 | grep "Setting"
dvwa_web_1 | Setting PHP version: PHP 8.1.14 (cli) (built: Jan 11 2023 07:53:46) (NTS)
dvwa_web_1 | Setting MySQL hostname: dvwa_db
dvwa_web_1 | Setting MySQL database: dvwa
dvwa_web_1 | Setting MySQL username: dvwa
dvwa_web_1 | Setting MySQL password: ********
dvwa_web_1 | Setting Recaptcha priv key:
dvwa_web_1 | Setting Recaptcha pub key:
dvwa_web_1 | Setting Security level: medium
dvwa_web_1 | Setting PHP error display: 0
dvwa_web_1 | Setting PHP IDS state: disabled
dvwa_web_1 | Setting PHP IDS verbosity: false
However, I am unable to login to the DVWA web server at http://localhost:8000/.
I am able to access http://localhost:8000/setup.php where I clicked on Create/Reset Database. This did not enable me to login.
When accessing the database directly, I see no tables exist in the 'dvwa' database:
$ mysql -h 172.20.0.2 -u dvwa -p dvwa
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 24
Server version: 10.1.48-MariaDB-1~bionic mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [dvwa]> show tables;
Empty set (0.000 sec)
I did not make any changes to config.inc.php on the web server container. Its contents are:
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with setup.php and the provided config.inc.php, then inspect the docker-compose logs for dvwa_web and the database container while reproducing the make start flow. Done means Create/Reset Database creates the expected tables in the dvwa database and login works at http://localhost:8000/.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, mariadb, php
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100