Click to See Complete Forum and Search --> : How to apply patches using *.diff files?


vinit005
December 20th, 2008, 01:16 AM
Hi,

I've a patch (.diff) file and file that needs to be patched. But the problem is I'm unable to patch it successfully. I've tried patching through command prompt and also manually.

Can anyone suggest me a easy way to patch the file successfully.

Here are the contents of patch file -


Index: include/sessions.php
===================================================================
RCS file: /usr/local/cvsroot/eshop/include/sessions.php,v
retrieving revision 1.62.2.30
diff -u -r1.62.2.30 sessions.php
--- include/sessions.php 28 Jul 2008 10:49:04 -0000 1.62.2.30
+++ include/sessions.php 16 Sep 2008 07:49:44 -0000
@@ -283,6 +283,7 @@
x_session_register("_saved_session_fg", x_session_get_fg());
$_saved_session_fg = x_session_get_fg();

+ func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", "", 0);
func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_https_host, 0);
func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_http_host, 0);

@@ -343,6 +344,7 @@

$XCART_SESSION_EXPIRY = $expiry_time;
$XCARTSESSID = $sessid;
+ func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", "", 0);
func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_https_host, 0);
func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_http_host, 0);
}


Thanks in advance,
Vinit....[:)]