donglang7236 2014-01-29 14:14
浏览 52
已采纳

尝试在localhost上安装joomla时显示应用程序实例化错误

I created a mySQL database called "testsite" using phpMyAdmin and downloaded all of my joomla files from my live site to the folder wamp/www/testsite. (I already have a live site that I would like to have on a localhost).

When I want to look at the site I get the following error: "Error displaying the error page: Application Instantiation Error"

I undestand this is because the configuration.php file is not set up properly, here is the relevant part of it, I don't know where my mistake is...

    public $dbtype = 'mysql';
    public $host = 'localhost';
    public $user = 'root';
    public $password = '';
    public $db = 'testsite';
    public $dbprefix = '';

I know this does or should not cause the error, but here is the other part that I need to change and am not sure as to what exactly to change, this is what I have tried:

    public $log_path = '/C:/wamp/www/testsite/logs';
    public $tmp_path = '/C:/wamp/www/testsite/tmp';
  • 写回答

2条回答 默认 最新

  • dsebywql016137 2014-01-29 14:24
    关注

    Simple answer, the database credentials you have entered in the configuration.php file aren't correct.

    This line must be correct as you already mentioned you have created a database called testsite

    public $db = 'testsite';
    

    After this, you're supposed to create a user and assign this user to the database. You are currently using the user root which I believe is a default user, however have you assigned it to the database you created? Either way, I would not do this, I would create a completely new user with a password of your choice and assign this one to the database.

    Update

    You have strict errors appearing on your site. This happens a lot with Joomla and PHP 5.4+

    Turn turn them off, firstly, open the php.ini file for wampserver (check the last comment on my answer to another question here)

    Then set error reporting to :

    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
    

    Update 2

    Here is another approach that worked for me:

    In the configuration.php look for public $error_reporting = 'default'; and change it to public $error_reporting = '30711';

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c