简体   繁体   中英

Apache can't load PHP extensions on Mojave

After upgrade to MacOS Mojave, Apache can't load PHP extensions anymore. Any extension i get the error below on the Apache log ; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.

Is there any workaround that would not involve to disable MacOS' SIP ?

    Failed loading //usr/local/php/extensions/xdebug.so:  dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found.  Did find:
            //usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.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/extensions/xdebug.so: stat() failed with errno=22

I was having problems with certain video files in my iTunes library that required a third-party audio plugin after I updated Mojave. It was triggering the exact same error message. I eventually found an incredibly easy fix to disable it. https://github.com/mologie/macos-disable-library-validation

I just ran it and everything worked fine, didn't even have to reboot. I would use it at your own risk for security purposes, but hopefully it works!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM