PHP7 shows PHP code #94

Open
devrajashwin opened this Issue Aug 17, 2016 · 9 comments

Projects

None yet

3 participants

@devrajashwin

Need to run 'setup.php'." ); dvwaRedirect( DVWA_WEB_PAGE_TO_ROOT . 'setup.php' ); } $query = "SELECT * FROM users WHERE user='$user' AND password='$pass';"; $result = @mysqli_query($GLOBALS["___mysqli_ston"], $query ) or die( '

' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)) . '.
Try installing again.

' ); if( $result && mysqli_num_rows( $result ) == 1 ) { // Login Successful... dvwaMessagePush( "You have logged in as '{$user}'" ); dvwaLogin( $user ); dvwaRedirect( DVWA_WEB_PAGE_TO_ROOT . 'index.php' ); } // Login failed dvwaMessagePush( 'Login failed' ); dvwaRedirect( 'login.php' ); } $messagesHtml = messagesPopAllToHtml(); Header( 'Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 Header( 'Content-Type: text/html;charset=utf-8' ); // TODO- proper XHTML headers... Header( 'Expires: Tue, 23 Jun 2009 12:00:00 GMT' ); // Date in the past // Anti-CSRF generateSessionToken(); echo "

@digininja
Contributor

"some this wrong with this" - I fully agree, there is no context, no information about what is going on and so nothing for us to work on.

Ask a question and give some context rather than just dumping a chunk of code.

@devrajashwin

just this only displayed on my browser when i typed localhost://

@digininja
Contributor

You've not got php enabled. Search these issues and google, there are loads of resources on how to enable it in ever different environment.

@NoWishGranted

Hello,

I have the same problem. I installed DVWA on Linux. And I got php enabled, apache2 and mysql running plus my permissions are set. But unfortunatly the login.php and update.php are not loading properly.

Any ideas how to fix it?

@digininja
Contributor

If you are seeing the same you don't have php enabled.

On Sat, 20 Aug 2016, 13:12 NoWishGranted, notifications@github.com wrote:

Hello,

I have the same problem. I installed DVWA on Linux. And I got php enabled,
apache2 and mysql running plus my permissions are set. But unfortunatly the
login.php and update.php are not loading properly.

Any ideas how to fix it?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#94 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHJWXMdsNPx3_piVeVB1GfQzJ30h7VLks5qhu8sgaJpZM4JmHFB
.

@NoWishGranted

But i have php enabled. Other scripts are working properly.

@digininja
Contributor

If you get source code on screen it means the php interpreter isn't parsing
it before the web server or sending it out.

On Sat, 20 Aug 2016, 15:03 NoWishGranted, notifications@github.com wrote:

But i have php enabled. Other scripts are working properly.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#94 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHJWTj1DL-YM-FLGrGORCJUtTrj8EnWks5qhwlLgaJpZM4JmHFB
.

@NoWishGranted

Yeah, I understand. But it is happening only with two scripts - setup.php and login.php. For example instructions.php is loading normally, without any errors or code on the website.

@NoWishGranted
NoWishGranted commented Aug 22, 2016 edited

To your information, PHP7 was problem, had to downgrade to 5.6

@ethicalhack3r ethicalhack3r changed the title from some this wrong with this to PHP7 shows PHP code Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment