renatocassino/dephpugger

Call to undefined function Dephpug\Dbgp\socket_create()

TekkCraft opened this issue · 3 comments

I get a Fatal error when executing dephpugger.
call vendor/bin/dephpugger.bat server works, but
call vendor/bin/dephpugger.bat debugger throws an error:

Server - Version: v1.1.1
PHP Fatal error:  Uncaught Error: Call to undefined function Dephpug\Dbgp\socket_create() in C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\src\Dephpug\Dbgp\Server.php:33
Stack trace:
#0 C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\src\Dephpug\Dbgp\Client.php(43): Dephpug\Dbgp\Server->startClient('localhost', 9005)
#1 C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\src\Dephpug\Core.php(35): Dephpug\Dbgp\Client->startClient('localhost', 9005)
#2 C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\console\DebuggerCommand.php(32): Dephpug\Core->run()
#3 C:\xampp\htdocs\myProject\vendor\symfony\console\Command\Command.php(264): Dephpug\Console\DebuggerCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 C:\xampp\htdocs\myProject\vendor\symfony\console\Application.php(888): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 in C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\src\Dephpug\Dbgp\Server.php on line 33

Fatal error: Uncaught Error: Call to undefined function Dephpug\Dbgp\socket_create() in C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\src\Dephpug\Dbgp\Server.php on line 33

Error: Call to undefined function Dephpug\Dbgp\socket_create() in C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\src\Dephpug\Dbgp\Server.php on line 33

Call Stack:
    0.4045     359904   1. {main}() C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\bin\dephpugger:0
    0.4718    2021656   2. Symfony\Component\Console\Application->run() C:\xampp\htdocs\myProject\vendor\tacnoman\dephpugger\bin\dephpugger:89

Hello @TekkCraft

This package is compatible with only PHP 7 or more. What's your PHP version?

I never tryied run the dephpugger in windows.

Hello

I'm using PHP 7.1 on Windows 10.

$ php vendor/bin/dephpugger.bat debugger
$ php vendor/bin/dephpugger.bat server

This seems to work now, but the debugger won't get triggered. Do I have to call
$ php vendor/bin/dephpugger.bat cli public/index.php
in the same cli window as
$ php vendor/bin/dephpugger.bat debugger?

Regards,
Tekk

Hello,

I had the same error and fixed it by installing and enabling the php sockets extension.