Jump to content

copy/move files from domain to subdomain


cnapsys

Recommended Posts

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

Link to comment
Share on other sites

    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).

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.