apache_getenv() not found with cli debugging
Hi,
First, I'm new in PhpStorm debugging.
I try to debug a simple PHP script using PHPStorm debugger with console only (no browser).
It seems to work (I can step over some lines), but crashes when it reach apache_getenv() call.
require_once apache_getenv("PATH_ROOT") . "config/config.php";
Console:
PHP Fatal error: Uncaught Error: Call to undefined function apache_getenv() in D:\git\xxxx
Fatal error: Uncaught Error: Call to undefined function apache_getenv() in D:\git\xxxx
Stack trace:
#0 {main}
Error: Call to undefined function apache_getenv() in D:\git\xxxx
thrown in D:\git\xxxx
In this case, the function is used to get project path.
How could I tell PhpStorm to use correctly this function ? I already searched on Internet but found nothing relevant.
Brice
Please sign in to leave a comment.
Hello,
Are you able to run the code in console without debugging it?
Maybe your PHP interpreter is missing some extensions?