The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Config.php

Discussion in 'General Discussion' started by ereihani, Oct 31, 2012.

  1. ereihani

    ereihani Registered

    Joined:
    Oct 31, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi Again,

    I have installed Joomla ver 2.5 and then installed opencart in my public_html. Now I can not access Joomla and all of my posts and files are gone! I googled and tried to change config.php from follows:
    // DB
    define('DB_DRIVER', 'mysql');
    define('DB_HOSTNAME', 'localhost');
    define('DB_USERNAME', 'irarduin_boodi');
    define('DB_PASSWORD', '24556536');
    define('DB_DATABASE', 'irarduin_opencart');
    define('DB_PREFIX', '');
    ?>

    to this:
    // DB
    define('DB_DRIVER', 'mysql');
    define('DB_HOSTNAME', 'localhost');
    define('DB_USERNAME', 'irarduin_test');
    define('DB_PASSWORD', '24556536');
    define('DB_DATABASE', 'irarduin_jdb');
    define('DB_PREFIX', '');
    ?>

    I faced this error:
    Notice: Error: Could not connect to database irarduin_jdb in /home/irarduin/public_html/system/database/mysql.php on line 11

    Notice: Error: No database selected
    Error No: 1046
    SELECT * FROM store WHERE REPLACE(`url`, 'www.', '') = 'http://irarduino.ir/' in /home/irarduin/public_html/system/database/mysql.php on line 49

    Then I tried to explicitly tell the mysql.php to use joomla data base so I added this on line 9:

    USE irarduino_jdb

    which gave me parse error. In brief, how can I restore my Joomla installation ? How can I say my website to use Joomla database?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Your Hosting Provider would be of more help than these forums for this I think. I'm unclear on why you'd change the database name in the config file as you mention you did, but that might be the problem. If the DB name is _jdb and you change the config file to anything else, you're no longer connecting to the proper database, so, the site wouldn't work.

    Each script you install, needs to use its own database. Each script also needs that database created before you run the installer for each.

    I suggest you contact your Hosting Provider, or visit the Joomla Support forums for more help on setting up your CMS.

    Good luck.
     
Loading...

Share This Page