cPanel / Fantastico / Joomla -> Domain info

kbuser

Well-Known Member
Aug 25, 2008
66
2
58
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.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
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.
 

kbuser

Well-Known Member
Aug 25, 2008
66
2
58
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;
 

Vlada_bgd

Registered
Dec 17, 2008
1
0
51
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?