Constant PASSWORD_DEFAULT already defined

Hi

We recently installed Invoice Ninja via Softaculous Installer from our hosted site.

The version we have installed is 4.5.33

But when I tried to open the admin site I got this error/warning:

Mon Feb 22 09:55:10.387834 2021] [proxy_fcgi:error] [pid 46279:tid 34416622592] [client 64.6.103.190:23471] AH01071: Got error 'PHP message: PHP Notice: Constant PASSWORD_DEFAULT already defined in /usr/home/public_html/ninja-dev/update_pass.php on line 17

When I checked the path, I didn’t see any update_pass.ph file. This is my first time installing Invoice Ninja and was wondering how can I fix this issue? I was advised to check if debug mode is available in config but I don’t know how to do that as well.

Any help would be appreciated. Thank you

Hi,

I’m sorry, I’m not sure. I don’t see PASSWORD_DEFAULT referenced anywhere in the codebase.

What about the file update_pass.php ?

I’m not familiar with the file

hmm is debug mode available in config? like how can i turn it on?

We strongly discourage using debug mode in a production system (it can leak credentials) but it can be enabled by setting APP_DEBUG=true in the .env file.

its okay im using a development site

now I see the errors, I see this:

(1/2) ErrorException

Unparenthesized a ? b : c ?: d is deprecated. Use either (a ? b : c) ?: d or a ? b : (c ?: d)

(2/2) ErrorException

Unparenthesized a ? b : c ?: d is deprecated. Use either (a ? b : c) ?: d or a ? b : (c ?: d) (View: /usr/home/public_html/ninja-dev/resources/views/auth/login.blade.php)

What does this error means?

It usually means you’re using PHP 7.4 which isn’t supported, downgrading to 7.3 should help

I see, what would be the alternative if its not possible for us to dowgrade to 7.3? Edit the lines per error?

You could migrate to v5

Nevermind its okay, we just downgraded to 7.3

It’s working now. Thank you :slight_smile:

1 Like