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

Is there a "php_reds.dll" for php-5.4.4 on windows ? #213

Closed
samurai00 opened this issue Jul 12, 2012 · 38 comments
Closed

Is there a "php_reds.dll" for php-5.4.4 on windows ? #213

samurai00 opened this issue Jul 12, 2012 · 38 comments

Comments

@samurai00
Copy link

The "php_redis.dll" for 5.3 doesn't work with php5.4 on windows.

@yiriguyue
Copy link

maybe the 'php_redis.dll' for php5.4 is not coming.

@yiriguyue
Copy link

i want to know when it is coming ?

@michael-grunder
Copy link
Member

There isn't an official windows build, but I think @char101 has built a few. He may be able to get one for 5.4.4 working :)

@char101
Copy link
Contributor

char101 commented Sep 30, 2012

@nicolasff
Copy link
Member

@char101 Great, thanks a lot!

@CeBotics
Copy link

@char101, the windows download links in this thread no longer work. Can the windows php extensions be found anywhere else? Or is there a way I can build them myself? Thanks.

@char101
Copy link
Contributor

char101 commented Dec 14, 2012

@CeBotics

How to compile phpredis

  1. Install visual studio 2008 (express or professional). If using visual studio 2008 express, also install the latest windows SDK.
  2. Download PHP source code
  3. Extract to C:\php\php-5.4.9
  4. Download http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip and extract to C:\php
  5. In cmd.exe
    • cd C:\php\php-5.4.9\ext
    • git clone https://github.com/nicolasff/phpredis.git
    • cd ..
    • buildconf.js
    • "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv" /x86 /xp /release
    • path "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin";%PATH%
    • bin\phpsdk_setvars.bat
    • "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
    • configure.js --disable-all --enable-cli --enable-redis --enable-redis-session (if building the nts version, also add --disable-zts)
    • nmake php_redis.dll
    • fix any compilation errors

For more information check https://wiki.php.net/internals/windows/stepbystepbuild

@michael-grunder
Copy link
Member

That's a fantastic explanation as always @char101.

@nicolasff, What do you think about adding this to the general phpredis documentation? I'm not sure how many users are running in a Windows environment, but it does come up every so often.

@nicolasff
Copy link
Member

@michael-grunder totally agree, this is a great tutorial. I'll add it to the README.

@matish
Copy link

matish commented Jan 22, 2013

It would be nice, if there would be a list of changes made, to get this project to compile on Windows.
I managed to get the php_igbinary.dll to compile, but I have not gotten any luck with php_redis.
For example I am currently stuck with this error:

d:\php-src\ext\phpredis\php_redis.h(192) : error C2016: C requires that a struct or union has at least one member
d:\php-src\ext\phpredis\library.h(36) : error C2081: 'tsrm_ls' : name in formal parameter list illegal

Code on the line looks like the following:

ZEND_BEGIN_MODULE_GLOBALS(redis)
ZEND_END_MODULE_GLOBALS(redis) //this is line 192, notice there is no ; mark here.....

struct redis_queued_item {

/* reading function */
zval * (*fun)(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, ...);

char *cmd; 
int cmd_len;

struct redis_queued_item *next;

};

I have done quite a few changes to a file, for example config.w32 was not correct, then the library.c did not incluce windows specific headers.
I have almost zero experience with C++ and I am not 100% sure if the headers placed are even correct.
@char101 If you managed to get phpredis to compile under windows, I would appreciate a lot, if you could send me the resulting phpredis source.

@ImmRanneft
Copy link

