Home arrow Forum

Remository Forum

 


RAdams

Karma: 0  
relative path - HOWTO ? - 2008/04/04 13:33 Hi,

I've got some problems on :
How set each paths to relative instead of absolute ?

I've got my joomla installation on :

$base_path = "/var/www/mydomain.com/httpdocs/";

I want my remository root on :

$remo_root = $base_path."downloads/";

For each container, I want a new folder, for example :

Folder "Car" = $remo_root."car/";
Folder "Bus" = $remo_root."bus/";
So :
ContainerFolder = $remo_root.$container->folder;


And I'll set these paths to their name and not where they are on my disk.
Moreover, When I want to move my joomla installation from
"/var/www/mydomain.com/httpdocs/";
to
"/var/www/mynewdomain.com/httpdocs/";
I do not want to set ALL the files and container and configuration paths to the new absolute path.

I also don't want to use my database to stock over 1000 files/year.

What can I do ?
Thank you for your help.
Martyn
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 98  
Re:relative path - HOWTO ? - 2008/04/06 06:10 Why not create your file structure first, in the form you want it, then add the whole structure? Then add individual file descriptions etc. Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.
RAdams

Karma: 0  
Re:relative path - HOWTO ? - 2008/04/07 06:51 Because this looses all the interest of a dynamic site.
I don't know who will use my projects and I can't see myself showing all my users how to create a directory via FTP, or telling them to put the abolute path in this field and call me when they want a new folder.
I'll be crazy !
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 98  
Re:relative path - HOWTO ? - 2008/04/10 10:58 Sorry, I'm unclear what is the problem. My answer assumed that you were looking for a quick way to create a structure of containers and directories in the initial setup.

If you're asking about how to move a site from one place to another, the filepaths are relatively easy to update with a SQL operation. It has to be applied twice, once to the xxx_downloads_files table and once to the xxx_downloads_containers table.

Using relative paths would prevent the files being kept outside the document root, which is often the best place for them.

If I can think of a way to build the SQL into the system, I will do so, but it has to be rather general since the structure of directories above the document root varies a good deal across different hosting.

Or if you're concerned about users having to create new containers and not understanding absolute paths (is it really that difficult?) why does it matter exactly where the files are placed by Remository? There's never any need to create directories, since Remository will do it for you.

Post edited by: admin, at: 2008/04/10 10:00

Post edited by: admin, at: 2008/04/10 10:01
Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 8 guest online