My hosting provider (GoDaddy) just updated their PHP version. Now my front-end blog works, but admin login fails. (RSS also fails.)
I'm running a very old version of S9Y 1.x with some custom patches. I'd like to do a rapid update to the latest version. (And I don't have shell access, so everything is done via FTP and php scripts.)
I am wondering if I can do a rapid update to the current version. (I'm backing up the server now...)
Will this work:
1. Unpack: serendipity-1.6.2-lite.tar.gz
This will dump all new files under ./serendipity/
2. Copy over my templates, serendipity_config.inc.php, and .htaccess
3. Rename ./blog/ ./blog-old/
Rename ./serendipity/ ./blog/
Will this work? Is there anything else needed?
(After it is running, I can go back in and apply all of my custom logging/security patches.)
Rapid update?
Re: Rapid update?
First, is it the GoDaddy provided Serendipity version? We can't support this, as they might have changed things, which we do not really know.nealk wrote:1. Unpack: serendipity-1.6.2-lite.tar.gz
2. Copy over my templates, serendipity_config.inc.php, and .htaccess
3. Rename ./blog/ ./blog-old/ and Rename ./serendipity/ ./blog/
The error in backend access could also happen to you, as the MD5 scramble changed some time ago. You might need a script to rewrite your admin password via script which can be found in this forum (search for "fixlogin" or "fixlogin.php"). Perhaps they also updated Serendipity and that is why you can't access your backend..? Ask them first.
FTP is OK, no shell access really needed.
[1. (If you change the path you might also need access to the database via PhpMyAdmin or similar, to convert all old path strings at least in tables YOURPREFIX_config and YOURPREFIX_entries.)
(2. (You can also just copy all new files to the old installation via ftp, if you remember what kind of custom changes to core you have done over the time...)]
Don't take the lite version, then.
Do not copy serendipity_config.inc.php, take the serendipity_config_local.inc.php.
I would try it, while, as you said, you have a backup in /blog-old/..., if you stick to old path and old database and take a fresh copy with your additions...
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Rapid update?
I tried doing this on a test system that is configured the same way as the server. It fails with a blank page.
The steps I did:
1. Backup everything and move old ./blog/ to ./blog-old/
2. Unpack serendipity-1.6.2.tar.gz
3. Copy over serendipity_config_local.inc.php
Manually validated that the user/password are valid AND the database exists (I did a MySQL export from GoDaddy and import into my own MySQL server). PhpMyAdmin says everything looks correct.
4. Changed in database s_config serendipityPath since the path differs from GoDaddy's configuration.
5. Made sure everything in my testbed ./blog/ was permission 777.
6. Went to /blog/serendipity_admin.php and saw a message that I must update. (GOOD!)
Clicked on the update button.
Got back a blank page.
Now everything is blank. I am unable to recover.
I'm suspecting that there is a fatal error somewhere. How do I enable debugging to find out what is broken? How do I tell if the migration was even successful?
The steps I did:
1. Backup everything and move old ./blog/ to ./blog-old/
2. Unpack serendipity-1.6.2.tar.gz
3. Copy over serendipity_config_local.inc.php
Manually validated that the user/password are valid AND the database exists (I did a MySQL export from GoDaddy and import into my own MySQL server). PhpMyAdmin says everything looks correct.
4. Changed in database s_config serendipityPath since the path differs from GoDaddy's configuration.
5. Made sure everything in my testbed ./blog/ was permission 777.
6. Went to /blog/serendipity_admin.php and saw a message that I must update. (GOOD!)
Clicked on the update button.
Got back a blank page.
Now everything is blank. I am unable to recover.
I'm suspecting that there is a fatal error somewhere. How do I enable debugging to find out what is broken? How do I tell if the migration was even successful?
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Rapid update?
Ian's suggestions are good. I just checked one of my sites hosted on godaddy, and it is running fine. My php version there is 5.2.17. This is not one of their one click installations, I installed it myself years ago using FTP. If I recall, godaddy's one-click install of s9y was not a modified copy, it just didn't allow you direct access to the database and was not always the latest version of s9y.
=Don=
Re: Rapid update?
Did you copy the .htaccess (Edit: what about path settings in there?) and your template, also?
Can you get access to the server logs?
White page always means some fatal error, so you should find the issue in the logs.
You else could make a dump of s_config and s_entries and edit all path you can find manually
Can you get access to the server logs?
White page always means some fatal error, so you should find the issue in the logs.
You else could make a dump of s_config and s_entries and edit all path you can find manually
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Rapid update?
Still working on it.
Good news: NO php in ~/public_html/ is working. So the problem is in my server configuration. (I want to test it on a non-production system before trying it in real life. Looks like my server is the problem.) I'll let you know how it goes after I figure out why PHP isn't working on public_html but does work in /.
I view this as good news since it certainly isn't an s9y problem yet.![Smile :-)](./images/smilies/icon_smile.gif)
Good news: NO php in ~/public_html/ is working. So the problem is in my server configuration. (I want to test it on a non-production system before trying it in real life. Looks like my server is the problem.) I'll let you know how it goes after I figure out why PHP isn't working on public_html but does work in /.
I view this as good news since it certainly isn't an s9y problem yet.
![Smile :-)](./images/smilies/icon_smile.gif)
Re: Rapid update?
BINGO! Update worked perfectly after I got PHP enabled.
I'm going to reset the testbed and do it one more time, then update production.
Thanks for the help!
I'm going to reset the testbed and do it one more time, then update production.
Thanks for the help!
Re: Rapid update?
Final update: Just patched the live system in under 20 seconds. Wow -- that was painless!
I automated most of it in a PHP script:
My patches are just to do more robust HTTP filtering and logging (since GoDaddy charges extra if I want log access).
After running this script, I just needed to:
1. Move directories:
mv blog blog.old
mv serendipity blog
2. Go to my admin page once time and accept the updates.
That's it. Everything else worked right out of the box.
You guys and S9Y rocks. Thank you!
I automated most of it in a PHP script:
Code: Select all
<?php
echo "<pre>";
echo "Unpacking\n";
system("tar -xzvf serendipity-1.6.2.tar.gz");
system("cp blog/.htaccess serendipity/");
echo "Copying\n";
system("cp -vr blog/serendipity_config_local.inc.php serendipity/");
system("cp -vr blog/templates/nealk serendipity/templates/");
echo "Patching Admin\n";
system("cp serendipity/serendipity_admin.php serendipity/serendipity_admin.php.bak");
system("(cat patch-admin.php serendipity/serendipity_admin.php.bak) > serendipity/serendipity_admin.php");
echo "Patching Index\n";
system("cp serendipity/index.php serendipity/index.php.bak");
system("(cat patch-index.php serendipity/index.php.bak) > serendipity/index.php");
echo "Patching RSS\n";
system("cp serendipity/rss.php serendipity/rss.php.bak");
system("(cat patch-rss.php serendipity/rss.php.bak) > serendipity/rss.php");
echo "Done!\n";
echo "</pre>";
?>
After running this script, I just needed to:
1. Move directories:
mv blog blog.old
mv serendipity blog
2. Go to my admin page once time and accept the updates.
That's it. Everything else worked right out of the box.
You guys and S9Y rocks. Thank you!
Re: Rapid update?
Fine!
PS. Does (system cat file > file) work well, when the new file has changed and you push your changes of the old one in?
![Smile :)](./images/smilies/icon_smile.gif)
PS. Does (system cat file > file) work well, when the new file has changed and you push your changes of the old one in?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Rapid update?
Yes. My patch is just PHP code that I place before the original file.Timbalu wrote:PS. Does (system cat file > file) work well, when the new file has changed and you push your changes of the old one in?
<?php
check for stuff
?>
<?php the original file...
?>
PHP doesn't mind having multiple PHP blocks of code. There isn't even an extra \n or anything.
Serendipity's validation check identifies the tampering. But since the code still executes, this isn't a problem. (I should look up how to recompute the validation checksums... But that's a low priority.)