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.7k stars 339 forks source link

Only Blank Page Showing #30

Closed leisipeisi closed 6 years ago

leisipeisi commented 6 years ago

Hi everyone,

I am currently facing the same issue as others have stated here: I only see a blank page with the black header after I setup XVWA and try to reach the website. My system is a custom-built linux using yocto, including apache, php, mysql and proftpd. Sadly I am not able to run the setup script since the commands won't work. I followed the steps the script is doing manually.

The my.cnf has the following lines:

[client]
#password                                       = password
...
[mysqld]
user                                            = root
...

The XVWA config is:

<?php
$XVWA_WEBROOT = "";
$host = "localhost";
$dbname = 'xvwa';
$user = "root";
$pass = "";
$conn = new mysqli($host,$user,$pass,$dbname);
$conn1 = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
$conn1->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
?>

I have created a database named xvwa and SQL Server is running:

/etc/init.d/mysqld status
 SUCCESS! MySQL running (1335)

Do you have any suggestion what to try to get it running? Any help is appreciated!

s4n7h0 commented 6 years ago

@leisipeisi The config looks okay to me. It is showing blank page mostly DB connection error. What is the php version you running ? Can you also try adding error statements in the page you are trying to load and see what does it show ?

leisipeisi commented 6 years ago

Hi, thank you for your reply!

Your question led me to the solution, my php was not correctly connected to my apache. When I fixed this, XVWA was running correctly.

Thank you again!