Discussion: how to patch Joomla?

Joomla version 1.0 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Discussion: how to patch Joomla?

Post by Tonie » Wed Jan 25, 2006 7:16 pm

This thread is available for the discussion of the sticky thread 'How to patch Joomla?'. Praise, comment, editorial, new input. Just write it here, and the thread will be updated.
Last edited by Tonie on Wed Mar 01, 2006 8:49 pm, edited 1 time in total.

 
rjs
Joomla! Explorer
Joomla! Explorer
Posts: 459
Joined: Fri Jan 20, 2006 11:09 pm
Location: US-IL
Contact:

Re: Discussion: how to patch Joomla?

Post by rjs » Wed Jan 25, 2006 9:31 pm

Good work Tonie.
==
Best Regards, --rjs

Bassmus
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Feb 23, 2006 10:24 pm

Re: Discussion: how to patch Joomla?

Post by Bassmus » Tue Feb 28, 2006 9:32 am

Good work on the patching HOWTO!

But I have a question.  You write that the patch doesn't overwrite configuration.php.  Why then is configuration.php-dist in the compressed patch-file?  (Atleast the 1.0.7 to 1.0.8 patch)

And with that being said.  Why does the file name have "-dist" at the end to begin with?  When installing Joomla, I had to rename it to configuration.php to get Joomla to work.

I'm sorry for the n00b questions.  But I cannot hide what I am.  :-[

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Tue Feb 28, 2006 9:40 am

No worries. Normally, people don't need the configuration.php-dist file. This is only needed in circumstances where the installation wizard doesn't work. It was added now, because there are some new settings in configuration.php (which will automatically be added to your configuration.php file when you set them). You don't have to worry about this file when updating Joomla 1.0.x to Joomla 1.0.x, where x is the version numbers. I will update the FAQ with an explanation of the file.

Bassmus
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Feb 23, 2006 10:24 pm

Re: Discussion: how to patch Joomla?

Post by Bassmus » Tue Feb 28, 2006 9:54 am

Thanks alot for quick response.
Tonie wrote: No worries. Normally, people don't need the configuration.php-dist file. This is only needed in circumstances where the installation wizard doesn't work.
You're talking about the installation of Joomla now, I take it?  I remember I had to add some PHP-code to configuration.php-dist at the end of the Joomla installation, since the installation wizard neither found nor could write to the file by itself.  And Joomla only worked after I renamed the file manually from configuration.php-dist to configuration.php.  Therefore my previous question about the "-dist" surname. :)
Tonie wrote: It was added now, because there are some new settings in configuration.php (which will automatically be added to your configuration.php file when you set them). You don't have to worry about this file when updating Joomla 1.0.x to Joomla 1.0.x, where x is the version numbers. I will update the FAQ with an explanation of the file.
Do I need to do something about my 1.0.7 configuration-file when installing this new patch then?  And in that case, what about my own settings?  Should I just cut'n'paste the settings into the new file, and rename that one to configuration.php?

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Tue Feb 28, 2006 10:16 am

You don't need to do anything, new settings will automatically be set when you activate them in Global Configuration. For people patching, this file can be totally ignored.

cdplatt
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Feb 22, 2006 2:45 am

Re: Discussion: how to patch Joomla?

Post by cdplatt » Wed Mar 01, 2006 8:07 pm

Thank you.  Sure wish I'd read this before I fouled up my upgrade.  Well off to recover those backups... ;)

User avatar
Fiber Shark
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jul 01, 2006 5:52 am
Contact:

Re: Discussion: how to patch Joomla?

Post by Fiber Shark » Sat Jul 01, 2006 6:04 am

It wasn't until after I read your post that I felt confident enough to apply this patch.  ( in my case 1.0.8 to 1.0.10)  Thanks for your help.

Regards,

Jimmy Blevins
http://www.fibershark.com

Ry
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Fri Jan 20, 2006 10:09 pm

Re: Discussion: how to patch Joomla?

Post by Ry » Tue Jul 18, 2006 6:37 pm

Do I have to switich off my website during upgrading? (offline in admin panel, or something like that?)

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Wed Jul 19, 2006 10:57 am

