I am using ZeroMQ socket library in my web application. I have configured php.ini so Apache can use ZMQ but I dont know how phpunit can use it.
Dont phpunit use the same php.ini which apache uses?
In phpunit I get following error.
PHP Fatal error: Class 'ZMQContext' not found in /home/idlecool/checker/testcases/checkerTest.php on line 53
Which
php.inifile is used for Apache and command-line generally depends on your Linux distribution ; if using Debian or Ubuntu, you’ll generally have :/etc/php5/apache2/php.inifor Apache/etc/php5/cli/php.inifor command-line — and PHPUnit runs as a command-line application.But note that quite often (it’s true on Ubuntu, by default), all
.inifiles from the/etc/php5/conf.d/directory will be loaded in both Apache and CLI modes.Which means that, if you want an extension to be loaded in both modes, you should create a
.inifile in that directory, loading and configuring it.For example, you could have a
/etc/php5/conf.d/zmq.inifile, containing something like :(of course, you’ll have to put the name of the right
.sofile)