gcb
gcb

Reputation: 14548

forbid PHP CLI to load an extension present in the ini config file

I have a php installation where i want to have several extensions loaded via ini files. both for apache and for command line.

but for a few unit tests, i do not want those extensions loaded.

can i call php or phpunit in a way that it will not load certain extensions?

let's say, my php.ini on the system is:

extension = A.so
extension = B.so
extension = C.so

i want to run php this time with A and B only. Is there some option like php --exclude-extension=C.so or php -d "extension=!C.so" that eluded me from the manual?

Upvotes: 0

Views: 664

Answers (1)

gcb
gcb

Reputation: 14548

Not possible.

there's no extension list exclusion in php.

Upvotes: 2

Related Questions