genjitsu Posted September 24, 2007 Share Posted September 24, 2007 Hi there - I'm not sure if this is the right forum for this question, but you'll see why: I have an image gallery site that's been growing at a fairly steady pace. It relies primarily on a PHP script to process uploads. I'm thinking about adding a second server dedicated to hosting the images, and the database and scripts to be on the other. But what do I need to do to ensure seamless uploading? When a user submits a picture, I use move_uploaded_file() to move it to another directory, but how would I specify another server? Or is this something set on Apache itself, like mapping a directory on one server to the other? Thanks for the help! Quote Link to comment Share on other sites More sharing options...
jaymc Posted September 25, 2007 Share Posted September 25, 2007 You could use php to FTP it.. Probably an easier way but thats something to think of off the top of my head Quote Link to comment Share on other sites More sharing options...
steviewdr Posted September 27, 2007 Share Posted September 27, 2007 You use a "NFS" (network file share). On linux this is simply: apt-get install nfs-kernel-server On the server you are uploading images to: run nfs-kernel-server and share out a directory via: /etc/exports On the server showing the photos etc. you can simply install by going: apt-get install nfs-common In /etc/fstab you can specify the shared directory and mount it. Thats how Id do it. -steve Quote Link to comment 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.