不推荐使用的错误:将站点 magento 1.9 服务器传输到本地主机时不推荐使用 __autoload()
error Deprecated: __autoload() is deprecated when transfer site magento 1.9 server to localhost
这几天我都快疯了。我在我的电脑上安装了 Windows Xampp 并复制了我的网站(FTP 中的整个文件夹)和 htdocs 文件夹中的数据库。
此外,文件C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\Layout.php
并不存在,只有Data
、element
和update
三个文件。
我试过使用 spl_autoload_register() 代替,但它不起作用。
有人知道哪里出了问题吗?
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in C:\xampp\htdocs\mysite\app\code\core\Mage\Core\functions.php on line 60
Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\Layout.php:555 Stack trace:
#0 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#1 C:\xampp\htdocs\mysite\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#2 C:\xampp\htdocs\mysite\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#3 C:\xampp\htdocs\mysite\app\code\core\Mage\Cms\controllers\IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#4 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Cms_IndexController->indexAction()
#5 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#6 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Cont in C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\Layout.php on line 555
我猜你在本地主机上使用 php7.2。
该函数已弃用:
https://www.php.net/manual/en/migration72.deprecated.php
您应该在本地将 Magento 1.9 的 PHP 版本更改为 5.6(除非您已将其升级为使用 7.0)
尝试使用与实际网站相同的 PHP 版本。
send the support notice 网站在本地可以正常运行,但是需要进入后台管理页面输入用户名和密码重新加载页面但是进不去。 (如果我写错了,他说他们错了)...我看了表格但也更新了cookies 没有改变的情况,不是来自任何错误。
这几天我都快疯了。我在我的电脑上安装了 Windows Xampp 并复制了我的网站(FTP 中的整个文件夹)和 htdocs 文件夹中的数据库。
此外,文件C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\Layout.php
并不存在,只有Data
、element
和update
三个文件。
我试过使用 spl_autoload_register() 代替,但它不起作用。
有人知道哪里出了问题吗?
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in C:\xampp\htdocs\mysite\app\code\core\Mage\Core\functions.php on line 60
Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\Layout.php:555 Stack trace:
#0 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#1 C:\xampp\htdocs\mysite\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#2 C:\xampp\htdocs\mysite\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#3 C:\xampp\htdocs\mysite\app\code\core\Mage\Cms\controllers\IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#4 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Cms_IndexController->indexAction()
#5 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#6 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Cont in C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\Layout.php on line 555
我猜你在本地主机上使用 php7.2。
该函数已弃用:
https://www.php.net/manual/en/migration72.deprecated.php
您应该在本地将 Magento 1.9 的 PHP 版本更改为 5.6(除非您已将其升级为使用 7.0)
尝试使用与实际网站相同的 PHP 版本。
send the support notice 网站在本地可以正常运行,但是需要进入后台管理页面输入用户名和密码重新加载页面但是进不去。 (如果我写错了,他说他们错了)...我看了表格但也更新了cookies 没有改变的情况,不是来自任何错误。