Comments (11)
Hi @fightbulc,
You should really use phpiredis_command_bs
since phpiredis_command
is not safe to use (we should just remove it IMHO). phpiredis_command_bs
accepts an array instead of a string with each command argument being an element of the array:
<?php
$redis = phpiredis_connect("127.0.0.1");
phpiredis_command_bs($redis, array("SET", "user", "Foo bar"));
from phpiredis.
Hi Daniele, thanks for the prompt answer. I've noticed that _bs was working but how could I use then the pipeline feature? I assumed multi_command would do the trick.
cheers
Tino
Tino Ehrich
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, 23. November 2012 at 19:23, Daniele Alessandri wrote:
Hi @fightbulc (https://github.com/fightbulc),
You should really use phpiredis_command_bs since phpiredis_command is not safe to use (we should just remove it IMHO). phpiredis_command_bs accepts an array instead of a string with each command argument being an element of the array:
from phpiredis.
Good catch, there's indeed no way to pipeline commands in a binary-safe way right now. I'll try implementing a phpiredis_multi_command_bs
function this weekend.
from phpiredis.
Nice one! Looking forward.
Cheers
from phpiredis.
Morning nrk,
any success over the weekend?
Cheers from Berlin
from phpiredis.
Heya @fightbulc,
sorry for being late but in the end I didn't have much time last weekend to hack on phpiredis, but anyway now I got phpiredis_multi_command_bs()
implemented in the multi_command_bs branch. If you can give it a try and confirm that everything works I'll merge that branch into master
.
Thanks!
from phpiredis.
Heyho @nrk,
no worries. I will give it a try today and let you know about the outcome.
Really appreciate your taken time.
Thanks!
Cheers
from phpiredis.
@nrk, on my mac installing went smooth.
On my gentoo machine not quite because I got thrown off by test fails.
I simply got failed tests although compilation went find. After a couple
of reinstalls without any effect on the result I assumed that you might
forgot about adjusting the tests. So I ran my application and all
seems to run as expected.
Any idea?
Find below the test summary.
Cheers
Tino
TEST RESULT SUMMARY
Exts skipped : 0
Exts tested : 44
Number of tests : 25 25
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 10 ( 40.0%) ( 40.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 15 ( 60.0%) ( 60.0%)
Time taken : 1 seconds
FAILED TEST SUMMARY
phpiredis connect [tests/001.phpt]
phpiredis command [tests/002.phpt]
phpiredis multicommand [tests/003.phpt]
phpiredis array [tests/004.phpt]
phpiredis multicommand [tests/005.phpt]
phpiredis command binary safe [tests/006.phpt]
phpiredis command binary safe using image [tests/007.phpt]
phpiredis reconnect on disconnect [tests/008.phpt]
phpiredis reconnect on disconnect [tests/009.phpt]
phpiredis multicommand (binary safe) [tests/025.phpt]
from phpiredis.
@fightbulc yeah the failed tests are most likely unrelated, the fact that your failed tests are the ones opening a connection to Redis makes me think that you have something that blocks connections to port 6379 on localhost on your gentoo machine or Redis is bound to a different port than the standard one as I can't really think of a different reason.
I'll merge that branch into master anyway, thanks for the feedback!
from phpiredis.
@nrk, you're right. The server is bound to a different IP.
from phpiredis.
@fightbulc alright thanks for confirming it wasn't a bug or anything :-)
from phpiredis.
Related Issues (20)
- PHP 7 support HOT 1
- Error building against PHP 5.6.8 HOT 11
- The value of phpiredis_command_bs SET must be string? HOT 4
- pls support php7 HOT 16
- Release on PECL HOT 19
- make compile error HOT 2
- PHP: Unable to load dynamic library HOT 8
- make test after make install: phpiredis extension is not available
- make test after make install: phpiredis extension is not available HOT 1
- Compatibility with PHP 7.x HOT 19
- Install ext-phpiredis On Mac El Capitan HOT 1
- [RFE] improve installation doc HOT 2
- PhpiRedis: supplied resource is not a valid phpredis reader HOT 1
- phpiredis for snc_redis HOT 2
- Failed make tests HOT 5
- Docker / Alpine installation (phpiredis.so: redisReplyReaderGetReply: symbol not found) HOT 4
- undefined symbol: redisReplyReaderGetReply in Unknown on line 0 HOT 4
- Extension fails to load when built with hiredis 0.14 on armv7h or x86_64: works on armv6h HOT 3
- Will recent Hiredis upgrades be implemented? HOT 6
- Plan to release 1.1.x HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpiredis.