Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/wizard gives incorrect instruction for installing on windows #89

Open
cburschka opened this issue Jun 7, 2020 · 3 comments
Open

/wizard gives incorrect instruction for installing on windows #89

cburschka opened this issue Jun 7, 2020 · 3 comments
Labels

Comments

@cburschka
Copy link

After pasting my phpinfo(), I was prompted to add zend_extension = ext\php_xdebug-2.9.6-7.4-vc15-x86_64.dll to my php.ini.

This doesn't work; the correct line to use was zend_extension = php_xdebug-2.9.6-7.4-vc15-x86_64.dll.

My stock php.ini file appears to have extension_dir set to ext:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
;extension_dir = "./"
; On windows:
extension_dir = "ext"
@derickr
Copy link
Contributor

derickr commented Jun 21, 2020

I would need to see the full contents of what you passed into the wizard to debug this. I don't keep these in a log. However, I think the issue is that traditionally "extension_dir" was required to be a full absolute path, and not a relative one.

wenz added a commit to wenz/xdebug.org that referenced this issue Oct 1, 2020
@wenz
Copy link

wenz commented Oct 1, 2020

I just stumbled upon the same thing. Using PHP 7.4.x with Windows 10 and IIS, extension_dir defaults to the full path to the "ext" folder of the PHP directory, in my case C:\php\ext.

Then, the wizard correctly yields:
zend_extension = C:\php\ext\php_xdebug-2.9.8-7.4-vc15-nts-x86_64.dll

However if I manually set extension_dir=ext as suggested in the php.ini file, then extension_dir is also reported as "ext", which yields the result @cburschka described.

So at least under Windows, extension_dir is not necessarily an absolute path. I would therefore recommend just providing the extension file name for Windows systems.

Trivial PR for this is on the way (no, not for Botoktoberfest or what it's called ;-) ), but let me get hold of some older PHP versions the see when this behaviour started. I always thought extension_dir would return an absolute path.

@wenz
Copy link

wenz commented Oct 2, 2020

I checked with PHP versions back to 7.0, both (Fast)CGI and the Apache module, and they all report the extension_dir value verbatim, so the value of "ext" (as recommended in php.ini) will be reported as "ext". Since the instructions recommend to put the DLL into the extension directory anyway, I'd recommend to go ahead with the approach from my PR.

wenz added a commit to wenz/xdebug.org that referenced this issue Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants