I've been trying to install Phalcon 3.4 on my xampp PHP 7.3 setup (Macbook Pro 16 M1 Pro chip). Following I've tried:
Tried with macports, but it is installing the file in /opt/local/lib/php73/extensions/no-debug-non-zts-20180731/phalcon.so, so I'm trying to copy this file to the xamppfiles/lib/php/extensions folder. But in the php_error_log file saying arm chip not supported by x86_64 file. Error log file:
[30-Oct-2021 15:34:16 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so' (tried: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so, 0x0009): tried: '/Applications/XAMPP/xamppfiles/lib/phalcon.so' (no such file), '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/phalcon.so' (no such file), '/usr/lib/phalcon.so' (no such file)), /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731//Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731//Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20180731/phalcon.so.so, 0x0009): tried: '/Applica in Unknown on line 0
The error message(have 'arm64', need 'x86_64')
indicates thatxampp
is a x86_64 app, butphp73-phalcon3
installed from macport is of arm64. You could try to download x86 version ofphp73-phalcon3
. uncompress and copyphalcon.so
to your xampp extension directory.
As of now Phalcon < 3.* is not supported by the the arm64-based chips. Phalcon > 4.* is supporting arm64-based chips.
My solution to the problem was to deploy a docker ubuntu image and run the project until we don't upgrade to newer version of Phalcon. This is working fine after almost 30h+ in already.
You'll probably need to go the Docker route: https://github.com/MilesChou/docker-phalcon
I've done this on a M1 Pro and it works.
Might be able to use https://www.vagrantup.com/ as well, but I haven't tried that on M1. It's worked well in the past though.
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Phalcon is a special PHP framework, the source code of which is written in C. It may seem strange, but thanks to this approach, this framework can be called the fastest project of its kind. Working with this framework does not mean you need to have C development experience. A programmer choosing Phalcon can only deal with PHP classes and namespaces generated by the framework.
https://phalcon.io/en-us
HTML (English "hyper text markup language" - hypertext markup language) is a special markup language that is used to create sites on the Internet.
Browsers understand html perfectly and can interpret it in an understandable way. In general, any page on the site is html-code, which the browser translates into a user-friendly form. By the way, the code of any page is available to everyone.
https://www.w3.org/html/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.