This is done with this step, which is also mentioned in the procedure:

* It is advised to set your site offline for the duration of the patch. You can do this in the administrator backend, go to Global Configuration, and set 'Site offline' to 'Yes'.

maddunr
Joomla! Explorer
Joomla! Explorer
Posts: 312
Joined: Thu Oct 06, 2005 4:43 pm

Re: Discussion: how to patch Joomla?

Post by maddunr » Wed Aug 16, 2006 4:26 pm

Hi,

Due to a recent attempted crack scare, I had to upgrade all my websites to Joomla 1.0.10 (latest stable version, as of writing this). You article was very helpful in providing the steps needed to be taken in this process - thanks!

Since I found the parts about backing up and patching to be tedious, I thought I'd elaborate on it for other newbies like me :).

Doing the back up and patch with an FTP program like SmartFTP can be tedious and riddled with errors.. so, I turned to Unix commands instead. Of course, this applies to me only because we are hosted on a unix based dedicated server and have shell access. Also, please note that these commands are only to give you an idea.. please modify them according to your needs.

1. Backup folders using tar:
tar -cvzf filename.tar.gz administrator cache components editor help includes language mambots media modules templates
note that I am selectively backing up folders and omitting heavy folders like downloads, or images etc. since I usually have local copies of these anyways.

2. Backup files in the root directory using FTP (simpler)
For this I just create a folder called root_dir_files on my local disk and copy files from the joomla root directory over here.

3. Overwrite patch files
After downloading the appropriate patch archive (tar.gz in my case) from the forge, I upload the archive to the joomla root directory and rename it to something simple.. like Joomla.tar.gz and then use this command to patch overwrite.
tar --overwrite -xvzf  Joomla.tar.gz
Once again, please note that the above sequence is useful for me only because i usually have heavy images and downloads directories (> 500MB) and it is better to leave them out and tar folders selectively. This introduces the extra step of copying files from the joomla root.

Hope this helps...
-V

User avatar
celaine
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Tue Jul 04, 2006 1:50 am
Contact:

Re: Discussion: how to patch Joomla?

Post by celaine » Thu Aug 31, 2006 7:13 pm

I followed the patch instructions going from 08 to 11 but the version text in the bottom of my administrator screens has not changed.

maddunr
Joomla! Explorer
Joomla! Explorer
Posts: 312
Joined: Thu Oct 06, 2005 4:43 pm

Re: Discussion: how to patch Joomla?

Post by maddunr » Thu Aug 31, 2006 8:29 pm

celaine,

the Joomla gods might be able to help you if you provide more information :) - ie, what did you use to update / patch? what kind of hosting? etc.

that said, most ftp clients (like smartftp, cuteftp) have problems overwriting / uploading large quantities of files. i've had to go back several times and re-upload the files folder by folder (sometimes file by file). check the modified date on your files - that should tell you if the file is new or not. another reason is that you might not have sufficient permissions to overwrite. again, check the logs on your ftp program for such error messages.

the best way to do this is to extract the patch files online. most shared hosting providers offer a File Manager with their cpanel which has a neat feature that can extract files.

hope this helps,
-V

User avatar
celaine
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Tue Jul 04, 2006 1:50 am
Contact:

Re: Discussion: how to patch Joomla?

Post by celaine » Thu Aug 31, 2006 11:10 pm

Thanks...my host is doteasy.com (ultra package). I am uploading with filezilla and ws_ftp.

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Fri Sep 01, 2006 7:46 am

It indeed means the patch didn't go as planned. Did you take your site offline before starting the patch?

One of the files (always) in a patch is /include/version.php. This file has the version in it, so if your site still says 1.0.8, you will know this file (and probably others) hasn't been overwritten.

cfportaluser
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Aug 16, 2006 6:38 pm

Re: Discussion: how to patch Joomla?

Post by cfportaluser » Sun Sep 03, 2006 8:22 pm

I've read the patch instructions but when I look into the administrator/components directory on my hosted server i have more directories than the patch and simply to overwrite the directories would eliminate my installed componet files. Then even withing a directory there may be more files on the server than in the patch directory. For instance on my server the administrator/components/com_admin directory has the following files:

admin.admin.html.php
admin.admin.php
index.html
toolbar.admin.html.php
toolbar.admin.php

where as the equivalent patch folder has only the first two.

If I copied over the directory "adminstrator" as is I would lose many files. Should one examine each directory and copy the files individually?

Thanks

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Sun Sep 03, 2006 9:23 pm

The patch only overwrites the files in the patch, it leaves all other files. This includes files that do not need to be patched or installed components/modules/mambots. The only exception to this is if a components hacks core files, there are not too many of these components.

cfportaluser
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Aug 16, 2006 6:38 pm

Re: Discussion: how to patch Joomla?

Post by cfportaluser » Sun Sep 03, 2006 9:42 pm

Tonie wrote: The patch only overwrites the files in the patch, it leaves all other files. This includes files that do not need to be patched or installed components/modules/mambots. The only exception to this is if a components hacks core files, there are not too many of these components.
Thanks for your quick answer. I'm a bit confused however as the instruction state that one is to replace the files with an FTP application. Is there another way to apply the patch that uses a script to replace only the correct files?

Thanks again.

User avatar
celaine
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Tue Jul 04, 2006 1:50 am
Contact:

Re: Discussion: how to patch Joomla?

Post by celaine » Mon Sep 04, 2006 2:34 am

Tonie wrote: It indeed means the patch didn't go as planned. Did you take your site offline before starting the patch?

One of the files (always) in a patch is /include/version.php. This file has the version in it, so if your site still says 1.0.8, you will know this file (and probably others) hasn't been overwritten.
I did take the site offline. I tried reinstalling all the patch files, one by one. Now I get a blank screen for both the main site and the administrator login page. I am totally at a loss, and regretting having attempted this...not sure what to try next?

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Mon Sep 04, 2006 8:19 pm

What 3rd party components do you have running on your site?

User avatar
ellygray
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Apr 19, 2006 12:38 pm
Location: London

Re: Discussion: how to patch Joomla?

Post by ellygray » Mon Sep 04, 2006 8:32 pm

I have 100 joomla databases that I have designed for clients in the last year and have to upgrade them all.  They are all different versions of Joomla, with different modules and components.  Many of them are just brochure sites but some have components with altered code.  They guy that used to do our support has left ..... any ideas on an upgrade program or anyone that might want to help; with this!

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Tue Sep 05, 2006 5:46 am

This is a big job, lots of manual work as far as I can see. I would create a list with Joomla and 3rd party extensions and all version numbers. With this tool you can find files that changed after a default install, might help you with the sites who have core hacks in default Joomla.

User avatar
ellygray
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Apr 19, 2006 12:38 pm
Location: London

Re: Discussion: how to patch Joomla?

Post by ellygray » Tue Sep 05, 2006 9:10 am

clearly why you are a Joomla! Hero!  Thanks Tonie, I am not a technical person and have no doubt I will be in the forum's looking for help on a regular basis with this (our technical guy left us in the lurch). 

Do you think that it is ok that the sites are not on a dedicated server?  we are hosted on a reseller 4 program with buyhttp who I find incredibly helpful and their interface easy to use?  I am told that if I had a dedicated server I would have shell access but I am not sure that that is a help there? 

The sites are backed up daily by them - with that in mind - I wonder if I need to take another back up before each upgrade?  Or should I get someone to do this upgrade that knows what they are doing more? 

I have done one brochure so far which has now worked out fine - I did actually start with the error that I found in one of your other forums - that was resolved by reapplying the upgrade as you advised (I am using SmartFTP that sometimes misbehaves on file transfers and permissions).

As they are live customer sites I want to be careful to not upset them, but it has to be done for security.

:'(

User avatar
dmcole
Joomla! Intern
Joomla! Intern
Posts: 92
Joined: Wed Aug 17, 2005 10:50 pm

Re: Discussion: how to patch Joomla?

Post by dmcole » Tue Sep 05, 2006 3:50 pm

