Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
显示错误页面时出错:应用程序实例化错误:无法连接到MySQL错误_Mysql_Joomla_Mysqli - Fatal编程技术网

显示错误页面时出错:应用程序实例化错误:无法连接到MySQL错误

显示错误页面时出错:应用程序实例化错误:无法连接到MySQL错误,mysql,joomla,mysqli,Mysql,Joomla,Mysqli,我刚刚将服务器移动到网站中,但即使在我编辑完config.php之后,我仍有此错误,我不知道为什么MySQL仍然没有连接: 请帮帮我。我在数据库中的所有用户名密码和主机名都是正确的;但是,自从我执行上述任务以来,所有用户名和密码都不会显示出来 <?php class JConfig { public $offline = '0'; public $offline_message = 'This site is down for maintenance.<br />

我刚刚将服务器移动到网站中,但即使在我编辑完config.php之后,我仍有此错误,我不知道为什么MySQL仍然没有连接:

请帮帮我。我在数据库中的所有用户名密码和主机名都是正确的;但是,自从我执行上述任务以来,所有用户名和密码都不会显示出来

<?php
class JConfig {
    public $offline = '0';
    public $offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
    public $display_offline_message = '1';
    public $offline_image = '';
    public $sitename = 'localhost';
    public $editor = 'jce';
    public $captcha = '0';
    public $list_limit = '20';
    public $access = '1';
    public $debug = '0';
    public $debug_lang = '0';
    public $dbtype = 'mysql';
    public $host = 'localhost';
    public $user = 'xxx';
    public $password = 'xxx';
    public $db = 'xxx';
    public $dbprefix = 'ocer4_';
    public $live_site = '';
    public $secret = '2PvZ36bJU5A7Iceo';
    public $gzip = '0';
    public $error_reporting = 'default';
    public $helpurl = 'http://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}';
    public $ftp_host = 'ftp.byethost13.com';
    public $ftp_port = '';
    public $ftp_user = 'b13_15953110';
    public $ftp_pass = '';
    public $ftp_root = '';
    public $ftp_enable = '0';
    public $offset = 'UTC';
    public $mailonline = '1';
    public $mailer = 'mail';
    public $mailfrom = 'tsukishiro_lee@yahoo.com';
    public $fromname = 'localhost';
    public $sendmail = '/usr/sbin/sendmail';
    public $smtpauth = '0';
    public $smtpuser = '';
    public $smtppass = '';
    public $smtphost = 'localhost';
    public $smtpsecure = 'none';
    public $smtpport = '25';
    public $caching = '0';
    public $cache_handler = 'file';
    public $cachetime = '15';
    public $MetaDesc = '';
    public $MetaKeys = '';
    public $MetaTitle = '1';
    public $MetaAuthor = '1';
    public $MetaVersion = '0';
    public $robots = '';
    public $sef = '1';
    public $sef_rewrite = '0';
    public $sef_suffix = '0';
    public $unicodeslugs = '0';
    public $feed_limit = '10';
    public $log_path = '/htdocs/logs';
    public $tmp_path = '/htdocs/tmp';
    public $lifetime = '15';
    public $session_handler = 'database';
    public $memcache_persist = '1';
    public $memcache_compress = '0';
    public $memcache_server_host = 'localhost';
    public $memcache_server_port = '11211';
    public $memcached_persist = '1';
    public $memcached_compress = '0';
    public $memcached_server_host = 'localhost';
    public $memcached_server_port = '11211';
    public $proxy_enable = '0';
    public $proxy_host = '';
    public $proxy_port = '';
    public $proxy_user = '';
    public $proxy_pass = '';
    public $MetaRights = '';
    public $sitename_pagetitles = '0';
    public $force_ssl = '0';
    public $session_memcache_server_host = 'localhost';
    public $session_memcache_server_port = '11211';
    public $session_memcached_server_host = 'localhost';
    public $session_memcached_server_port = '11211';
    public $frontediting = '1';
    public $feed_email = 'author';
    public $cookie_domain = '';
    public $cookie_path = '';
    public $asset_id = '1';
}
问题似乎是$host='localhost'。 我检查了你主机的配置,你应该拥有类似sqlxxx.byethost13.com的mysql主机

因此,将$host变量更新为:

  public $host = "sqlxxx.byethost13.com";

这是乔姆拉吗?如果是这样,你看了吗?是的,它仍然不起作用这里是代码编辑后我不知道如何,但在我的帐户信息sql主机名不可用:。我只为我的项目使用免费托管帐户请帮助我@eggyal