@char101 Hi. Im trying to compile php_redis under windows, and only I can see - NMAKE : fatal error U1073: dont know how to make php_redis.dll.
Would you be so kind to explain me on the few fingers - where to look and how to force it work.
However you can give me the compiled dll. There is no sense to using already builded dll from github. Igbinary loading into my php, and php_redis - no.
I`ve tested it few times (thought that archive is broken, or i forgot about extension= or something else).

@tamaspap
Copy link

Dll's and instructions here:
http://char101.github.io/phpredis/

@ghost
Copy link

ghost commented Jul 27, 2013

can you try compiling it for version 5.5

@freewhat
Copy link

I user ZendServer and the PHP Version is 5.3.9-ZS5.6.0,I download http://char101.github.io/phpredis/ 5.3 and 5.4,all are fail,who knows why? I do not want use the visual studio to make it myself;

@Neval
Copy link

Neval commented Aug 21, 2013

@char101, update pls link to download php_igbinary-5.3-vs9-ts-c35d48.dll on your site. Thx!

@ScottLeonard
Copy link

I'd be very interested in a 5.5 version also.

@char101
Copy link
Contributor

char101 commented Aug 25, 2013

I will compile it when phpredis source can be compiled with the visual studio compiler. I currently have no motivation in fixing the source to compile with the VS compiler since I do not run php on windows anymore.

@michael-grunder
Copy link
Member

@char101 Would it help if I got #321 into the repo? I would have to make sure that it also continues to compile in nix systems, but it looks like it should be OK.

@hajo-p
Copy link

hajo-p commented Jan 18, 2014

there is an official download mirror for php windows pecl builds, but i can't find phpredis there:

http://windows.php.net/downloads/pecl/releases

maybe the authors of this github project can ask pierre or someone else from the php team to upload the current versions there from time to time. i don't think there is need for everyone to build them by oneself, that's what generic dlls are for: sharing across windows systems

the ones provided by char101 seem outdated and seem to not work with 5.5 and the current 5.6-alpha

@ghost
Copy link

ghost commented Jan 18, 2014

@hajo-p check the snaps folder it should be there

@hajo-p
Copy link

hajo-p commented Jan 18, 2014

you are right, thanks alot. i've just looked for releases :)

http://windows.php.net/downloads/pecl/snaps/redis

update: igbinary is not bundled, but required and can be obtained there, too

http://windows.php.net/downloads/pecl/releases/igbinary

2nd update: igbinary from there is not working due to a missing serialize entry, seems the one provided by char101 is still required to make it work

http://char101.github.io/phpredis

@DaAwesomeP
Copy link

Is it possible to get this to work with PHP 5.5 without Visual Studio (FOR FREE)?

Windows 8 Pro 32-bit

@hajo-p
Copy link

hajo-p commented Feb 19, 2014

have you read my comment above yours? you need the redis extension from windows.php.net and the igbinary from there or char101. i can confirm that it works with the later igbinary dll on php 5.4. you could try it with both igbinary sources for php 5.5, maybe one of them works for you, too.

@barth-zalewski
Copy link

The webpage http://char101.github.io/phpredis/ is great, the libraries work. Thank you!

@guysoft
Copy link

guysoft commented Apr 7, 2014

Strange,
When I build for php 5.5.7, and i supply --enable-fileinfo=shared as well, I get:

fileinfo.obj : error LNK2001: unresolved external symbol _file_globals

Same goes for GD with --with-gd:

   Creating library Release\php_gd2.lib and object Release\php_gd2.exp
gd.obj : error LNK2001: unresolved external symbol _php_sig_gif
gd.obj : error LNK2001: unresolved external symbol _php_sig_png
gd.obj : error LNK2001: unresolved external symbol _php_sig_jpg
gd.obj : error LNK2001: unresolved external symbol _php_stream_stdio_ops
Release\php_gd2.dll : fatal error LNK1120: 4 unresolved externals

@Jan-E
Copy link
Contributor

Jan-E commented Apr 16, 2014

@guysoft Did you try that with Vostok's sources? I used those sources with this one as latest commit:
f0ff886f@566d673

It compiles fine in all 16 flavours of PHP, I regularly build. PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6 (beta1), all TS or NTS, all x86 or x64. Kudos to @vostok4 !

@Jan-E
Copy link
Contributor

Jan-E commented Apr 18, 2014

Can somebody check if SERIALIZER_IGBINARY works in the php_redis.dll's in my latest PHP 5.5 builds:
http://phpdev.toolsforresearch.com/php-5.5.11-nts-Win32-VC11-x86.zip
http://phpdev.toolsforresearch.com/php-5.5.11-Win32-VC11-x86.zip
I patched Vostok's source a little bit...

Jan-E referenced this issue in f0ff886f/phpredis Apr 18, 2014
This brings the W32 compilation fixes done by @char101 up to date and
allows building of php_redis.dll with VC11 on Win32 (allows for a php5.5
version).
@rstarkov
Copy link

The v5.5 download from http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/ worked fine for me without the igbinary dependency. It appears that igbinary is no longer required.

@tcarlyle
Copy link

@rstarkov Sorry if Im asking a silly question, Im new to redis and to some extent to php =D But do the php_redis-2.2.4-5.5-ts-vc11-x64.zip means that I should get a windows port of redis 2.2.4; and php 5.5.x? If so, is there a binary of the redis 2.2.4 (64bit) for windows? If I can avoid, Id rather not install Visual Studio and compile it

@rstarkov
Copy link

@tcarlyle I think 2.2.4 is the version of php_redis, not Redis itself. So you should be fine with just PHP 5.5 and the latest Redis release for Windows.

@tcarlyle
Copy link

@rstarkov It didnt work here.

I have here a 64bit WAMP with php 5.5.12 and apache 2.4.9, while running the 2.8.17 windows redis release. I've donwloaded the php_redis-2.2.5-5.5-ts-vc11-x64.zip, extracted the php_redis.dll to my ext folder and added it to my php.ini file ( by including "extension=php_redis.dll").

However, when I restart the WAMP, the WAMP monitor shows that there was a problem loading the php_redis.dll, and I can confirm that by a simple php test file and getting a " Class 'Redis' not found" error.

Any idea of what could be wrong? I cant find anything on the php_error.log

Btw, which set-up do you have over there?

@rstarkov
Copy link

@tcarlyle IIS 7.5, PHP 5.5.17 (32-bit, NTS), Redis 2.8.17, php_redis 2.2.5 (32-bit, NTS). No specific tips about what could be wrong with your setup. It wasn't easy to find a php_redis that worked for me; most things I tried logged something about being unable to load php_redis to the PHP error log. One problem I recall was downloading the wrong php_redis zip by misreading all those 5's!

@tcarlyle
Copy link

@rstarkov Are you using the 64 binary of the redis distributed in https://github.com/MSOpenTech/redis/tree/2.8/bin/release or did you compile it yourself as a 32 bit binary? I just downloaded a WAMP 32 bit and the same php_redis as you, but using a 64 bit redis and no luck =S

@Jan-E
Copy link
Contributor

Jan-E commented Oct 23, 2014

Try my PHP-builds: http://www.apachelounge.com/viewtopic.php?t=6123
The phpinfo.htm inside those builds will tell you that php_redis.dll loads (together with php_igbinary.dll).

@huwanlong
Copy link

hello,my php version is 5.4.3,How to do?tks

@huwanlong
Copy link

my try some file,but doesn't work

@bhargav960143
Copy link

bhargav960143 commented Nov 26, 2019

@CeBotics

How to compile phpredis

  1. Install visual studio 2008 (express or professional). If using visual studio 2008 express, also install the latest windows SDK.

  2. Download PHP source code

  3. Extract to C:\php\php-5.4.9

  4. Download http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip and extract to C:\php

  5. In cmd.exe

    • cd C:\php\php-5.4.9\ext
    • git clone https://github.com/nicolasff/phpredis.git
    • cd ..
    • buildconf.js
    • "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv" /x86 /xp /release
    • path "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin";%PATH%
    • bin\phpsdk_setvars.bat
    • "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
    • configure.js --disable-all --enable-cli --enable-redis --enable-redis-session (if building the nts version, also add --disable-zts)
    • nmake php_redis.dll
    • fix any compilation errors

For more information check https://wiki.php.net/internals/windows/stepbystepbuild

@char101 where is (buildconf.js)?

@mmojadad
Copy link

@CeBotics

How to compile phpredis

1. Install visual studio 2008 (express or professional). If using visual studio 2008 express, also install the latest windows SDK.

2. Download PHP source code

3. Extract to C:\php\php-5.4.9

4. Download http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip and extract to C:\php

5. In cmd.exe
   
   * cd C:\php\php-5.4.9\ext
   * git clone https://github.com/nicolasff/phpredis.git
   * cd ..
   * buildconf.js
   * "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv" /x86 /xp /release
   * path "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin";%PATH%
   * bin\phpsdk_setvars.bat
   * "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
   * configure.js --disable-all --enable-cli --enable-redis --enable-redis-session (if building the nts version, also add --disable-zts)
   * nmake php_redis.dll
   * fix any compilation errors

For more information check https://wiki.php.net/internals/windows/stepbystepbuild

Please provide update for PHP 7.4

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