Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can I include files between accounts?

Discussion in 'General Discussion' started by DavePanel, Apr 11, 2014.

  1. DavePanel

    DavePanel Registered

    Apr 11, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    I have a webhosting account that allows me to host multiple domains, each of which has its own CPanel. All of my sites are essentially one big CMS; all the satellite sites are built on includes hosted by the main website.

    I've been doing this for years with no problems until today. I've been working on a major upgrade, which includes PDO database queries. Today, I asked support to enable PDO online, so they did - and my websites crashed. They couldn't figure out what the problem was, so I asked them to disable PDO.

    That restored my websites - but my includes no longer work. My includes look something like this:

    include ("/home/geobear2/public_html/$MyPHP/dbc.php");

    Now I get the error "failed to open stream: Permission denied."

    My support tech told me you can't include files between CPanel accounts; he said he can't understand how I ever did it in the first place.

    So I'm totally confused. I have over a dozen websites with over 50,000 web pages - and they're all fried. Is it true that you can't include files between websites running CPanel? If so, is this because of some technical problem or is it in administrative problem (i.e. CPanel doesn't want users to include files between sites)?

    If it CAN be done, can someone please tell me how to do it? Thanks.s

    P.S. I'm working with PHP and MySQL and am using MAMP on a Mac.
  2. Serra

    Serra Well-Known Member

    Oct 27, 2005
    Likes Received:
    Trophy Points:
    You should NEVER be able to share files between cPanel accounts!!!! That is a huge security risk. Like your admin, I can't believe you could do it before!

    If you can include files from another site, then you could basically read other people's accounts. That would be bad.

    There really isn't a good work around for this other than moving all of the accounts into one cPanel account and make the sites addons. They they would be all in the same account and could share files.
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    Using a path to files from another account is not recommended. Ideally, you should simply upload the same set of files to the accounts. Or, since you own all of the websites, you could setup the additional accounts as addon domain names instead of keeping them separate.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice