Redis on Windows (Predis PHPredis)

I’m exploring the possibilities of using Redis as a session manager which seems to have turned into a bit of a pandoras box. I’m currently using windows 7 environment for Dev and downloaded/installed Redis MS Open Tech version 2.8. I’ve tested it to ensure its working and from Redis Client the PING receives the obligatory PONG response so all is well. However, reading on the web it appears that I also need PHPredis or Predis before I can actually start exploring further. I’ve tried installing Predis but to no avail… but I’ll stop my rant right now and ask the question:
Is there anywhere that has up to date information on what needs to be installed and how it needs to be installed so that I can actually start working with above apps and PHP session…

Many thanks in advance
Old and frustrated

Can you be more specific in regards to errors you’re running into and also your local development set-up.

@oddz Thanks for prompt reply
Local dev setup is a Wind 7, PHP 5.3.29, IIS7 – Redis 2.8 from MS Open Tech
The error I’me getting when trying to run a simple PHP test script

require (“predis/autoload.php”);
PredisAutoloader::register();

Class ‘Autoloader’ not found

Part of my frustration is there are few places to glean information from and the few places that exist are either Ubuntu replated or out of date…

Not directly helping, but I see two things where you could improve your dev environment.

PHP5.3 - is outdated and unsupported. You should be using PHP5.5 or better!

Use Linux as a dev environment -A smart dev some time ago showed me development with Virtualbox.

https://www.virtualbox.org/

You should try creating a virtual machine with Virtualbox and use it to run/ serve your development work. Here is an article on how to go about it.

As you might have noticed, once you do develop for a Linux machine (which is the standard), you will find a loooooot more help on the Internet. :smile:

Scott

@s_molinari…Sadly and inspite of my constant haranguing my current host provider has 5.4 so I’m kind of stumped. I did actually think about Linux but ther’es the accosiated learning curve with that too…

Thanks for the helpful suggestions though… I just wished there was more out there on Predis or phpredis… sadly not

In the meantime I’ve stumped up a standard PHP session manager that works reasonably well…

I would second using a vm since installing open source technologies is so much easier on linux. Not to mention much documentation exists in the context of linux than windows for *most open source technologies. A vm really isn’t all that difficult to set-up with tools such as puphpet.com.

The answer to that is easy (to say). Change hosts.:smile:

This is true, but believe me, you’ll be more successful with your development, if you learn to work with a Linux VM. And even more importantly, developing for/ with Linux is actually more professional. 67.5% of the websites today are powered by Linux/Unix.

Scott

@s_molinari
My hosts are almost certainly runing Linux and CPanel( which is good)… but I’m digressing…
So I’ve found, I think, the answer to the problem and it’s down to a ''. Yes that’s right a solitary backslash

The script that so many, many people are using for tutotials is:
$redis = new PredisClient();
As in here:

Where, when you look on the Predis quick tour https://github.com/nrk/predis/wiki/Quick-tour it reads:-
$redis = new Predis\Client();

Is this one of those " Ah yeh, everyone knows about that" moments…?
It’s very very early days yet, but at least I’m not getting the error in the first six lines of a very straightforward script…
Wish me luck … I’m going in…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.