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.

image in another home folder

Discussion in 'General Discussion' started by jbnmedia, Jul 4, 2009.

  1. jbnmedia

    jbnmedia Member

    Joined:
    Jun 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi, I am wondering how can i use an image path outside the customers home account.

    For example /home/jbn/public_html/ - with an index.php

    And in /home/system/mall/test/ is test.jpg

    In my index.php I have an image I want to show that is in the another home folder - system.

    I´m trying this:

    ./../../../system/mall/test/test.jpg - doesn´t work.
    /home/system/mall/test/test.jpg - doesn´t work..

    If I include a file I use php include -
    /home/system/mall/test/test.php - and thats work.

    How can i show my image on my index file ?
     
  2. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    Are you trying to use a url with those? Apache is not serving anything outside of public_html directly to the web. Includes are different, php is grabbing extra files. If you are doing actual urls though, it has to be in the web root.

    If you really want to do it you could try sym-links, depending on your setup that should work.
     
  3. jbnmedia

    jbnmedia Member

    Joined:
    Jun 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    What is sym-links and how do I do that ?
     
  4. jbnmedia

    jbnmedia Member

    Joined:
    Jun 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    include problem

    I move my templates(mall) folder tol public_html and now I get a problem with including files, how can I fix the permissions ?

    Warning: include(/home/system/public_html/mall/siteadmin/bluerange/index.php) [function.include]: failed to open stream: Permission denied in /home/jbn/public_html/siteadmin2/home/index.php on line 7

    Warning: include() [function.include]: Failed opening '/home/system/public_html/mall/siteadmin/bluerange/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jbn/public_html/siteadmin2/home/index.php on line 7
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    jbnmedia, the error message you just quoted says the scripts are trying to
    call include files located in the original path where you moved the files from
    instead of the new location where you moved them.

    Since you moved the files, you will need to update the scripts that are
    broken (shown in the error messages you quoted) and replace the old path
    locations in those files with the new location.
     
Loading...

Share This Page