doudou2121 2016-10-28 07:09 采纳率: 50%
浏览 39
已采纳

Phalcon框架从位桶设置项目到本地xampp

hi i have cloned the project files and i have installed phalcon framework in xampp with version. i can see in php info as phalcon installed.

when i browse the project i overcome with this issue how can i resolve it.

Fatal error: Declaration of Phalcon\Acl\Adapter\Database::allow($roleName, $resourceName, $access) must be compatible with Phalcon\Acl\AdapterInterface::allow($roleName, $resourceName, $access, $func = NULL) in C:\xampp\htdocs\uvix1\uvix.co\common\incubator\Library\Phalcon\Acl\Adapter\Database.php on line 33

This my database.php code:

<?php
    namespace Phalcon\Acl\Adapter;

    use Phalcon\Db;
    use Phalcon\Acl\Adapter;
    use Phalcon\Acl\AdapterInterface;
    use Phalcon\Acl\Exception;
    use Phalcon\Acl\Resource;
    use Phalcon\Acl;
    use Phalcon\Acl\Role;
    class Database extends Adapter implements AdapterInterface //this is line 33
    {
        protected $options;
  • 写回答

1条回答 默认 最新

  • doulin3510 2016-10-28 09:16
    关注

    Your code in database.php is from Phalcon v2. And you are working with Phalcon v3 on your XAMPP setup.
    v2 and v3 have lots of API changes and the errors your are getting are because of this.

    You have 2 options here.

    1. Lots of work: Upgrade all of your code to make it Phalcon v3 compatible. And upgrade your Phalcon version on your production environment to Phalcon v3.

    2. Easier fix: Downgrade your Phalcon version on your XAMPP to Phalcon v2.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 想问问富文本拿到的html怎么转成docx的
  • ¥15 我看了您的文章,遇到了个问题。
  • ¥15 GitHubssh虚拟机连接不上
  • ¥15 装完kali之后下载Google输入法 重启电脑后出现以下状况 且退不出去 桌面消失 反复重启没用
  • ¥15 ESP-IDP-BLE配网连接wifi
  • ¥15 ue2.6.12版本用的若以,安装gojs,引入import * as go from 'gojs';报错
  • ¥15 服务器上的网站安装php5.6版本
  • ¥15 ModuleNotFoundError: No module named 'torch.utils._import_utils' 是缺少什么
  • ¥15 请大咖一起探索iptv 直播源的hls通过反向代理解密
  • ¥100 寻找技术员 云闪付tn转h5输入卡号付款的链接 重酬!