Why don't you give Homestead or Docker a try?
PHP Redis extension on MAC OSX
Hi !
Having trouble with php redis extension installation.
i searched on internet but every fix i founded didn't work.
i tried sudo pecl install redis but i had :
sudo pecl install redis
PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lib/php/pecl/20190902/redis.so (dlopen(/usr/local/lib/php/pecl/20190902/redis.so, 9): image not found), /usr/local/lib/php/pecl/20190902/redis.so.so (dlopen(/usr/local/lib/php/pecl/20190902/redis.so.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lib/php/pecl/20190902/redis.so (dlopen(/usr/local/lib/php/pecl/20190902/redis.so, 9): image not found), /usr/local/lib/php/pecl/20190902/redis.so.so (dlopen(/usr/local/lib/php/pecl/20190902/redis.so.so, 9): image not found)) in Unknown on line 0
downloading redis-5.1.1.tgz ...
Starting to download redis-5.1.1.tgz (245,205 bytes)
...................................................done: 245,205 bytes
25 source files, building
running: phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
enable igbinary serializer support? [no] : yes
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in Builder.php on line 407
PHP Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /usr/local/Cellar/php/7.4.2/share/php/pear/PEAR/Builder.php on line 407
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /usr/local/Cellar/php/7.4.2/share/php/pear/PEAR/Builder.php on line 407
enable lzf compression support? [no] : yes
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in Builder.php on line 407
PHP Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /usr/local/Cellar/php/7.4.2/share/php/pear/PEAR/Builder.php on line 407
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /usr/local/Cellar/php/7.4.2/share/php/pear/PEAR/Builder.php on line 407
enable zstd compression support? [no] : yes
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in Builder.php on line 407
PHP Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /usr/local/Cellar/php/7.4.2/share/php/pear/PEAR/Builder.php on line 407
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /usr/local/Cellar/php/7.4.2/share/php/pear/PEAR/Builder.php on line 407
building in /private/tmp/pear/temp/pear-build-rootLGGBo1/redis-5.1.1
running: /private/tmp/pear/temp/redis/configure --with-php-config=/usr/local/opt/php/bin/php-config --enable-redis-igbinary=yes --enable-redis-lzf=yes --enable-redis-zstd=yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin19.2.0
checking host system type... x86_64-apple-darwin19.2.0
checking target system type... x86_64-apple-darwin19.2.0
checking for PHP prefix... /usr/local/Cellar/php/7.4.2
checking for PHP includes... -I/usr/local/Cellar/php/7.4.2/include/php -I/usr/local/Cellar/php/7.4.2/include/php/main -I/usr/local/Cellar/php/7.4.2/include/php/TSRM -I/usr/local/Cellar/php/7.4.2/include/php/Zend -I/usr/local/Cellar/php/7.4.2/include/php/ext -I/usr/local/Cellar/php/7.4.2/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php/7.4.2/pecl/20190902
checking for PHP installed headers prefix... /usr/local/Cellar/php/7.4.2/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable redis support... yes, shared
checking whether to disable sessions... yes
checking whether to disable json serializer support... yes
checking whether to enable igbinary serializer support... yes
checking whether to enable msgpack serializer support... no
checking whether to enable lzf compression... yes
checking use system liblzf... no
checking whether to enable Zstd compression... yes
checking use system libsztd... yes
checking for json includes... /usr/local/Cellar/php/7.4.2/include/php
checking for redis json support... enabled
checking for igbinary includes... configure: error: Cannot find igbinary.h
ERROR: `/private/tmp/pear/temp/redis/configure --with-php-config=/usr/local/opt/php/bin/php-config --enable-redis-igbinary=yes --enable-redis-lzf=yes --enable-redis-zstd=yes' failed
I also tried before adding extension=redis.so in my php.ini and restart php with brew services restart php :
git clone https://www.github.com/phpredis/phpredis.git
cd phpredis
phpize && ./configure && make && sudo make install
Not works as well... still have the error :
Please make sure the PHP Redis extension is installed and enabled.
@deshiloh I really can't think of any good reason you would necessarily need to run Redis on your machine. You can use a different cache driver and run jobs in sync locally. You really don't need scale protection locally is my point. Using this to "test" is probably useless as you'd just be testing the framework of something you should expect to be working, if that makes sense.
Please or to participate in this conversation.