llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
373 stars 20 forks source link

Command line iniSet option ignored #55

Closed trasher closed 11 years ago

trasher commented 11 years ago

Hello,

Using php-compat-info 2.10.0 with php 5.4.9; I'm trying to execute the following: $ phpci -d memory_limit=512M -d date.timezone=UTC print --report extension --recur tcpdf_5.9.165

And I actually obtain: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /usr/share/pear/Bartlett/PHP/Reflect.php on line 316

Looks like my "memory_limit" is being ignored (don't know at the moment if the timezone setting is being ignored too, I don't think tcpdf relies on date anywhere).

I'll be happy to provide you any other informations that could help you.

Thank you :)

trasher commented 11 years ago

I've just noticed - thanks to Remi - that inverting arguments "solved" the issue: phpci -d date.timezone=UTC -d memory_limit=512M print --report extension --recur tcpdf_5.9.165

llaville commented 11 years ago

@trasher The reason is that the -d --ini-set configuration option from Console_CommandLine used the StoreString action as explained by the official documentation http://pear.php.net/manual/en/package.console.console-commandline.options.php

But I forgot that we can used multiple -d directives (as asked there http://pear.php.net/bugs/bug.php?id=19163)

Code fix will follow. Thanks for your report