Remository umziehen / neuer Provider / host

13.09.2010 | Joomla

 If you move Remository from one place to another, you will need to alter the filepaths in the database.  There are filepaths stored in the xxx_downloads_files and xxx_downloads_containers tables, as well as in the configuration.  It is easiest to modify the configuration through the usual Remository administrator function.  The database can be effectively modified using SQL.  An example of a suitable statement is:


Achtung: schmarrn!

UPDATE `xxx_downloads_files` SET filepath = CONCAT('/home/newsitename/public_html/', SUBSTRING(filepath, LENGTH('/var/www/vhosts/')+1)) WHERE filepath LIKE '/var/www/vhosts/'  

Bei meiner Installation war unter filepath tatsächlich nur der Ordern-Pfad und nix mit Datei verzeichnet, das SQL-Statement kann also vereinfacht werden:

UPDATE `xxx_downloads_files` SET filepath = '/home/newsitename/downloads/'; 

Das Download-Dir ist auch noch im Admin-Interface unter Container verzeichnet. Dort ist das entsprechende Feld 'optional' marktiert. Tatsächlich ist der Eintrag völlig dysfunktional, solange der Pfad in der DB wie obengenannt nicht korrigiert ist!


 You are strongly advised to backup your database tables before doing this. You can also check out the effect by adding to the end of the SQL statement "AND id=n" where n is theID number for an actual entry.  That way, only a single record will be updated.  If you are happy with the result, you can remove the "AND id=n" and the SQL will then alter the whole table.  Repeat the process for xxx_downloads_containers.

 Note that the paths given are merely examples.  In this case, the '/var/www/vhosts/oldsitename/com' is the part of the file paths that was in use at the old site and you want to change.  The '/home/newsitename/public_html' is an example of the replacement.  Using the LENGTH() function avoids having to count the number of characters involved, but be very careful to get the strings exactly right