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

时间:2015-03-09 01:20:30

标签: mysql joomla mysqli

我刚刚将我的服务器移动到网站,但即使在我完成config.php的编辑后我也有这个错误,我不知道为什么MySQL仍未连接:(

请帮帮我。我在DB中的所有用户名密码和主机名都是正确的;但是自从我执行上述任务以来,所有用户名和密码都没有显示(可能是丢失了)。

<?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';
}

1 个答案:

答案 0 :(得分:0)

问题似乎是$host = 'localhost' 我检查了你的主机的配置,你应该像mys sqlxxx.byethost13.com那样拥有mysql主机。

所以将$host变量更新为:

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