-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
php 7.1.19 Bug? #1406
Comments
@ServiceYun how did you install phpredis in your system? |
phpize and in branch master come to the same thing |
@ServiceYun did you try homebrew or mackports? |
This looks like some sort of OSX security thing:
I run phpredis on OSX High Sierra and haven't encountered this. I did have to jump through a bunch of hoops to get GDB to function properly, but I'm not sure what the solution would be for a shared object. |
No, I replaced it with docker(php-fpm) for the time being. |
Will the problem lie on PHP version? No error during compilation. |
It seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache. I have the exact same issue when I try to load a custom version of PHP 7.2 (that I got from https://php-osx.liip.ch/).
That custom PHP 7.2 was working fine before I upgraded to Mojave but now I can't load it because of that Library Validation. I even tried to sign the php7 binary with a self-signed certificate but then I got this error instead:
To summarize, Apache will not load the binary unless it passes Apple's Library Validation. If anyone has any idea on how to make it pass that validation, or maybe disable that on Apache as a workaround that would be really helpful for Mojave users :) |
Since Mojave is not officially released yet I was unable to find much information on this new feature of OSX. I did come across this blog which does seem related: The blog mentions running this command: I don't know if this tool is related to library validation but it might be worth a try. I suspect a whole lot more information will become available when Mojave is officially released. |
DevToolsSecurity was already enabled on my system, so unfortunately that didn't change anything. For now as a workaround I was able to load my module into Apache by disabling the System Integrity Protection on my mac. |
i has running |
I'm going to close this issue because it's not really a bug in phpredis but rather an apparent issue with running custom libraries under Mojave. |
try this guys, it works for me https://superuser.com/questions/1363013/apache-cant-load-php-unsigned-extensions-on-mac-os-mojave |
Thanks. |
Thank you. I'm a bit busy today. I will try it tomorrow and reply to you. |
did work for me, any solution??! |
Expected behaviour
Actual behaviour
PHP Startup: Unable to load dynamic library '/usr/local/php/modules/redis.so' - dlopen(/usr/local/php/modules/redis.so, 9): no suitable image found. Did find: /usr/local/php/modules/redis.so: code signature in (/usr/local/php/modules/redis.so) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /usr/local/php/modules/redis.so: stat() failed with errno=1
I'm seeing this behaviour on
Steps to reproduce, backtrace or example script
I've checked
develop
branchThe text was updated successfully, but these errors were encountered: