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.

cPanel / Fantastico / Joomla -> Domain info

Discussion in 'cPanel Developers' started by kbuser, Oct 13, 2008.

  1. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    Greetings! First off we're going to have several thousand cPanel users, each are going to have their own version of Joomla 1.5 which we will install for them through cPanel/Fantastico.

    My question revolves around finding domain/user information for whichever client is running our modules.

    Basically what I'm trying to find out is how and what user specific information I can get through php (or other means). We're developing modules that depend on these variables. Ie -> A sign-up form which submits to our central DB, but must pass along information about which client is submitting it (their domain.com for instance).

    If anyone can point me in the right direction I would greatly appreciate it.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If I was doing this, I'd use the cPanel username from the path information for this.

    For example, your Joomla installation will have a path like (but not necessarily) /home/user/public_html/joomla where user is the cPanel user. Note, the home directory is /home by default, but in the future you may add another home directory so hard-coding it to /home wouldn't be a bad idea - just not something that will scale well into the future.
     
  3. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
  4. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    Theres actually a class created in configuration.php after a Joomla install called JConfig.

    I was able to get the information I needed via these two lines:

    $jc = new JConfig();
    $domain = $jc->sitename;
     
  5. Vlada_bgd

    Vlada_bgd Registered

    Joined:
    Dec 17, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    When I try to install joomla in public_html folder, instalation fails.
    When I try to install on root is says that cannot run more then one script.
    When I install in public_html/folder, it works but then the main page is www.something.com/folder/index....
    What am I doing wrong is there some error on my hosting or what?
     
  6. andrew99

    andrew99 Registered

    Joined:
    Jan 7, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page