Community Forums

Development Forum

using patcher from localhost


You must be signed-in to post.

AuthorSubject
 
Page: 1
vegard

Avatar for vegard
Subject: using patcher from localhostQuote this post in your reply
this might be more of a local server question than ATutor question, but I cannot install patches on my local install of ATutor as I get this message:

Error: Cannot connect to patch server: update.atutor.ca

..and then cannot use the patcher to upload local patches either. any idea on how to get ATutor to bypass this check, or any idea to get my localhost to connect to the patch server?
Posted: 2008-10-08 06:38:55
IndieRect

Avatar for IndieRect
Subject: Re: using patcher from localhostQuote this post in your reply
I have a similar situation with my home test server. It's on a virtual machine, and has no external connections.

I personally solved it by disabling several lines in mods/_standard/patcher/classes/Patch.class.php .
In applyPatch() function, you can comment out lines calling pingDomain, checkDependentPatches (this one may be extra though) and hasFilesModified.
I'm installing any patches manually anyway, so the loss of depedency and modification checks wasn't a big problem to me.

There's also been a similar discussion here: www.atutor.ca/view/7/14559/1.html .
Posted: 2008-10-08 07:01:48
IndieRect

Avatar for IndieRect
Subject: Re: using patcher from localhostQuote this post in your reply
And comment out lines 60 through 68 in mods/_standard/patcher/index_admin.php, plus assigning FALSE to $patch_list_xml on line 73.

Something like that, as I don't have access to my home installation right now.
Posted: 2008-10-08 07:11:10
vegard

Avatar for vegard
Subject: Re: using patcher from localhostQuote this post in your reply
thanks Indie, I got it solved! for reference, these are the lines I commented out:

in mods/_standard/patcher/classes/Patch.class.php:

if (!$this->pingDomain($this->svn_tag_folder)) return false;

if (!$this->checkDependentPatches()) return false;

if (!$this->skipFilesModified && $this->hasFilesModified()) return false;


and in mods/_standard/patcher/index_admin.php:


$update_server = "update.atutor.ca";
$connection_test_file = "http://" . $update_server . '/index.php';
$connection = @file_get_contents($connection_test_file);

if (!$connection)
{
print '<span style="color: red"><b>Error: Cannot connect to patch server: '. $update_server . '</b></span>';
exit;
}
Posted: 2008-10-08 08:31:19
IndieRect

Avatar for IndieRect
Subject: Re: using patcher from localhostQuote this post in your reply
Nice to hear.
I did think you'd have to alter $patch_list_xml, but if you didn't and it worked, good for you.
Posted: 2008-10-08 08:35:50
vegard

Avatar for vegard
Subject: Re: using patcher from localhostQuote this post in your reply
oh, I actually forgot that, but it wasn't neccessary: the changes above are all I did smile
Posted: 2008-10-08 08:42:37
vegard

Avatar for vegard
Subject: Re: using patcher from localhostQuote this post in your reply
I see you tried to change this for 1.6.2:

www.atutor.ca/atutor/mantis/view.php?id=3591

(thanks BTW!)

..but tested on my localhost (rev. 8041), and while you do see the list of patches and the patch upload box now, you are still unable to upload a new patch. when trying you are presented with the error message that you cannot connect to patcher server, and you are not able to continue from there.
Posted: 2008-10-13 03:53:09
 
Page: 1

You must be signed-in to post.

Related Articles