PDA

View Full Version : 2 Servers


photocroatia
9th of August 2004 (Mon), 18:07
Hi Pekka,

Is it possible to run EE where the photos are on 2 different servers, but 1 database.

Im getting close to blowing my quota and would like to get a second domain, there is no quarantee I will get the same machine/server.

Thank you.

cferrero
10th of August 2004 (Tue), 01:21
It is possible and I have been doing it. You just need to create the correct path in the "path setup" editor. Then:
a) Use the UPLOAD TO DATABASE to create the thumbs and microthumbs
a1) Add these images to the correct exhibition
a2) Delete the uploaded images from the EE server (you don't have to do this, but as these are never used you might as well)
b) FTP the full size images to the new server path you defined in "path setup"

Unfortunately the need for step b) means it's not as automated as when everything is on one server. Or maybe I'm just doing it wrong. :)

Pekka
10th of August 2004 (Tue), 01:49
You can have several ftp servers and when you create paths you can create paths that point to any of those servers. Each photo (each size each photo uses) can be from any server. EE was designed from start to be able to deliver image sizes from several servers.

NOTE: Exhibition thumbs and microthumbs must be in EE's program server (PHP limitation and speed reasons).

EXAMPLE:

If you have servers "A" and "B", add ftp servers "FTP_A" and "FTP_B" and then add size paths

URL: http://www.yoursite.net/gallery/photos/small/

FTP SERVER: FTP_A
FTP FOLDER: /www/html/public/gallery/photos/small
RESIZE METHOD: IMAGEMAGICK 240

URL: http://www.someothersite.com/otherphotos/big/
FTP SERVER: FTP_B
FTP FOLDER: /usr/www/html/otherphotos/big
RESIZE METHOD: IMAGEMAGICK 800

On upload command EE will then upload sizes to correct servers and apply the size paths. Just make sure (as always) that ftp servers work and "ftp folder" is correct.

If you want to move existing sizes (e.g. biggest size) to an other server then create a new size path for it (or edit existing!), copy the big size images to new location using normal ftp program.

If you created a new size path you'll need to edit EE's photo's size path list or use "find size paths" command (backup database first!). This is not neccessary if you edited an existing path to point to the new server.

photocroatia
10th of August 2004 (Tue), 06:31
Excellent!!

Thank you very much for your responses.

Pekka, you have thought of everything, well done!