Page 1 of 1
Is there a Update mode to close Blog for update ?
Posted: Thu Nov 01, 2012 3:25 pm
by BerlinOS
Hi, i want to update Serendipity for a friend.
He has hundreds of visitors the day and i wonder if there will be a problem when i upload the updated files to the server and someone visits the page (and starts the update process until not all files have been tranfered to the server). Is there a way to close the blog for the update period so noone can start the update by mistake ?
Thank you for any help,
Oliver - using actually SerĀ“ 1.5.5 on PHP 5.2.17
Re: Is there a Update mode to close Blog for update ?
Posted: Thu Nov 01, 2012 3:51 pm
by Timbalu
There is an old solution for that using the htaccess file. I don't have the link by hand, so you have to search for yourself in the serendipity documentary.
On the other hand, my Proof of Concept Dashboard plugin does support a Serendipity Maintenance Mode (see
https://github.com/ophian/serendipity_event_dashboard)
Re: Is there a Update mode to close Blog for update ?
Posted: Thu Nov 01, 2012 4:59 pm
by Don Chambers
I temporarily rename the existing .htaccess file to something else. I then replace it with this .htaccess file (change install folder and ip address as needed):
Code: Select all
RewriteEngine On
# Install Folder
RewriteBase /
# Allow access by IP address
RewriteCond %{REMOTE_HOST} !^your.ip.address.here
# Don't loop forever - ie not already the page about to be redirected to
RewriteCond %{REQUEST_URI} !^503\.php [NC]
RewriteRule .* 503.php [L]
That will redirect everyone other than you to a 503.php file - which you have to create. Here is what that file looks like:
Code: Select all
<?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>503 Service Temporarily Unavailable</title>
<style>
body {
font: 100.01% Verdana, Arial, Helvetica, sans-serif;
text-align: center;
}
#wrapper {
width: 800px;
margin: 20px auto;
padding:0;
border:0;
font-size: 80%;
}
h1 {
color: #CC0000;
font-size: 1.4em;
}
#message p{
text-align: left;
}
#message p.image {
text-align:center;
}
#message img {
border:0;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="banner">
<h1>503 Service Temporarily Unavailable</h1>
</div>
<div id="message">
<p>This website is temporarily unavailable due to site maintenance and upgrades currently in progress. We apologize for the inconvenience. Please come back soon.</p>
</div>
</div>
</body>
</html>
Once you execute the upgrade, simply delete/rename the temporary .htaccess file, and replace it with the original.
Ian's plugin is probably a great option if you do not want to mess with all this htaccess stuff.
Re: Is there a Update mode to close Blog for update ?
Posted: Thu Nov 01, 2012 11:50 pm
by BerlinOS
Dear Don an Timbalu,
i will go for the plugin solution first
I get back to you if i run in questions. Thank you so far!
Re: Is there a Update mode to close Blog for update ?
Posted: Fri Nov 02, 2012 12:16 am
by BerlinOS
Dear Timbalu,
i uploaded your plugin but it says i need version 1.6.
Sadly seems i can not use it.
Re: Is there a Update mode to close Blog for update ?
Posted: Fri Nov 02, 2012 1:03 am
by BerlinOS
I have now uploaded all files to the server (the new Serendipity version) and visited the admin area at
http://www.mypage/blog/serendipity_admin.php
But there is no updater, it welcomes me with the normal admin start page.
What can be wrong, i have transfered all files (no errors occured and the "Check Installation" says "everythin is checked".
I still have the 1.5.5 version info on the bottom of the admin page so the update did not perform so far.
What can be wrong ?
ps: i did not the htaccess changes (i am a dummy)
Re: Is there a Update mode to close Blog for update ?
Posted: Fri Nov 02, 2012 9:21 am
by Timbalu
BerlinOS wrote:i uploaded your plugin but it says i need version 1.6.
Sadly seems i can not use it.
Opps, yes! I should have remembered that. Sorry!
Try and clean-up all compiled template files in templates_c/ or use CTRL (+ R) + F5 to force reloading the browser cache.
Re: Is there a Update mode to close Blog for update ?
Posted: Fri Nov 02, 2012 7:43 pm
by BerlinOS
Dear Timbalu,
you mean to delete all files in the templates_c/ folder on the server ?
There are about 40 files, some are more than a year old.
I cleaned the cache and reloaded the admin page, still no updater.
Re: Is there a Update mode to close Blog for update ?
Posted: Fri Nov 02, 2012 9:11 pm
by Don Chambers
BerlinOS wrote:.... i have transfered all files (no errors occured and the "Check Installation" says "everythin is checked".
If you are running 1.5.5, and an integrity check says everything is ok, I question where you actually transferred the files to. Is it possible you didn't overwrite the original files, but transferred them into a different folder?
Re: Is there a Update mode to close Blog for update ?
Posted: Sat Nov 03, 2012 1:08 am
by BerlinOS
I have checked but i uploaded the files to the folder that is online, all files have a "changed yesterday" date.
I still have the files in the folder templates_c (some older than a year) - should i delete them all ? A cache cleaning and reload has not started the update process.
Re: Is there a Update mode to close Blog for update ?
Posted: Sat Nov 03, 2012 9:01 am
by Timbalu
Yes cleaning the compiled templates in templates_c/ will do not harm other than to force smarty to recompile all its template files again on demand. But I second Don. Its seems you uploaded to somewhere else, as the integrity check should notice changed core file (and there are a lot between 1.5 and 1.6). If that doesn't happen, there are two possibilities: you did upload the same version again or upload to somewhere else.
Edit: Well actually there is a third possibility. You are using a development (alpha) version, which can't verify against integrity check.