Okay, This might sound like a rookie mistake but I swear it isn't, I use PHP every day and never had this issue, But when trying to convert a perfectly valid JSON document
[
{
"title" : "Introduction",
"location" : "/class/html/",
"des" : "An introduction to HTML!"
}
]
with the following PHP code
$json = file_get_contents("assets/pages/html/pages.json");
$decoded = json_decode($json,true);
var_dump($decoded);
Nothing happens, I get a 500 error when I try to run it, Then when I go into windows edge debugger it just does blank, Did I do something wrong? I have searched the internet all day and nothing has worked
PHP V7.1
EDIT:
I checked the file location multiple times and it works perfectly, Even if a directly input the string it still doesn't work, When I check the error_log I get the following error
PHP Fatal error: Uncaught Error: Call to undefined function json_decode()
THIS IS MY PHP.INI
display_errors = On
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 128M
post_max_size = 8M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php70"
upload_max_filesize = 32M
zlib.output_compression = Off