Freelance Projects

All freelance projects at One Location


System Configuration  25.07.08

I have my own dedicated server with full root access. I host two very similar but separate domains on the server. I would like to be able to store files in one shared directory that can be accessed by both domains.

Both web sites are social communities where members can upload photos and documents. I would like members to be able to upload their photos and documents from either of the two domains and have all of the files available in both web sites.

I spoke to one system admin a long time ago (unfortunately I’ve lost touch with him) and he said this:

>>> “It is possible to store files in one shared folder, which will be accessible from all domains. You can simply create a folder on server (for example: /var/www/files or /var/www/data or something else), add it to php “trusted” paths and use it physical path in all domains.”

Both web sites have a general.php file that has all of the web site settings and parameters. You can set the paths to the upload directory using these general.php pages.

For example:

function get_upload_dir_pics()
{
return get_web_root_dir() . “/members/pics”;
}

I want to know if you can set the path on one general.php page to essentially point to the real directory on the other domain so files can be accessed and saved from both domains.

Let me know if this is possible of you have other ideas to solve this problem.

Thanks.



If you liked this project, make sure you
Subscribe to Freelance Projects RSS feed!



    • Your Ads Here
    • Your Ads Here