s4n7h0 / xvwa

XVWA is a badly coded web application written in PHP/MySQL that helps security enthusiasts to learn application security.
GNU General Public License v3.0
1.69k stars 339 forks source link

Can't log in. #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

After successfuly visiting locally xvwa, I tried to login so I can setup the database and start using it. Yet though, clicking login (after entering the details, tried with all of them: admin, xvwa, and user), all I get is a blank (white) page with url: http://localhost/xvwa/login.php.

Is it a local problem? (Note that I am using UniServer Zero XI 11.8.1)

s4n7h0 commented 8 years ago

have you configured the database configuration - config.php ? If this is done, set up the tables at http://localhost/xvwa/setup/

lfatty commented 8 years ago

I had the same issue yesterday. i checked the configuration file, mysql and apache2 and all were fine. However, when i go to the url for configuration i got some error.

lfatty commented 8 years ago

@s4n7h0 By the way, kudos to you for taking your time to building this learning app.

s4n7h0 commented 8 years ago

@lfatty can you post the error here ? I believe you did the setup before you login. http://localhost/xvwa/setup/

0xdeadbeefJERKY commented 8 years ago

I'm having similar issues. Whenever I attempt to run the setup, the string Setup finished is written to the setup page, but the database and tables are never created (hence the inability to log in). I've double-checked the configuration files and they're correct.

s4n7h0 commented 8 years ago

@TheBananaStand you should be able to see something like this, if the tables were created successfully.

xvwa_setup

andrewmclagan commented 8 years ago
sambowne commented 8 years ago

I had the same problem. The setup.php file in this repository is broken; it is all commented out. I replaced it with this setup.php file and now it works:


<?php $dbname = 'xvwa'; $username = 'root'; $password = 'PASSWORD';

$conn = mysql_connect('localhost', $username, $password); if (!$conn) { die('Could not connect: ' . mysql_error()); }

$sql = 'CREATE DATABASE ' . $dbname; if (mysql_query($sql, $conn)) { echo "Database my_db created successfully\n"; } else { echo 'Error creating database: ' . mysql_error() . "\n"; }

$dbselect=mysql_select_db($dbname,$conn); if($dbselect){ echo "<span class=\"glyphicon glyphicon-star\">  "; echo "Connected to database Sucessfully.
";
// creating tables $table_comment=mysql_query('create table comments(id int,comment varchar(100),date date)',$conn); if(table_comment){ $insert_comment=mysql_query("INSERT INTO comments (id,user,comment,date) VALUES ('1', 'admin', 'Keep posting your comments here ', '2015-08-10'",$conn); if(insert_comment){ echo "<span class=\"glyphicon glyphicon-star\">  "; echo "Table comments created sucessfully.
"; }else{ echo "<span class=\"glyphicon glyphicon-star\">  "; echo "Can not create table comment. Try submit/reset again.
"; } }else{
echo "<span class=\"glyphicon glyphicon-star\">  "; echo "Failed to use/select database. Check the configuration file.
"; } }

?>

s4n7h0 commented 8 years ago

Hi @sambowne I just pushed some minor commit. The setup.php page was created just for developer reference. It just shows some table structures and queries. You can access http://localhost/xvwa/setup/ for database setup. The submit/reset button will do all setup functions as shown in my previous comment. Let me know if you still face any issues sir.

s4n7h0 commented 8 years ago

Hey folks, @TheAngryAvocado @lfatty @TheBananaStand I made a short script for auto configuring xvwa with latest repo from GitHub. This issue should be closed with it https://github.com/s4n7h0/Script-Bucket/blob/master/Bash/xvwa-setup.sh

sashthamanik commented 8 years ago

Its not work cz--> if(insert_comment){ } Its work if($insert_comment){ }

s4n7h0 commented 8 years ago

@sashthamanik how did the auto setup work for you ? https://github.com/s4n7h0/Script-Bucket/blob/master/Bash/xvwa-setup.sh

AliBawazeEer commented 8 years ago

whenever i access the following link http://192.168.56.103/xvwa/ i get blank screen

additionally when i run the auto script i get the below error message .

./xvwa-setup.sh ./xvwa-setup.sh: line 5: syntax error near unexpected token newline' ./xvwa-setup.sh: line 5:<!DOCTYPE html>'

s4n7h0 commented 8 years ago

@AliBawazeEer please check the script you are running. I assume you might have "wget"ed the html page ?

nizarakbarm commented 7 years ago

I'm success in installation xvwa but there is only blank page when i open http://localhost/xvwa

nizarakbarm commented 7 years ago

and also when http://localhost/xvwa/setup is also showing blank page too

s4n7h0 commented 7 years ago

@elneunizar most likely because the config.php file has some wrong parameters. please check if it is same as mentioned here https://github.com/s4n7h0/xvwa#manual-installation-method Do let me know if this works or you still facing issues ?

nizarakbarm commented 7 years ago

still same

nizarakbarm commented 7 years ago

i already follow all instruction

s4n7h0 commented 7 years ago

@elneunizar could you provide remote access to your setup ? I can look into the issue and fix it for you. It didnt cause any issue for my setup (kali linux + automated script + change settings in config.php)