LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   localhost/dvwa not displaying correctly (https://www.linuxquestions.org/questions/linux-networking-3/localhost-dvwa-not-displaying-correctly-4175610649/)

test2017 07-26-2017 09:11 AM

localhost/dvwa not displaying correctly
 
2 Attachment(s)
localhost/dvwa webpage is displaying like in the attachment,only words are there,no links for database setup or login.


Instead of how locathost/dvwa should normally display(2nd attachment)

I tried to remove and recreate the SQL database, re-download DVWA files, checked apache2 and DVWA configuration files, but did not find any problem.
Can anyone point out the problem?

Edit:Also i read somewhere that this is the problem with my external .css files, either i deleted them or the path is incorrect.If that is the case,how to correct it?

bathory 07-27-2017 01:43 AM

Quote:

Originally Posted by test2017 (Post 5740068)
localhost/dvwa webpage is displaying like in the attachment,only words are there,no links for database setup or login.

Instead of how locathost/dvwa should normally display(2nd attachment)

I tried to remove and recreate the SQL database, re-download DVWA files, checked apache2 and DVWA configuration files, but did not find any problem.
Can anyone point out the problem?

Edit:Also i read somewhere that this is the problem with my external .css files, either i deleted them or the path is incorrect.If that is the case,how to correct it?

You should examine the apache error_log, to see where it looks for the missing files.

Cheers

test2017 07-27-2017 08:40 AM

Quote:

Originally Posted by bathory (Post 5740408)
You should examine the apache error_log, to see where it looks for the missing files.

Cheers

I am actually a noob in this field...can you plz explain how to do that?

bathory 07-27-2017 09:35 AM

Quote:

Originally Posted by test2017 (Post 5740514)
I am actually a noob in this field...can you plz explain how to do that?

I understand that you're a noob. but you could at least try to use your favorite search engine to find where apache stores its log files.

Also you didn't mention your distro. I guess it's a debian/ubuntu one, because you used apache2 in your OP. If that's the case check under /var/log/apache2 and post the relevant part of error_log.

test2017 07-27-2017 10:08 AM

Quote:

Originally Posted by bathory (Post 5740549)
I understand that you're a noob. but you could at least try to use your favorite search engine to find where apache stores its log files.

Also you didn't mention your distro. I guess it's a debian/ubuntu one, because you used apache2 in your OP. If that's the case check under /var/log/apache2 and post the relevant part of error_log.

I am actually on kali linux(debian distro) in virtualbox.Also if i do it from my main os(ubuntu) , i get the same error.Found the apache2 error.log data..posting it here.

[Sun Jul 23 22:36:47.229208 2017] [mpm_event:notice] [pid 7668:tid 139627725497536] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Sun Jul 23 22:36:47.229304 2017] [core:notice] [pid 7668:tid 139627725497536] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 23 22:37:59.056174 2017] [mpm_event:notice] [pid 7668:tid 139627725497536] AH00491: caught SIGTERM, shutting down
[Sun Jul 23 22:37:59.105459 2017] [mpm_event:notice] [pid 7743:tid 140609752323264] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Sun Jul 23 22:37:59.105552 2017] [core:notice] [pid 7743:tid 140609752323264] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 23 23:04:40.236583 2017] [mpm_event:notice] [pid 7743:tid 140609752323264] AH00491: caught SIGTERM, shutting down
[Sun Jul 23 23:04:40.454367 2017] [mpm_event:notice] [pid 8068:tid 139740921361600] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Sun Jul 23 23:04:40.454495 2017] [core:notice] [pid 8068:tid 139740921361600] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 23 23:56:54.394579 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.html denied (filesystem path '/var/www/html/dvwa/index.html') because search permissions are missing on a component of the path
[Sun Jul 23 23:56:54.460439 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.cgi denied (filesystem path '/var/www/html/dvwa/index.cgi') because search permissions are missing on a component of the path
[Sun Jul 23 23:56:54.460512 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.pl denied (filesystem path '/var/www/html/dvwa/index.pl') because search permissions are missing on a component of the path
[Sun Jul 23 23:56:54.460545 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.php denied (filesystem path '/var/www/html/dvwa/index.php') because search permissions are missing on a component of the path
[Sun Jul 23 23:56:54.460575 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.xhtml denied (filesystem path '/var/www/html/dvwa/index.xhtml') because search permissions are missing on a component of the path
[Sun Jul 23 23:56:54.460603 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.htm denied (filesystem path '/var/www/html/dvwa/index.htm') because search permissions are missing on a component of the path
[Mon Jul 24 00:14:24.092287 2017] [mpm_event:notice] [pid 8068:tid 139740921361600] AH00491: caught SIGTERM, shutting down
[Mon Jul 24 00:14:24.548878 2017] [mpm_event:notice] [pid 9015:tid 140541212284096] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 24 00:14:24.580721 2017] [core:notice] [pid 9015:tid 140541212284096] AH00094: Command line: '/usr/sbin/apache2'

test2017 07-27-2017 10:21 AM

Quote:

Originally Posted by bathory (Post 5740549)
I understand that you're a noob. but you could at least try to use your favorite search engine to find where apache stores its log files.

Also you didn't mention your distro. I guess it's a debian/ubuntu one, because you used apache2 in your OP. If that's the case check under /var/log/apache2 and post the relevant part of error_log.

I read it somewhere that the webpage or apache2 does not support php 7.0 and we must use php 5.6 .I removed php 7 and try to install php 5 from terminal..but the command for installing php 5 did not work.So i reinstalled php7 again.

bathory 07-27-2017 10:37 AM

Quote:

[Sun Jul 23 23:56:54.460575 2017] [core:error] [pid 8070:tid 139740653254400] (13)Permission denied: [client 127.0.0.1:58350] AH00035: access to /dvwa/index.xhtml denied (filesystem path '/var/www/html/dvwa/index.xhtml') because search permissions are missing on a component of the path
You should make sure that each (sub)directory of the path /var/www/html/dvwa has the execute bit set:
Code:

find /var/www/html -type d -exec chmod 755 {} \;

Quote:

I read it somewhere that the webpage or apache2 does not support php 7.0 and we must use php 5.6 .I removed php 7 and try to install php 5 from terminal..but the command for installing php 5 did not work.So i reinstalled php7 again.
See if the above helps before messing with php versions

test2017 07-27-2017 11:12 AM

Quote:

Originally Posted by bathory (Post 5740589)
You should make sure that each (sub)directory of the path /var/www/html/dvwa has the execute bit set:
Code:

find /var/www/html -type d -exec chmod 755 {} \;


See if the above helps before messing with php versions

Is the semicolon at the end after\ included?..Because it is giving an error when i typed it in terminal
Without the semicolon at the end,I I ran the code it just displays >
Do i nsed to type in anything beside that?

bathory 07-27-2017 11:43 AM

Quote:

Is the semicolon at the end after\ included?..Because it is giving an error when i typed it in terminal
Yes it's needed to end the command. And you should post the error you get, because "giving an error" says nothing to us.

Without further info, I can only suggest you, that you have to run the command as root, or through sudo.

test2017 07-27-2017 02:01 PM

[QUOTE=bathory;5740628]Yes it's needed to end the command. And you should post the error you get, because "giving an error" says nothing to us.

Without further info, I can only suggest you, that you have to run the command as root, or through sudo.[/Quote/]

Sorry it was just a typo...afterwards the command executed successfully ,but nothing else happened:(

bathory 07-28-2017 01:17 AM

Quote:

afterwards the command executed successfully ,but nothing else happened
Clear your browser cache, reload the URL and see what you get.
In case of errors post the new logs.

test2017 07-29-2017 06:21 AM

Quote:

Originally Posted by bathory (Post 5740893)
Clear your browser cache, reload the URL and see what you get.
In case of errors post the new logs.

Did that but didn't help.Pasting what my current error.log reads currently

[Thu Jul 27 19:47:39.895363 2017] [mpm_event:notice] [pid 2364:tid 139946303706304] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Thu Jul 27 19:47:39.895654 2017] [core:notice] [pid 2364:tid 139946303706304] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jul 27 22:30:19.357105 2017] [mpm_event:notice] [pid 2068:tid 140345787389120] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Thu Jul 27 22:30:19.460495 2017] [core:notice] [pid 2068:tid 140345787389120] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 28 00:25:06.347292 2017] [mpm_event:notice] [pid 1594:tid 139651111474368] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Fri Jul 28 00:25:06.364693 2017] [core:notice] [pid 1594:tid 139651111474368] AH00094: Command line: '/usr/sbin/apache2'

