skip to Main Content

enter image description here

Here’s the error upon opening php file using Docker Desktop:

0.1.2
Fatal error: Uncaught Error: Call to undefined function get_json_data() in C:laragonwwwmyprojectpublicindex.php:37 Stack trace: #0 C:laragonwwwmyprojectpublicindex.php(40): get_channels() #1 {main} thrown in C:laragonwwwmyprojectpublicindex.php on line 37

Local link is: localhost

I have the ff. extensions installed on VSCode:

PHP Debug
PHP Intelephense
PHP Extension Pack
PHP IntelliSense

2

Answers


  1. Chosen as BEST ANSWER

    It seems that the edit in settings.JSON inside VS Code had this wrong path:

    "php.validate.executablePath": "C:/xampp/php/php.exe"
    

    I had to delete the project and clone it again and now it works fine. Path shows:

    "php.validate.executablePath": "C:/laragon/bin/php/php-7.4.19-Win32-vc15-x64/php.exe",
    

    Thank you!


  2. use json_decode instead of get_json_data

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search