Home Forums Support php artisan ninja:update-key

This topic contains 4 replies, has 4 voices, and was last updated by  ninjanafee 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #15036


    Hello! I got this message on my selfhosted server today. What do i do?

    Error: APP_KEY is set to a default value, to update it backup your database and then run php artisan ninja:update-key


    Hillel Coren

    Has anything changed/did you recently upgrade?

    If you have SSH access to the box you can run the command from the project folder.



    I’m running into this on a new install on my dashboard. I will make the assumption that “project folder” means Invoice Ninja’s root folder. When I run:

    php artisan ninja:update-key

    I get:

     php artisan ninja:update-key
    X-Powered-By: PHP/4.4.9
    Content-type: text/html
    <br />
    <b>Warning</b>:  Unexpected character in input:  '\' (ASCII=92) state=1 in <b>/homepages/39/d795196188/htdocs/htdocs/ninja/artisan</b> on line <b>34</b><br />
    <br />
    <b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/homepages/39/d795196188/htdocs/htdocs/ninja/artisan</b> on line <b>34</b><br />

    Perhaps it needs to be run somewhere else?



    To answer my own question, I needed to specify the version of php to run. For 1and1 hosting service this meant:

    php7.3 artisan ninja:update-key

    Hope this helps someone.



    php artisan key:generate

    generate a key with this command line.
    Ninja will give you a demo key. You should update it.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Posted in: