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.

Can I include files between accounts?

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

  1. DavePanel

    DavePanel Registered

    Joined:
    Apr 11, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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

    Joined:
    Oct 27, 2005
    Messages:
    213
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Florida
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,697
    Likes Received:
    657
    Trophy Points:
    113
    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.
     
Loading...

Share This Page