phpredis on fedora 12

2020-04-12 10:12发布

问题:

I am trying to install phpredis to work with my php. But the thing is, every time I try to get it to work, my error_log sends this error:

[code]PHP Fatal error: Class 'Redis' not found in /var/www/html/testme.php on line 5[/code]

I have downloaded the source code from http://github.com/owlient/phpredis and then

phpize
./configure
make && make install

but still not working.

What can I do now?

回答1:

specifically, created a redis.ini:

$ cat /etc/php5/apache2/conf.d/redis.ini 
;configure the redis module
extension=redis.so

I filed a github issue, hopefully they'll make it create the ini automatically, or at least explain in the install instructions: https://github.com/owlient/phpredis/issues/94



回答2:

I got it to work.

I had to give the full path in php.ini, restarted httpd and voila it works :D



标签: php redis