Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis Handler Fails #1079

Closed
rumentab opened this issue Jun 22, 2018 · 3 comments
Closed

Redis Handler Fails #1079

rumentab opened this issue Jun 22, 2018 · 3 comments

Comments

@rumentab
Copy link

The RedisHandler Fails.
Needs to be changed the use CriticalError statement and the configs merge in the constructor.

line 38: use CodeIgniter\Exceptions\CriticalError;
line 80: $this->config = array_merge($this->config, $config['redis']);

@lonnieezell
Copy link
Member

"It fails" is not enough detail for us to debug :)

What code are you using, and what error, if any, is it giving?

Is this for Cache or Session?

@rumentab
Copy link
Author

rumentab commented Jun 23, 2018

Sorry for the short description, didn't have much time. What i did:
Pulled the project from the repo, develop branch. Changed the settings. Wanted to use Redis for caching. So I placed my config data in the Cache.php file in application/Config folder. Run the project and the first that showed up was an error Class Codeigniter\CriticalError not found.

Opened the system/Cache/Handlers/RedisHandler.php file and replaced on line 38

use CodeIgniter\CriticalError;

with

use CodeIgniter\Exceptions\CriticalError;

This fixed this error.

The next was the Welcome App always showed me the error - cannot connect to redis server. Target machine actively refused the connection. Dumped the config data and saw that the host I placed in config was not used, but it tried on the localhost. And I just replaced on line 80:

$this->config = array_merge($this->config, $config);

with

$this->config = array_merge($this->config, $config['redis']);

And it worked.
Thanks guys for your great job. I'm a huge CI fan and looking forward for CI4 stable release.
If there's something I could help with, please don't hesitate to contact me.

@lonnieezell
Copy link
Member

Thanks for the detailed response! I've implemented the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants