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.

How-To: Fix "Support Request" in PRO Version

Discussion in 'General Discussion' started by vwiley1, Apr 4, 2004.

  1. vwiley1

    vwiley1 Well-Known Member

    Joined:
    Oct 4, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Everyone knows that the initial PRO version of CPanel comes with a broken "Submit a Support Request". It seems the reseller settings just plain out don't work, and the root setting overrides everything.

    Follow the How-To below and you will get the submit a support request feature working the way it was intended to.



    1. Log into ROOT SSH

    2. Type: cd /usr/local/cpanel/whostmgr/docroot/cgi

    3. Type: pico addon_configsupport.cgi



    4. Find the following line:

    if ($ENV{'REMOTE_USER'} ne "root") {
    $conffile = "/var/cpanel/pro/$Cpanel::CPDATA{'OWNER'}_support.conf";

    5. Change this line to:

    $conffile = "/var/cpanel/pro/$ENV{'REMOTE_USER'}_support.conf";


    6. Save this file

    7. Type cd /usr/local/Cpanel

    8. Type pico SupportRequest.pm

    9. Search this file every instance of the following:

    $Cpanel::CPDATA{'OWNER'}/support.conf

    10. Change every instance to the following:

    $Cpanel::CPDATA{'OWNER'}_support.conf


    11. Save this file

    12. Just to make sure your starting from scratch do the following:

    Type: cd /var/cpanel/pro
    Type: dir
    delete every support.conf that is listed

    13. Log into your reseller WHM and Configure a support request.

    14. Test it out and have fun!!!
     
    #1 vwiley1, Apr 4, 2004
    Last edited: Apr 5, 2004
  2. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    In it's current version the script for this Cpanel Pro feature appears to work just fine in FreeBSD, or so I've read within the Forums. For any version of Linux though, there is some modification to be done.

    Athough the 'bug' has already been reported as Bugzillia 183, there are two thing I found out:

    - the fix listed in Bugzillia 183 is incorrect, although an excellent start - thanks to vwiley1
    - changes will stick after a Cpanel update


    Amended Fix

    SSH into Server as 'root' to complete the following 3 steps.


    vi /usr/local/cpanel/whostmgr/docroot/cgi/addon_configsupport.cgi

    Edit line 21
    if ($ENV{'REMOTE_USER'} ne "root") {
    $conffile = "/var/cpanel/pro/$Cpanel::CPDATA{'OWNER'}_support.conf";

    to read
    if ($ENV{'REMOTE_USER'} ne "root") {
    $conffile = "/var/cpanel/pro/$ENV{'REMOTE_USER'}_support.conf";



    vi /usr/local/cpanel/Cpanel/SupportRequest.pm

    Edit every line showing:
    $Cpanel::CPDATA{'OWNER'}/support.conf

    to read
    $Cpanel::CPDATA{'OWNER'}_support.conf

    Should show on line: 36, 86, 87.



    rm -f /var/cpanel/pro/_support*

    Now, instead of '/var/cpanel/pro' listing the files as: _support.conf which is for 'root' since there is no accountID, the file name will now begin the Reseller accountID so each Reseller can maintain their own settings.


    After making the above changes and doing an upgrade (with the Edge version anyway) there were no changes made and Submit a Support Request continued to work as it should. So, until changes are made within WHM itself -- for the Linux OS -- once the above changes are done you should not have to worry any more about whether the feature will work or not.
     
    #2 Website Rob, May 2, 2004
    Last edited: May 2, 2004
  3. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I tried this last fix, and I'm not quite sure yet if it worked, but what I do know is this: there are now 3 links in the root AND reseller WHMs for configuring the support system. As far as I can tell, for the root WHM the three links are identical. In the reseller WHM, the links each take you to a different set of support system settings, each individuially configurable, but I have no idea what for. Any idea whats going on?
     
  4. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    I'm interested in this, though i'm waiting till you pros figure it out first.. lol...

    rYno
     
  5. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Here's another interesting development - I tried restoring the files to their original condition from copies I made prior to the editing - and now there are 4 identical links, instead of the 3 described above. HELP!
     
  6. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Ok, I figured out that the 4 links I'm seeing are there because of the backups I made. Apparently WHM is picking up those files and creating links to them. I'll have to just delete the backups.
     
  7. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    My apologies.

    This fix (latest version by 'website rob') works beautifully.

    Just make sure that you dont leave any extra copies of the CGI file in that directory ('/usr/local/cpanel/whostmgr/docroot/cgi/addon_configsupport.cgi'), or else WHM will provide a link for each one, and those multiple links will appear on your resellers' WHM's as well.

    Additionally, I was editing using EMACS instead of VI, and EMACS auto-saved a copy of the file as 'addon_configsupport.cgi~', which was also picked up by WHM and provided a link. So if you're using an editor that autosaves temporary copies of the files you're editing, make sure to clear them out of that folder right after you're done editing.

    Many thanks to 'website rob' for this fix.
     
    #7 DuxAranea, May 4, 2004
    Last edited: May 4, 2004
  8. vwiley1

    vwiley1 Well-Known Member

    Joined:
    Oct 4, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Hmm,

    Website Rob I am glad you found my "start" useful, but you also state that it is incorrect.

    I have read through your ammended version several times and have been trying to see what you have done differently to supposably "correct" my fix.

    I did not find anything different whatsoever about the lines we are editing, and what we are changing them to.

    Just because you prefer to use "vi" to edit a file, does not mean using pico or nano to do the same thing is wrong. It also does not make a fix for a problem incorrect.

    An "incorrect fix" would be a fix that does not serve it's purpose which is "fixing the problem".

    I hate to steal your new found glory from under your feet but when you say my fix is incorrect. (which to me makes it sound like it doesn't work) and then repost it only changing the way you open the file for editing, makes me feel like you are trying to take my credit.

    Does it really matter how you open the file for editing? And does not opening the file in your preferred way really make it "incorrect".

    I did like that you added line numbers though, it is usefull when people would rather count lines instead of using CTRL-W to search an open file in nano or pico.

    Vince
     
  9. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Website Rob's path for SupportRequest.pm is /usr/local/cpanel/Cpanel/, whereas yours was /usr/local/Cpanel.

    Also website rob told us the exact command to use to get rid of the old 'conf' files - your instructions were a little misleading, since the name you stated didn't include the underscore (_) .

    Both of these, however, were small mistakes at best, and I do agree with you - I simply used his instructions because they came later, and I assumed they would be significantly different from your original instructions.

    Website Rob should've simply said that he was correcting some minor errors, rather than belittling your method as merely a "start".
     
  10. vwiley1

    vwiley1 Well-Known Member

    Joined:
    Oct 4, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Yeah I would of rather him used "minor errors".

    Didn't know my path was typed incorrectly to one file :(

    I also agree I can be a little vague at times, like by saying just delete all the support.conf's at the end.

    What would really be nice if the CPanel developers actually fixed there own products..... and didn't leave it up to us to search for the solution.
     
  11. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Not sure what the probem is?

    I gave credit where credit was due and also pointed out an error. Does not an error as mean incorrect?
    - the fix listed in Bugzillia 183 is incorrect, although an excellent start - thanks to vwiley1


    vwiley1 even stated,

    "read through your ammended version several times and have been trying to see what you have done differently to supposably "correct" my fix.

    I did not find anything different whatsoever about the lines we are editing, and what we are changing them to."

    This is from the person who first wrote the instructions and the correction had to be pointed out to them! Imagine the difficultly someone with less troubleshooting skills would have had -- not knowing the path to SupportRequest.pm was incorrect and thus, the originally posted fix would not work.

    If one persons posts a 'fix' and someone else finds an error in the 'fix', it is common courtesy to point out the mistake and provide a correction. This would then "amend" the original, would it not?


    Give it a rest guys and get on with the program. We are here to help each other, so why not do that?
     
  12. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    In the strictest, most technical sense, yes, vwiley1's instructions were wrong. But most normal people wouldn't refer to it that way. By doing so you take the credit away from him.

    You could've just as easily said "vwiley1's instructions were correct except for the following errors". It would've taken about two lines of text. But instead you chose to restate all the instructions, which takes the credit away from him, and makes it seem like he was completely off.

    The idea was his, he was correct, and the fix works simply and perfectly. It might seem to you like we're making a big deal out of nothing, but when someone figures out something like this he tends to take pride in it and want his work recognized. You took that way from him, whether you realized it or not. So try to understand where he's coming from.
     
  13. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Although it is our right to disagree with each other, allow me to point out,

    Thread Title
    How-To: Fix "Support Request" in PRO Version

    Now, since the original fix was incorrect and has been amended to work, people have two different methods to try. Which one they use is up to them.

    BTW, do not belittle someone who takes the time to debug a problem/fix and then share the solution with others. That is what vwiley1 did, that is what I did.

    Is it possible, to prevent this thread from going off track into an egotistical ecstasy tirade?
     
  14. vwiley1

    vwiley1 Well-Known Member

    Joined:
    Oct 4, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    No big deal really, I am sure by your last post that your intentions were good. Your original post did kind of make it sound like my way was totally off. I did read through your original post several times to try to see what you did differently, and those glances only revealed the way you opened the file to edit.

    It has now been pointed out that I listed the wrong directory, which I had overlooked. I appreciate you posting the correct directory so people who don't know how to search for files can benefit from the fix also.

    Vince
     
  15. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Thanks Vince. I'm glad you are taking my "amendment" in the way it was made. The additional information I included (whatever corrections and the fact no changes are made after an update) were also meant to build upon what you had started.

    At no time was I trying to take any credit away from you, but like most of us, it is so frustrating to follow instructions posted by someone -- only to find out they don't work, or even worse, cause more problems. This has had happened many times in the past -- and believe me, I know from my own personal experience. ;)

    Documentation is not any easy thing and, in so many ways, very important to anyone reading them. This is why, for example, Manuals for WHM/Cpanel are so long in coming. The detail and accuracy of any "how to" instructions should always be as correct & accurate as possible. This can take up much time.

    Most of us, myself included, would have just lived with another, incorrectly coded new feature of WHM/Cpanel. At least this way, people can start to use this new feature, which is actually very nice, instead of waiting for who knows when, DarkOrb to issue a fix.
     
  16. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    I'd like to thank you guys...

    I did this and now my support email form works fine.

    I might go in and add more fields too - it's too much like a basic contact form.
     
  17. DuxAranea

    DuxAranea Active Member

    Joined:
    May 1, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    No problem Ryno. Those other guys provided a good "start" for me to figure the whole thing out. ;)
     
  18. ctbhost

    ctbhost Well-Known Member

    Joined:
    May 31, 2002
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    i have gone through the tread and made the changes suggested, gone into whm and setup the optons in there, opened cpanel and all i get when i click on "Submit a Support Request" is a page saying

    Support Request Submit

    [go back]


    where am i going wrong ??????
     
  19. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Changes mentioned in this thread are for the 'root' WHM.

    Setup of Support options is done throught the 'reseller' WHM.

    Is that what you did?
     
  20. ctbhost

    ctbhost Well-Known Member

    Joined:
    May 31, 2002
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    root owns all the accounts - i dont have any resellers
     
Loading...

Share This Page