问题描述
我正在尝试在xampp上安装phalcon或在macOS上安装MAMP
I'm trying to install phalcon on xampp or MAMP on macOS
请告诉我如何在MAMP上正确安装Phalcon(在XAMPP上安装时会出现相同的错误)
please tell me how to install correctly phalcon on MAMP(I get the same errors during installation on XAMPP)
我使用本教程 https://madebyextreme.com/insights/how-to-install-phalcon-php-framework-with-mamp-on-osx
请帮帮我!我使用的是PHP 7.3.7
please, help me! I use php 7.3.7
错误:
./install: line 133: aclocal: command not found
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
appending configuration tag "CXX" to libtool
mkdir .libs
gcc -I. -I/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits -DPHP_ATOM_INC -I/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/include -I/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/main -I/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -mtune=native -O2 -fomit-frame-pointer -c /Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c -fno-common -DPIC -o .libs/phalcon.o
In file included from /Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:52:
./phalcon.zep.h:5760:47: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_ARG_OBJ_INFO(0, uri, Psr\\Http\\Message\\UriInterface, 0)
^
./phalcon.zep.h:10328:47: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_ARG_OBJ_INFO(0, uri, Psr\\Http\\Message\\UriInterface, 0)
^
./phalcon.zep.h:10341:122: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
...0, 1, Psr\\Http\\Message\\UriInterface, 0)
^
./phalcon.zep.h:19544:100: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_urlinterface_setbasepath, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:19544:105: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_urlinterface_setbasepath, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:19556:99: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_urlinterface_setbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:19556:104: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_urlinterface_setbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:30753:139: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
...0, 1, Phalcon\\Http\\Message\\UploadedFile, 0)
^
./phalcon.zep.h:30815:129: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
...0, 2, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31150:134: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
...0, 1, Psr\\Http\\Message\\UploadedFileInterface, 0)
^
./phalcon.zep.h:31241:116: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withfragment, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31249:112: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withpath, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31257:112: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withport, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31265:113: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withquery, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31273:114: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withscheme, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31281:116: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withuserinfo, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31290:112: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_uri_withhost, 0, 1, Phalcon\\Http\\Message\\Uri, 0)
^
./phalcon.zep.h:31422:116: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_http_message_urifactory_createuri, 0, 0, Psr\\Http\\Message\\UriIn...
^
./phalcon.zep.h:45839:89: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_tag_geturlservice, 0, 0, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:45839:94: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_tag_geturlservice, 0, 0, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:47203:87: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setbasepath, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:47203:92: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setbasepath, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:47215:86: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:47215:91: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:47227:92: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setstaticbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
./phalcon.zep.h:47227:97: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_url_setstaticbaseuri, 0, 1, Phalcon\\Url\\UrlInterface, 0)
^
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:8282:9: warning: nonnull parameter 'ce' will
evaluate to 'true' on first encounter [-Wpointer-bool-conversion]
while (ce) {
~~~~~ ^~
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:3061:83: note: declared 'nonnull' here
static int zephir_has_constructor_ce(const zend_class_entry *ce) ZEPHIR_ATTR_PURE ZEPHIR_ATTR_NONNULL;
^
./php_phalcon.h:73:45: note: expanded from macro 'ZEPHIR_ATTR_NONNULL'
# define ZEPHIR_ATTR_NONNULL __attribute__((nonnull))
^
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:12759:74: warning: format specifies type 'long'
but the argument has type 'zend_long' (aka 'long long') [-Wformat]
php_error_docref(NULL, E_WARNING, "max(%ld) is smaller than min(%ld)", max, min);
~~~ ^~~
%lld
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:12759:79: warning: format specifies type 'long'
but the argument has type 'zend_long' (aka 'long long') [-Wformat]
php_error_docref(NULL, E_WARNING, "max(%ld) is smaller than min(%ld)", max, min);
~~~ ^~~
%lld
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140546:35: warning: \U used with no following hex
digits; treating as '\' followed by identifier [-Wunicode]
ZEPHIR_REGISTER_CLASS_EX(Phalcon\\Url, Exception, phalcon, url_exception, phalcon_exception_ce, NULL, 0);
^
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140564:36: warning: \U used with no following hex
digits; treating as '\' followed by identifier [-Wunicode]
ZEPHIR_REGISTER_INTERFACE(Phalcon\\Url, UrlInterface, phalcon, url_urlinterface, phalcon_url_urlinterface_method_entry);
^
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140757:65: warning: incompatible pointer types
passing 'zend_ulong *' (aka 'unsigned long long *') to parameter of type 'unsigned long *' [-Wincompatible-pointer-types]
...replace = phalcon_replace_marker(1, paths, replacements, &position, cursor, marker);
^~~~~~~~~
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140625:89: note: passing argument to parameter
'position' here
zval *phalcon_replace_marker(int named, zval *paths, zval *replacements, unsigned long *position, char *cursor, char *marker)
^
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140791:65: warning: incompatible pointer types
passing 'zend_ulong *' (aka 'unsigned long long *') to parameter of type 'unsigned long *' [-Wincompatible-pointer-types]
...replace = phalcon_replace_marker(0, paths, replacements, &position, cursor, marker);
^~~~~~~~~
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140625:89: note: passing argument to parameter
'position' here
zval *phalcon_replace_marker(int named, zval *paths, zval *replacements, unsigned long *position, char *cursor, char *marker)
^
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140817:64: warning: incompatible pointer types
passing 'zend_ulong *' (aka 'unsigned long long *') to parameter of type 'unsigned long *' [-Wincompatible-pointer-types]
replace = phalcon_replace_marker(0, paths, replacements, &position, curso...
^~~~~~~~~
/Applications/XAMPP/xamppfiles/htdocs/cphalcon/build/php7/64bits/phalcon.zep.c:140625:89: note: passing argument to parameter
'position' here
zval *phalcon_replace_marker(int named, zval *paths, zval *replacements, unsigned long *position, char *cursor, char *marker)
推荐答案
从4.0.0版开始,Phalcon需要PSR扩展名.可以从此GitHub存储库下载和编译该扩展.存储库的 README
文件中提供了安装说明.扩展名被编译并在系统中可用后,您需要将其加载到您的 php.ini
中.您将需要添加以下行:
Since version 4.0.0 Phalcon requires the PSR extension. The extension can be downloaded and compiled from this GitHub repository. Installation instructions are available on the README
file of the repository. Once the extension has been compiled and is available in your system, you will need to load it to your php.ini
. You will need to add this line:
extension=psr.so
之前
extension=phalcon.so
或者,某些发行版在ini文件上添加了数字前缀.如果是这种情况,请为Phalcon选择一个较高的数字(例如 50-phalcon.ini
和 20-psr.ini
).
Alternatively some distributions add a number prefix on ini files. If that is the case, choose a high number for Phalcon (e.g. 50-phalcon.ini
and 20-psr.ini
).
这篇关于MAMP上的安装错误phalcon或macOS上的XAMPP安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!