Search

Hi, just a little question. Will I have any problem with moving symphony to another server? I would like to create a CMS for a new website using my server and then move it to my client’s hosting provider.

I think it should be just a matter of copying a database and files and maybe changing some configuration file (is there any?).

How about that?

I think it should be just a matter of copying a database and files and maybe changing some configuration file (is there any?).

Exactly right. You could use the “Export Ensemble” functionality which zips the site up to deploy to another server, but I find it easier just to move the whole thing.

  1. Copy the files across to the new provider
  2. Adjust permissions as they were before (write permissions to /manifest)
  3. Export your database and import to the new server
  4. Update database login credentials in /manifest/config.php

There shouldn’t be anything else, there aren’t any hard-coded paths to change.

There shouldn’t be anything else, there aren’t any hard-coded paths to change.

Depending on your folder setup on your server you might have to update the RewriteBase in your .htaccess file.

Thanks for quick reply!

Before copying you might want to delete all the files in manifest/cache.

I’ve just copied files and database. There are 2 issues:

  1. The $root variable seems to be only http://domain.com/ and I want it to be like on the previous server: http://domain.com/symphony-directory/.
  2. No access to administration site: http://domain.com/symphony-directory/symphony. I checked out permissions of files like content/content.login.php etc and they are all right.

Maybe as Nils said, there is something to be done with a .htaccess file. I haven’t changed it yet. Any ideas?

The RewriteBase in the .htacces needs to reflect the URL-path to the folder where Symphony is installed. Is the .htacces on your new server? Where did you install Symphony? If it’s in your root folder you have to either change the RewriteBase to just / or move the installation to /symphony-directory/.

The path of my symphony directory is /symphony-directory/ and in /symphony-directory/.htaccess there is a line:

RewriteBase /symphony-directory/

And it doesn’t work :)

  • Is the parent folder of /symphony-directory HTTP readable, in other words is it the doc-root?

Is your server set up like so

/doc-root
/doc-root/symphony-directory
/doc-root/symphony-directory/symphony

doc-root being your http-docs folder, or whatever it is.

  • Do you have an .htaccess file in the parent folder too?

If there is an .htaccess folder in the parent, you may be experiencing conflicts. Check it to see if there are any rewrite rules relating to sub-folders of the root.

  • Does your new server allow for .htaccess?

Some servers don’t allow any .htaccess directives, check this with the Host.

From what you’ve said so far, Symphony thinks it is installed in the doc-root, which seems to be the parent folder of /symphony-directory. Can you explain your server setup like I did earlier, and post your .htaccess file for us?

Lets see if we can fix this…

Another solution might be to create a clean install of Symphony in the same location and that should give you config settings and the .htaccess file you need. Move the fresh install files. Replace all the files of the site you are moving into the same location as the original. Copy the config.php file and .htaccess file from the fresh install, and make sure you are pointing to the actual database for the site.

  • Do you have an .htaccess file in the parent folder too?

Nope, only in /doc-root/symphony-directory/

Here is my .htaccess (sorry that it looks so messy, I didn’t know how to paste it nicely)

RewriteEngine on RewriteBase /symphony_directory/

### DO NOT APPLY RULES WHEN REQUESTING “favicon.ico” RewriteCond %{REQUEST_FILENAME} favicon.ico [NC] RewriteRule .* - [S=14]

  ### IMAGE RULES     RewriteRule

^image/(.+.(jpg|gif|jpeg|png|bmp))$ extensions/jitimagemanipulation/lib/image.php?param=$1 [L,NC]

  ### CHECK FOR TRAILING SLASH - Will ignore files    RewriteCond

%{REQUESTFILENAME} !-f RewriteCond %{REQUESTURI} !/$ RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ $1/ [L,R=301]

### ADMIN REWRITE RewriteRule ^symphony/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L]

RewriteCond %{REQUESTFILENAME} !-d RewriteCond %{REQUESTFILENAME} !-f RewriteRule ^symphony(/(.*/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING} [NC,L]

### FRONTEND REWRITE - Will ignore files and folders RewriteCond %{REQUESTFILENAME} !-d RewriteCond %{REQUESTFILENAME} !-f RewriteRule ^(.*/?)$ index.php?symphony-page=$1&%{QUERY_STRING} [L]

#

When I go to www.domain.com/symphony_directory/symphony to administrate my page, then I get “Access forbidden” - maybe this is some clue.

And when I try www.domain.com/symphony-directory/index.php, everything is fine. It must be because of all those mod_rewrite options!

This seems very strange. Maybe server configuration is a problem.

Could you tell me one thing, please?

How does Symphony obtain the $root variable?

EDIT:

I’ve found a solution. It’s 4th line of an index.php.

define('DOMAIN', rtrim(rtrim($_SERVER['HTTP_HOST'], '\/') . dirname($_SERVER['PHP_SELF']), '\/'));

In core/defines.php there comes an URL define which has a value http://DOMAIN;

At some point later, $root is set directly to the URL define.

I’ve been having a think about this and can’t seem to figure out what’s happening. I think going with Stephen’s idea may be best to try.

Backup the database, then the /workspace, the do a fresh install of Symphony (minus the /workspace) into your /symphony-directory which should install fine with the correct paths etc. If not, then we’ve found a problem.

Once (or if) the install goes OK, drop the /workspace over the top of the installed one and restore the database over the installed one.

That should get you back up and running…

I’ve already tried Stephen’s solution -> not working.

But it is not about Symphony and .htaccess. It’s all about the strange HTTP server of the hosting provider. I’m fighting with them now (home.pl). But it’s one of the biggest hosting companies in Poland so I’m really astonished why they use such a weird configuration.

At least you’ve figured where the problem is, sorry I couldn’t help more…

I remember people mentioning this host in the past. Is this thread helpful?

That’s a great info thanks!

I’m in a contact with administrators and they are doing their best, but their solutions are ugly (like changing index.php source). At least, almost everything seems to work fine. But I don’t recommend home.pl to any Symphony user. They have strange rewriting rules - and you know that this could be the reason of great evil :)

Now I have problems with AJAX requests with them… my God. It’s tiring.

Would be great if you wrote a brief review on our compatible hosts page, so that other users know what to expect from them.

If I find a bit of free time I will do it. I didn’t even know that such a page exist :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details