cnapsys Posted September 1, 2011 Share Posted September 1, 2011 hey all, I've been struggling with this for the last few days and can't figure it out... I'm trying to build a fairly complex uploading system. the thing i'm getting stuck with is trying to copy/move the uploaded files from the domain name to a subdomain Ex: $path1 = "/var/www/vhosts/domain.com/httpdocs/new/test/test.jpg"; $path2 = "/var/www/vhosts/domain.com/subdomains/img/httpdocs/test/test.jpg"; Dedicated server running RHEL with Plesk The problem seems to be an open_basedir restriction. My question is... are there any work-arounds open_basedir and if not what are the implications of disabling it??? Any help is greatly appreciated. Thank you for your time c Quote Link to comment https://forums.phpfreaks.com/topic/246205-copymove-files-from-domain-to-subdomain/ Share on other sites More sharing options...
darkfreaks Posted September 1, 2011 Share Posted September 1, 2011 Store a temporary file in the /tmp directory from the source site and trigger a process in the target site to fetch the file. You can use the curl functions to do so. Store files in a common database. The storage does not need to be permanent if you think that will affect your site performance. Target site just needs to check whether it has pending incoming files. Add files to a queue (perhaps a special directory inside httpdocs) and write a command line script to push them to the target site. Run this command with cron (lets say, once every minutes). Quote Link to comment https://forums.phpfreaks.com/topic/246205-copymove-files-from-domain-to-subdomain/#findComment-1264462 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.