4images Forum & Community

4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: Harry on October 31, 2002, 04:42:02 PM

Title: cross server setup
Post by: Harry on October 31, 2002, 04:42:02 PM
Dear Jan & Nicky,
beacuse of bandwidth problems I would like to place my images (data) folder on another server, is this possible?

Where should I change the server paths?

Thank youvery much for your help,
best regards,

Harry
Title: Believe so
Post by: Chris on October 31, 2002, 05:47:44 PM
4images supports local file paths or URLs for the images.  You can edit each image and supply the URL to the image file on the other server.
Title: Re: Believe so
Post by: Harry on October 31, 2002, 05:52:28 PM
Quote from: Chris
4images supports local file paths or URLs for the images.  You can edit each image and supply the URL to the image file on the other server.


Hi Chris,

thanks for your reply; this would work but need tremendous amounts of work; is it also possible to create a new path/url to the 'Data' or Media folder instead?

Thanks,
best regards,

Harry
Title: Yes and no
Post by: Chris on November 01, 2002, 03:09:39 AM
Well inside includes/constants.php you can find this:
Code: [Select]
define('MEDIA_DIR', 'data/media');
define('THUMB_DIR', 'data/thumbnails');
define('MEDIA_TEMP_DIR', 'data/tmp_media');
define('THUMB_TEMP_DIR', 'data/tmp_thumbnails');

which would work if your images were going to be located on the same box.  But you're trying to relocate them to another server so I don't know how to address this other than to suggest you export your 4images_images table from the database.  Use a text editor to do multiple search and replace.  And then import the table data back into the database.  It would certainly be much faster than editing the images from the browser.
Title: cross server setup
Post by: Harry on November 01, 2002, 08:43:29 AM
Hi Chris,

thanks, I was looking for that bit. Now I only need to know where
define('MEDIA_DIR', 'data/media');
Is being called, it probably is something like 'ROOTPATH'-Media DIR, so if I knwo where that is, I can change the rootpath for the Media dir only.

Thanks for your time so far,
best regards,

Harry
Title: Search it
Post by: Chris on November 01, 2002, 02:41:49 PM
Just search the php files in the 4images root directory.  I know that in global.php you'll find MEDIA_DIR is appended to ROOT_PATH.  But do search the rest of the php files in the root directory and inside the includes/ directory.