bathory 07-29-2017 11:12 AM

Quote:

Originally Posted by test2017 (Post 5741373)
Did that but didn't help.Pasting what my current error.log reads currently

[Thu Jul 27 19:47:39.895363 2017] [mpm_event:notice] [pid 2364:tid 139946303706304] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Thu Jul 27 19:47:39.895654 2017] [core:notice] [pid 2364:tid 139946303706304] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jul 27 22:30:19.357105 2017] [mpm_event:notice] [pid 2068:tid 140345787389120] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Thu Jul 27 22:30:19.460495 2017] [core:notice] [pid 2068:tid 140345787389120] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jul 28 00:25:06.347292 2017] [mpm_event:notice] [pid 1594:tid 139651111474368] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Fri Jul 28 00:25:06.364693 2017] [core:notice] [pid 1594:tid 139651111474368] AH00094: Command line: '/usr/sbin/apache2'

There are no errors in that log snippet. What is the problem now?
If you see nothing but a blank page, you need to enable php logging

Regards

test2017 07-29-2017 11:37 AM

Quote:

Originally Posted by bathory (Post 5741440)
There are no errors in that log snippet. What is the problem now?
If you see nothing but a blank page, you need to enable php logging

Regards

I have the same problem as before..localhost is running correctly..displaying the apache2 debian default page..but localhost/dvwa just shows a screen with only text instead of how it should appear with all the options like login and setup.Ok im trying to enable php logging as you said.Will reply after that..if it worked or not

Edit:Tried doing what the blog said,but i dont have php5..i have php 7..so i also tried by putting in 7 instead of 5...that 1st command with nano.. it just opened a blank screen..saying no such file or directory

bathory 07-29-2017 12:27 PM

Quote:

Originally Posted by test2017 (Post 5741446)
I have the same problem as before..localhost is running correctly..displaying the apache2 debian default page..but localhost/dvwa just shows a screen with only text instead of how it should appear with all the options like login and setup.Ok im trying to enable php logging as you said.Will reply after that..if it worked or not

Edit:Tried doing what the blog said,but i dont have php5..i have php 7..so i also tried by putting in 7 instead of 5...that 1st command with nano.. it just opened a blank screen..saying no such file or directory

The problem is not the same this time, as there are no errors in the log file.

Anyway since you're a newbie that doesn't try to use a search engine in order to solve problems, here is a link on how to install dvwa in ubuntu with php7. Try to adopt it to fit your setup.

Also IMO as a noob, you should have used a more user friendly distro and not Kali that is intended for more experienced users


All times are GMT -5. The time now is 01:48 PM.