Git Product home page Git Product logo

Comments (7)

digininja avatar digininja commented on August 27, 2024

It looks like you aren't running the latest version of DVWA

This is line 77 along with context and that line is not going to throw the error you are seeing.

 70 
 71     session_set_cookie_params([
 72         'lifetime' => $maxlifetime,
 73         'path' => '/',
 74         'domain' => $domain,
 75         'secure' => $secure,
 76         'httponly' => $httponly,
 77         'samesite' => $samesite
 78     ]);
 79 
 80     session_start();
 81 

Get the latest version of the app from this repo and try again.

from dvwa.

cmq104 avatar cmq104 commented on August 27, 2024

I tried two ways to download latest version , one for downloading code zip , one for git clone ,
the following picture shows how i git clone
image
and then i copy it into apache2 and restart apache2
image
but it shows the same error
image
the following picture shows /var/www/html/DVWA/dvwa/includes/dvwaPage.inc.php
image

btw, i don't understand why it can report this error either :(
it seems there is no array to string in line 77

from dvwa.

digininja avatar digininja commented on August 27, 2024

Let's just check that you are looking at the right file. Edit /var/www/html/DVWA/dvwa/includes/dvwaPage.inc.php and insert three lines of empty comments at the top of the file.
If the report is coming from this file, then the error should move to line 80, if it stays at 77 then something else is going wrong.

from dvwa.

cmq104 avatar cmq104 commented on August 27, 2024

i insert four blank at the top
6f73f8b00c8643c82ed5f4c8846e8db
and it shows in line 81 now
36e8567a80c16b4482b10e7a12b04eb

from dvwa.

digininja avatar digininja commented on August 27, 2024

Got it, I think you might be running a version of PHP earlier than 7.3, can you check.

The definition of session_set_cookie_params changed from taking individual parameters to being able to take an array with named parameters from 7.3:

https://www.php.net/session_set_cookie_params

Version 7.2 reached end of life in 2020 so I'll count this as an unsupported version and ask you to upgrade to a newer version of php.

from dvwa.

cmq104 avatar cmq104 commented on August 27, 2024

I see.
My linux is ubuntu18.04 and apt-get only supply php7.2
i'll upgrade my system to 20.04 and try again
anyway ,thank you very much for your answering

from dvwa.

digininja avatar digininja commented on August 27, 2024

Problem solved.

from dvwa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.