Home Forums Support php artisan ninja:update-key

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

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

    marjys
    Participant

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

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

    #15037

    Hillel Coren
    Keymaster

    Has anything changed/did you recently upgrade?

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

    #22267

    undrwater
    Participant

    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 />
    (uiserver):u98307103:~/htdocs/ninja$

    Perhaps it needs to be run somewhere else?

    #22301

    undrwater
    Participant

    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.

    #22313

    ninjanafee
    Participant

    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: