php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77801 CLI option -z/--zend_extension does not load specified zend extension
Submitted: 2019-03-26 22:48 UTC Modified: 2019-03-26 23:31 UTC
From: smokey101stair at gmail dot com Assigned:
Status: Open Package: *General Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-03-26 22:48 UTC] smokey101stair at gmail dot com
Description:
------------
Using the -z/--zend_extension option to load a zend extension when using php from the CLI doesn't seem to work on Windows. I tested using PHP versions 5.6.40, 7.2.16, and 7.3.3.

In my particular case, I was trying to load xdebug.

php -z <path to xdebug> -m

The above results in no modules listed under [Zend Modules]

php -z <path to xdebug> --re xdebug
php -z <path to xdebug> --rz xdebug
php -z <path to xdebug> --ri xdebug

The above all result in an error stating that xdebug does not exist.

php -d zend_extension=<path to xdebug>

The above can be used as a workaround as it loads the extension as expected.

Please let me know if I can provide any additional information.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-03-26 23:31 UTC] krakjoe@php.net
-Operating System: Windows 10 +Operating System:
 [2019-03-26 23:31 UTC] krakjoe@php.net
Also happens in other operating systems ...

The reason -m doesn't show it's loaded is clear, they are different getopt blocks.

But even when you run a script with get_loaded_extensions dump, the zend extension is not loaded (tested with opcache which registers a module, the module is not registered).
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 11:01:25 2019 UTC