Page 1 of 1
Problem Moving Servers
Posted: Wed Mar 24, 2010 12:04 pm
by david@mediacopy
Hi,
I've got a problem moving my serendipity install to a fresh server. I've followed the suggestions in the FAQ, ie,
coped over the file set
restored the db from a phpmyadmin backup
checked the file\folder permissions
I've even hand amended the base path in the db (as the domain has not been redirected yet).
The issue I'm getting is the server is returning a "500 Internal Server Error" with a mention to port 80, with no other clue as to the issue. However a couple of things may be the cause:
I can only access the server via an IP -
http://82.147.xx.x/~xxxxxx/blog/admin
I can access the normal HTML section of the site using the same type of URL, where ~xxxx is the user name of the web server account.
Also, the db & user name has changed, although I've amended the serendipity_config.inc.php file.
Any suggestions as to how I can narrow down the issue ?
Thanks
David
Re: Problem Moving Servers
Posted: Wed Mar 24, 2010 2:02 pm
by kleinerChemiker
do you have a .htaccess in your root directory? If so, rename it and check if the server error changes to something else. If so, there is most likely some option in the .htaccess that your server doesn't support, maybe URL rewriting.
Re: Problem Moving Servers
Posted: Wed Mar 24, 2010 2:22 pm
by david@mediacopy
cheers. It looks like a wider problem where .php isn't executing in the 'blog' subfolder - I can't even get phpinfo to run.... I'll let you know how I get on.
Re: Problem Moving Servers
Posted: Wed Mar 24, 2010 7:38 pm
by david@mediacopy
Cheers - it was a htaccess problem. I identified that these were the commands blocking the folder (testing using phpinfo)
php_value session.use_trans_sid 0
php_value register_globals off
If these are commented out then I can run phpinfo.
however, if I now browse to /blog/admin I get a 404 error and if I call /blog/index.php I get:
Warning: Smarty error: unable to read resource: "404.tpl" in /home/xxxxxx/public_html/blog/bundled-libs/Smarty/libs/Smarty.class.php on line 1095
Not sure what to try next ?
The install I'm trying to move "Serendipity 1.2.1 on PHP 4.4.8" to the new server running PHP 5.2.12
Re: Problem Moving Servers
Posted: Wed Mar 24, 2010 9:55 pm
by garvinhicking
Hi!
The 404 error would happen because your Apache does not seem to support "AllowOverride" so that the .htaccess can set a "ErrorDocument 404" statement to support "pretty URLs". You might be able to set Serendipity configuration to use URLRewriting with "mod_rewrite", if your Apache supports that.
The Smarty error usually happens because either the templates_c/ directory is not writable, or if files in /templates/default/ are missing, or (most often) the "serendipityPath" configuration directive is not set to the new path on the new server.
HTH,
Garvin
Re: Problem Moving Servers
Posted: Wed Mar 24, 2010 10:29 pm
by kleinerChemiker
Isn't 404 forbidden? Then also wrong permissions could be the problem.
Re: Problem Moving Servers
Posted: Thu Mar 25, 2010 10:41 am
by david@mediacopy
Thanks for your help guys.
Because I can't log into the admin screen I'm struggling to see any more changes I can make to get it up and running.
I've amended the config.local file with the new db info and I've changed the base path in the actual db entry. I've looked for more path settings but can't see any.
Any hint's as to the steps I may take to fix it up ?
Re: Problem Moving Servers
Posted: Thu Mar 25, 2010 10:50 am
by garvinhicking
Hi!
You can use phpMyAdmin and do a database-wide search for the old serendipityPath. If onl your old server it was /home/www/bla.com/ and now its /var/www/bla.com/ you could then replace all occurences with the new string. In most cases this string should only occur in the serendipity_config and serendipity_plugins DB tables.
HTH,
Garvin
Re: Problem Moving Servers
Posted: Thu Mar 25, 2010 12:00 pm
by david@mediacopy
Cheers, thanks for your help, some progress made
I'd missed the serendipityPath setting, and had only changed the Base URL setting.
Thanks to some help from my server hosting support, we've tweaked the htaccess file and can get a semi functioning blog. However most of the links do not work and the photo's only display in odd cases.
At the moment I'm trying to get with to work on a server where the path is:
http://IP/~username/blog/
as I'm trying to get it to work before redirecting the DNS.
I can log to the admin, but clicking any of the options bumps me back to the admin login. Seems like it's 'close' but I must be missing something. I guess the unusual URL path is probably the issue and I wonder if it's best to wait and redirect the DNS before trying further ?
Thanks again
David
edits with progress

Re: Problem Moving Servers
Posted: Thu Mar 25, 2010 11:59 pm
by garvinhicking
Hi!
When you get "bumped back" this usually means that the new server's PHP session cookies might not be properly set. If you can, check a tool like LiveHTTPHeaders for Firefox to see if you get new session IDs everytime, and how exactly the cookie is set.
The baseURL you have entered must definitely be the one that you use to actually log into your blog currently...
HTH,
Garvin
Re: Problem Moving Servers
Posted: Fri Mar 26, 2010 10:08 am
by david@mediacopy
Looking at it, I'm guessing that some of the URLs are still not formatting correctly, so I'm going redirect the DNS and see how it goes when the URLs are 'real'.
In the mean time I'll grab the tool you mention and check out the cookies possibility.
Thanks again
David
Re: Problem Moving Servers
Posted: Thu Apr 01, 2010 11:10 am
by david@mediacopy
the problem is now resolved.
I redirected the DNS and reset the base URL settings in the db using 'MyAdmin'.
The .htaccess file needed a little tweak for our server.
It seems that the problems were actually caused by my trying to pre test the installation on a IP \ user account style url which was causing the URL rewrite to work incorrectly.
Thanks for you help on this
