Magento 2网站有多个错误(HTTP错误500,PHP警告,等等)不能让它再次工作

uurv41yg  于 2022-11-12  发布在  PHP
关注(0)|答案(1)|浏览(164)

我们目前有一个本地托管的Magento测试站点,一段时间前它工作正常,但做了一些更改后,它停止工作,并不断显示HTTP错误500。我是新的Magento和Linux(我们这里使用的是Gentoo Linux机器),我尽可能多地进行研究,测试不同的解决方案,但是问题仍然存在,每次我试图解决一些问题时,我的想法都会变得更糟。
我现在在终端中遇到的问题是一个PHP警告和PHP致命错误,与“require”函数有关。每次我试图对Magento做一些事情时,我都会遇到这个错误(例如,如果我运行'php bin/magento --version'我有这个错误,等等与Magento相关的每个命令).据我所知,当你试图调用一个不存在或不存在的文件时,就会发生这个问题。在我的例子中,问题似乎与Sage Pay扩展有关。这是我在终端中看到的警告:

PHP Warning:  require(/var/www/localhost/htdocs/vendor/composer/../ebizmarts/sagepaysuite/registration.php): failed to open stream: No such file or directory in /var/www/localhost/htdocs/vendor/composer/autoload_real.php on line 73
PHP Fatal error:  require(): Failed opening required '/var/www/localhost/htdocs/vendor/composer/../ebizmarts/sagepaysuite/registration.php' (include_path='/var/www/localhost/htdocs/vendor/magento/zendframework1/library:.:/usr/share/php7:/usr/share/php') in /var/www/localhost/htdocs/vendor/composer/autoload_real.php on line 73

考虑到这可能与扩展本身由于某种原因而丢失有关,当我尝试安装扩展时,我遇到了以下错误:

Installation failed, reverting ./composer.json to its original content.

    [RuntimeException]                                                           
  Failed to execute git clone --no-checkout -- 'https://MHuYqyU63hS4dojaex1J:  

***@gitlab.ebizmarts.com/ebizmarts/magento2-sage-pay-suite.git' '/var/www/l  

  ocalhost/htdocs/vendor/ebizmarts/sagepaysuite' && cd '/var/www/localhost/ht  
  docs/vendor/ebizmarts/sagepaysuite' && git remote add composer -- 'https://  
  MHuYqyU63hS4dojaex1J:***@gitlab.ebizmarts.com/ebizmarts/magento2-sage-pay-s  
  uite.git' && git fetch composer && git remote set-url origin -- 'https://gi  
  tlab.ebizmarts.com/ebizmarts/magento2-sage-pay-suite.git' && git remote set  
  -url composer -- 'https://gitlab.ebizmarts.com/ebizmarts/magento2-sage-pay-  
  suite.git'                                                                   

  Cloning into '/var/www/localhost/htdocs/vendor/ebizmarts/sagepaysuite'...    
  remote: HTTP Basic: Access denied                                            
  fatal: Authentication failed for 'https://gitlab.ebizmarts.com/ebizmarts/ma  
  gento2-sage-pay-suite.git/'

同样,当我试图更新Composer时,我遇到了与Sage Pay相关的相同错误,更新被中止。
我们当前的composer.json文件如下所示:

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "require": {
        "absolute_design/absolute-slider": "^2.0.0",
        "bitware/speedenginedeferjs": "^1.0",
        "ebizmarts/sagepaysuite": "~1.3",
        "magefan/module-wysiwyg-advanced": "^2.0",
        "magento/data-migration-tool": "~2.3",
        "magento/product-community-edition": "~2.3.7-p1",
        "mageplaza/magento-2-english-united-kingdom-language-pack": "dev-master",
        "mageplaza/magento-2-seo-extension": "^2.1",
        "mageplaza/module-ajax-layered-navigation": "^1.0",
        "mageplaza/module-delete-orders": "^1.2",
        "mageplaza/module-gdpr": "^1.2",
        "mageplaza/module-sitemap": "^1.0",
        "olegkoval/magento2-regenerate-url-rewrites": "^1.5",
        "trustpilot/module-reviews": "^2.6"
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.2.0",
        "friendsofphp/php-cs-fixer": "~2.14.0",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "~3.0.0",
        "magento/magento2-functional-testing-framework": "2.4.5",
        "pdepend/pdepend": "2.5.2",
        "phpmd/phpmd": "@stable",
        "phpunit/phpunit": "~6.5.0",
        "sebastian/phpcpd": "~3.0.0",
        "squizlabs/php_codesniffer": "~3.4.0"
    },
    "conflict": {
        "gene/bluefoot": "*"
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": [
                "app/code/",
                "generated/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "version": "2.3.0",
    "minimum-stability": "stable",
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "magento": {
            "type": "composer",
            "url": "https://repo.magento.com"
        },
        "ebizmarts": {
            "type": "composer",
            "url": "https://packages.ebizmarts.com"
        }
    },
    "extra": {
        "magento-force": "override"
    }
}

任何帮助都将不胜感激,我现在非常迷失和卡住,不知道如何解决这个问题。
先谢谢你。

6qfn3psc

6qfn3psc1#

也许从扩展ebizmarts/sagepaysuite的问题,你可以检查文件composer.json在这个扩展.在文件composer.json,你可以看到标签“需要”php版本为这个扩展.
=〉你可以删除这个扩展或者升级你的php版本。
祝你今天愉快!

相关问题