0

Have followed the reddit thread on updating permissions (since the spec is now outdated). Server runs but then gives me this error:

Fatal error: Could not decode /home/ubuntu/workspace/pset7/includes/../config.json in /home/ubuntu/workspace/pset7/vendor/library50-php-5/CS50/CS50.php on line 105

Debugging line 105, we see:

    // decode contents of configuration file
    $config = json_decode($contents, true);
    if (is_null($config))
    {
        trigger_error("Could not decode {$path}", E_USER_ERROR);
    }

which is in fact the error, but where is the json_decode function? Why is it not working?

Here's my config.json file (copied and pasted):

user{
    "database": {
        "host": "localhost",
        "name": "pset7",
        "username": "borker",
        "password": "notmyrealpassword"
    }
}

Any idea on what to do? Should I just switch over to the new psets?

1

The word user shouldn't be there. It should be only:

{
    "database": {
        "host": "localhost",
        "name": "pset7",
        "username": "borker",
        "password": "notmyrealpassword"
    }
}
1
  • 1
    boom magic. need to wait 7 minutes to accept this answer. – borker Nov 28 '16 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .