Moved server - and Serendipity stopped working

Having trouble installing serendipity?
Post Reply
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Moved server - and Serendipity stopped working

Post by mikkel_h »

Hi.

I have moved my site to a new webhost, but Serendipity did not like that - I got all kinds of errors, so I decided to delete all the files on the new host, do a clean install (Serendipity 1.5 beta1) and then restore all entries and comments from a database backup.

However, my page is still not working. If you look at http://www.mzh.dk/blog/, all you see is "Warning: Smarty error: unable to read resource: "404.tpl" in /home/www/mzh.dk/blog/bundled-libs/Smarty/libs/Smarty.class.php on line 1093"

I can access the admin module, but it looks a little amputated (it seems as if no css is being loaded, and there are no graphics), but the basic functionality is there.

So, I go to the configuration page and double check that all the paths are correct - and they are, except that the url for my blog says "http://mzh.dk/blog/", i.e. without "www". However, when I change it and press Check & Save, I get this:

"Warning: fopen(/www/mzh.dk/blog/serendipity_config_local.inc.php) [function.fopen]: failed to open stream: No such file or directory in /home/www/mzh.dk/blog/include/functions_installer.inc.php on line 72"

I have checked, and the file is there - and I have even CHMOD'ed it to 777, but I still get the same error.

When I go to see my media library, I get a similar error:

"Cannot write to folder /www/mzh.dk/blog/templates_c. Check file rights.
Warning: Smarty error: unable to read resource: "admin/media_pane.tpl" in /home/www/mzh.dk/blog/bundled-libs/Smarty/libs/Smarty.class.php on line 1093"

Again, templates_c is CHMOD'ed to 777.

When I look in my FTP program (FileZilla), it says "1652 1652" in the "Owner/group" column - is this significant ...?

Please help - I'm going nuts!
wbh-a
Regular
Posts: 9
Joined: Sun Oct 04, 2009 7:24 pm
Location: Potsdam, DE

Re: Moved server - and Serendipity stopped working

Post by wbh-a »

Hello,

looks like you are missing the .htaccess in your serendipity directory.
Cheers
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Moved server - and Serendipity stopped working

Post by mikkel_h »

wbh-a wrote:looks like you are missing the .htaccess in your serendipity directory.
Nope - it's there. Here are the contents:

Code: Select all

# BEGIN s9y
ErrorDocument 404 /blog/index.php
DirectoryIndex /blog/index.php

RewriteEngine On
RewriteBase /blog/
RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA]
RewriteRule ^((archives/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.html)/?) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^comments/(.*) index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css)$ index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
#RewriteCond %{REQUEST_URI} !-U
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]

<Files *.tpl.php>
    deny from all
</Files>

<Files *.tpl>
    deny from all
</Files>

<Files *.sql>
    deny from all
</Files>

<Files *.inc.php>
    deny from all
</Files>

<Files *.db>
    deny from all
</Files>

# END s9y
wbh-a
Regular
Posts: 9
Joined: Sun Oct 04, 2009 7:24 pm
Location: Potsdam, DE

Re: Moved server - and Serendipity stopped working

Post by wbh-a »

Is this the auto-generated version, or die you copy it from your former installation?
Cheers
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Moved server - and Serendipity stopped working

Post by mikkel_h »

wbh-a wrote:Is this the auto-generated version, or die you copy it from your former installation?
I'm pretty sure it is the auto-generated one - but is there any way I can auto-generate a new one to make sure?

I could then try to delete the one I have and then auto-generate a new one.
wbh-a
Regular
Posts: 9
Joined: Sun Oct 04, 2009 7:24 pm
Location: Potsdam, DE

Re: Moved server - and Serendipity stopped working

Post by wbh-a »

Where does Smarty look for its templates?
Cheers
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Moved server - and Serendipity stopped working

Post by mikkel_h »

wbh-a wrote:Where does Smarty look for its templates?
Honestly - I have no idea! How can I check?
wbh-a
Regular
Posts: 9
Joined: Sun Oct 04, 2009 7:24 pm
Location: Potsdam, DE

Re: Moved server - and Serendipity stopped working

Post by wbh-a »

mikkel_h wrote:"Warning: fopen(/www/mzh.dk/blog/serendipity_config_local.inc.php) [function.fopen]: failed to open stream: No such file or directory in /home/www/mzh.dk/blog/include/functions_installer.inc.php on line 72"
Which database backend are you using?

Please check:

Code: Select all

SELECT value FROM serendipity_config WHERE name = 'serendipityPath'
Cheers
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Moved server - and Serendipity stopped working

Post by mikkel_h »

wbh-a wrote:Which database backend are you using?
MySQL
Please check:

Code: Select all

SELECT value FROM serendipity_config WHERE name = 'serendipityPath'
/www/mzh.dk/blog/
wbh-a
Regular
Posts: 9
Joined: Sun Oct 04, 2009 7:24 pm
Location: Potsdam, DE

Re: Moved server - and Serendipity stopped working

Post by wbh-a »

mikkel_h wrote:
wbh-a wrote:Which database backend are you using?
MySQL
Please check:

Code: Select all

SELECT value FROM serendipity_config WHERE name = 'serendipityPath'
/www/mzh.dk/blog/
OK, try this:

Code: Select all

UPDATE serendipity_config SET value = '/home/www/mzh.dk/blog/' WHERE name = 'serendipityPath' AND value = '/www/mzh.dk/blog/'
Cheers
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Moved server - and Serendipity stopped working

Post by mikkel_h »

wbh-a wrote:OK, try this:

Code: Select all

UPDATE serendipity_config SET value = '/home/www/mzh.dk/blog/' WHERE name = 'serendipityPath' AND value = '/www/mzh.dk/blog/'
I think you are a genius - that seemed to work!!!

Now, at least, my administration page has css styles and graphics again, and my blog has content!

Still, check http://www.mzh.dk/blog again and you will see some errors and warnings from Smarty. I am pretty sure I can handle those myself, though, as I think I just need to add the "/home" to the server path in the Smarty templates too.

Will let you know the outcome.
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Moved server - and Serendipity stopped working

Post by mikkel_h »

mikkel_h wrote:Will let you know the outcome.
You are indeed a genious - everything is working now (except, that is, for the fact that I can't make my new host parse files with an html ending as php, but that is an entirely different matter!).

Thank you so much for your help!
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Moved server - and Serendipity stopped working

Post by Don Chambers »

@ wbh-a - great job of assisting another s9y user! Hope you continue to share your expertise with the s9y community!!!
=Don=
Post Reply