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.

cPAddons web root?

Discussion in 'cPanel Developers' started by Yanislav, Apr 6, 2009.

  1. Yanislav

    Yanislav Registered

    Joined:
    Apr 6, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have been developing cPAddons recently and encountered a pretty annoying issue - the inability to leave the installdir variable empty. This makes the default engine not suitable for installation in the document root for the domain (subdomain). I had started working on a custom solution for such installations, but noticed the following in the cPanel changelog:

    Since there is no information regarding the usage of this enhancement in the cPAddons docs, I would love to see some more clarification about it.

    P.S. cPAddons is a great feature :) Too bad its documentation is not more detailed.
     
  2. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    installdir is only the default value for installation directory and can be changed by user (for example, if user remove the value, will install the script in root dir).
     
  3. Yanislav

    Yanislav Registered

    Joined:
    Apr 6, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    That is only partially true. Indeed it is a way to specify the default directory, yet removing the value and leaving it blank (by the customer) results in the following error:

    This is what I am trying to bypass. Perhaps the uninstall function is not able to handle properly installations in the public_html directory?
     
  4. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    I do a test and is possible to install an addon in public_html
    I'm not sure if this helps, but my install script has a section for version and a list of files that will be overwritten: "public_html_install_files"

    See http://www.cpanel.net/docs/cpaddons/$meta_info_hashref.htm
     
  5. Yanislav

    Yanislav Registered

    Joined:
    Apr 6, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Nice, thanks for the info, I will take a deeper look into this :)
     
  6. terry81

    terry81 Registered

    Joined:
    Jan 28, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    d_t,

    Could you please share what cPaddon you are using that lets you install in the webroot?
     
  7. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
  8. terry81

    terry81 Registered

    Joined:
    Jan 28, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Re:

    Hello d_t,

    Thanks for sharing the code for your Joomla perl module.

    I have figured it out :)

    In case anyone else needs to know it:

    In order to allow an installation in the webroot, you have to add the following to your $meta_info:

    1.5.1'' => {
    'public_html_install_files' => [qw(index.html index.php)],
    'public_html_install_note' => '<br /><br />If you install in your public_html an existing index.html/index.php will be renamed.',
    },
    };

    1.5.1 is the Joomla version. Without the above arrays you are not able to install in a webroot.
     
  9. d_t

    d_t Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bucharest
    Yes, this is what I said few messages above :)
    I'm glad it's working.
     
Loading...

Share This Page