ellygray wrote: The sites are backed up daily by them - with that in mind - I wonder if I need to take another back up before each upgrade?  Or should I get someone to do this upgrade that knows what they are doing more? 
Here's a hosting "gotcha" that got me recently.  One of my clients had picked a hosting company before they picked me and it was a company I hadn't done business with. These guys said they backed up the site  daily -- but what they  meant was that they backed up the *text* files, not the SQL database. The only way I'd get an SQL backup was to run it myself.. You should probably clarify this point with your ISP.

\dmc

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: Discussion: how to patch Joomla?

Post by Tonie » Tue Sep 05, 2006 5:09 pm

I would take the responsibility for backup yourself, especially before upgrading. Too many people have lost their sites because a few disks crashed and the backup procedure in place wasn't working somehow.

User avatar
celaine
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Tue Jul 04, 2006 1:50 am
Contact:

Re: Discussion: how to patch Joomla?

Post by celaine » Tue Sep 05, 2006 7:35 pm

In the end, I decided to just install the full version and then import my old sql data. I had to reinstall extensions, but several needed upgrading anyway. Seems to be working out, though it was a bit more time consuming than I would have liked. We've had several problems with hackers on this site, so hopefully, this might keep them at bay for a while.

sanjiovani
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Mon Apr 10, 2006 12:32 am

Re: Discussion: upgrading with custom changes to joomla

Post by sanjiovani » Mon Sep 11, 2006 3:49 pm

i am currently upgrading from 1.0.8 to 1.0.11.
i am uploading the patch files to my root folder

i am upgrading folder by folder (admin, components, etc)
Considering that I have added components and made changes to various files - by upgrading will I not lose all the custom changes i made

maddunr
Joomla! Explorer
Joomla! Explorer
Posts: 312
Joined: Thu Oct 06, 2005 4:43 pm

Re: Discussion: how to patch Joomla?

Post by maddunr » Mon Sep 11, 2006 3:56 pm

sanjiovani,

make sure you backup everything *before* you apply a patch. once the patch is complete, then you go back and restore and custom changes you've made to the core components. patches do not affect any 3PD components you may have installed and / or modified.

- V

ps: any particular reason you are going folder by folder? if you are on a shared host, most web host provide you with a File Manager that has a nifty little feature to extract files. so, just upload the patch (tar.gz or zip) and extract in one go.

drb06
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Thu Apr 27, 2006 2:54 am

Re: Discussion: how to patch Joomla?

Post by drb06 » Mon Sep 11, 2006 8:47 pm

can somebody please help me out?

I tried to backup my joomla files (108) for patching to 1011.
I am using FTP engine (CuteFTP),  when downloading files from hosted server, it quits half way through especially at components folder and says insufficient privileges.
STATUS:>  [9/11/2006 4:43:28 PM] Downloading file /home/user/forum/main/components/com_jd-wp/wp-content/cache/d41d8cd98f00b204e9800998ecf8427e/options/580d7f6286878271f57956ac2bd9b688.php...
ERROR:>  [9/11/2006 4:43:28 PM] Insufficient privileges to perform the operation.
ERROR:>  [9/11/2006 4:43:28 PM] Server returned error.
STATUS:>  [9/11/2006 4:43:28 PM] SFTP21 connection closed.
STATUS:>  [9/11/2006 4:43:28 PM] Waiting 30 seconds...


can somebody help me out?

thanks

maddunr
Joomla! Explorer
Joomla! Explorer
Posts: 312
Joined: Thu Oct 06, 2005 4:43 pm

Re: Discussion: how to patch Joomla?

Post by maddunr » Mon Sep 11, 2006 11:41 pm

drb06,

not really sure if my answer can help you out.. but maybe it will help you ask the right questions...

the problem seems to be of ownership. ie, some components add their files with "apache" as the owner. however, you logon using FTP as your FTP_user (whatever the username you see on your ftp program). sometimes, folders / files created by apache cannot be opened / read by the ftp_user.

what kind of hosting do you use? i have stated above that some shared hosting (like ipower) provide a File Manager that lets you compress / extract files or folder (zip or tar format). sometimes, they also provide a "backup" function that will let you back up all your files in one go.

hope that helps.. good luck!
-V

 

Locked

Return to “Upgrading - 1.0.x”