Closed ghost closed 8 years ago
have you configured the database configuration - config.php ? If this is done, set up the tables at http://localhost/xvwa/setup/
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.
@s4n7h0 By the way, kudos to you for taking your time to building this learning app.
@lfatty can you post the error here ? I believe you did the setup before you login. http://localhost/xvwa/setup/
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.
@TheBananaStand you should be able to see something like this, if the tables were created successfully.
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.
";
}
}
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.
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
Its not work cz--> if(insert_comment){ } Its work if($insert_comment){ }
@sashthamanik how did the auto setup work for you ? https://github.com/s4n7h0/Script-Bucket/blob/master/Bash/xvwa-setup.sh
whenever i access the following link http://192.168.56.103/xvwa/ i get blank screen
./xvwa-setup.sh
./xvwa-setup.sh: line 5: syntax error near unexpected token newline' ./xvwa-setup.sh: line 5:
<!DOCTYPE html>'
@AliBawazeEer please check the script you are running. I assume you might have "wget"ed the html page ?
I'm success in installation xvwa but there is only blank page when i open http://localhost/xvwa
and also when http://localhost/xvwa/setup is also showing blank page too
@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 ?
still same
i already follow all instruction
@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)
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)