繁体   English   中英

Magento 2 多个错误的网站(HTTP 错误 500、PHP 警告等)无法使其再次运行

[英]Magento 2 website with multiple errors (HTTP Error 500, PHP Warning, among others) can't make it work again

我们目前有一个本地托管的 Magento 测试站点,前一段时间它工作正常,但在做了一些更改后它停止工作并不断显示 HTTP 错误 500。我是 Magento 和 Linux 的新手(我们在这里使用 Gentoo Linux 机器)和我尝试尽可能多地进行研究,测试不同的解决方案,但问题仍然存在,而且每次我尝试解决问题时我的想法都会变得更糟。

我现在在终端内遇到的问题是与“要求”function 相关的 PHP 警告和 PHP 致命错误。每次我尝试做一些关于 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"
    }
}

任何帮助将不胜感激,我现在非常迷茫并陷入困境,不知道如何解决这个问题。

提前致谢。

也许从扩展 ebizmarts/sagepaysuite 发出,你可以在这个扩展中检查文件 composer.json。 在文件 composer.json 中,您可以看到此扩展的标签“require”php 版本。

=> 您可以删除此扩展程序或升级您的 php 版本。

祝你今天过得愉快 !

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM