简体   繁体   中英

How to fix PHP Warning: PHP Startup: Unable to load dynamic library 'xxx/xxx/yaf.so'?

[26-Nov-2021 21:49:17 Asia/Shanghai] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' - dlopen(/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so, 0x0009): tried: '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/yaf.so' (no such file) in Unknown on line 0

You are loading the incorrect version for your PHP Version. if this is Yet Another Framework You can only use this on the version of PHP is created for. for example if your PHP Version is 5.3 You would need a yaf.so to match PHP 5.3

Looking on there GIT this is a 5.2 build, so your PHP Version needs to match this.

Personally i would ditch the 5.3 you are running and install 7.0. 5.3 is very dated, pointless developing anything based on this.

When you have the right version, Place this inside your ext folder in PHP. Edit your PHP.ini file add in:

extension=yaf.so

Ensure your extension_dir is configured correctly too:

extension_dir = "ext"

your yaf should be in the same folder as the extension dir, just ensure extension is built for the PHP version you are using, they are not cross compatible

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