OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Failed to apply patch

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Failed to apply patch

Postby Owen » Thu Dec 13, 2007 4:21 pm

I've run
php tools/upgrade.php patch
and it downloads fine but I get the message "Failed to apply patch". No more info supplied. . .

Windows XP, upgrade 2.1.1 -> 2.2
Owen
 
Posts: 44
Joined: Mon Nov 05, 2007 8:07 pm

Re: Failed to apply patch

Postby asmecher » Thu Dec 13, 2007 6:47 pm

Hi Owen,

That's probably because the patch tool is not installed on your server. Google "GNU patch windows" and you should find a download site for this. The downloaded patch should still be in the installation directory, so you can apply it from there using the patch tool. (If the patch filename ends in .gz, you may need to unzip it first.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Failed to apply patch

Postby Owen » Thu Dec 13, 2007 7:12 pm

OK, added patch.exe to /Windows and got a bit further.

Now fails with
patching file cache/fc-help/toc-en-US-editorial.toc.00000.php
Error: failed to apply patch

The update file seems to not be a .gz one (at least, that's what I find in the ojs folder); I assume it's expanded automatically after download.
Owen
 
Posts: 44
Joined: Mon Nov 05, 2007 8:07 pm

Re: Failed to apply patch

Postby asmecher » Thu Dec 13, 2007 7:29 pm

Hi Owen,

Try patching the installation manually, i.e. by running the patch tool directly. I'd suggest using the --dry-run option to test the patch before you actually apply it. If you get a segmentation fault or similar error when running the patch tool directly, you may need to convert the line endings in the patch file -- to do this, open it in Notepad and save the file again. (This is a bug in the patch tool.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Failed to apply patch

Postby Owen » Thu Dec 13, 2007 8:24 pm

Converted the patch to CRLF then it ran fine.

Everything is now running fine as 2.2 but I'd suggest a few things in the upgrade dox, aimed at Windows users:
1. to put patch.exe in the Windows directory if it's not there already
2. to convert the patch to CRLF

Also, it's a bit confusing about the database conversion: running the web page once you've fiddled with the config.inc.php settings is fine, but it seems to suggest in the subsequent web page that this applies to converting the static pages as well.

Ta!
Owen
 
Posts: 44
Joined: Mon Nov 05, 2007 8:07 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests