Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Database tables not created by setup.php #32

@jwalden

Description

@jwalden

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions