{"id":3629,"date":"2015-10-12T12:04:27","date_gmt":"2015-10-12T11:04:27","guid":{"rendered":"https:\/\/blog.ed.gs\/?p=3629"},"modified":"2015-10-12T12:04:27","modified_gmt":"2015-10-12T11:04:27","slug":"update-joomla-2-using-proxy","status":"publish","type":"post","link":"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/","title":{"rendered":"Update Joomla 2 Using Proxy"},"content":{"rendered":"

Joomla 2 and below don’t support proxies by default, unfortunately you have to hack the code and remove some files for it to work.<\/p>\n

Firstly we need to edit the curl transport file and give it the proxy address. To do this we open libraries\/joomla\/http\/transport\/curl.php and look for the following:<\/p>\n

// If an explicit timeout is given user it.\nif (isset($timeout))\n{\n        $options[CURLOPT_TIMEOUT] = (int) $timeout;\n        $options[CURLOPT_CONNECTTIMEOUT] = (int) $timeout;\n}<\/pre>\n

After that section add the following on a new line, changing the values for the proxy as needed:<\/p>\n

$proxy = '10.56.4.1:3128';\ncurl_setopt($ch, CURLOPT_PROXY, $proxy);<\/pre>\n

Finally we need to delete the other transport types so it will forcibly use curl with our proxy:<\/p>\n

rm libraries/joomla/http/transport/stream.php\nrm libraries/joomla/http/transport/socket.php<\/pre>\n

Renaming these files didn’t seem to work, they have to be removed.<\/p>\n

Try updating again now and see if you have a better experience.<\/p>\n","protected":false},"excerpt":{"rendered":"

Joomla 2 and below don’t support proxies by default, unfortunately you have to hack the code and remove some files for it to work. Firstly we need to edit the curl transport file and give it the proxy address. To do this we open libraries\/joomla\/http\/transport\/curl.php and look for the following: // If an explicit timeout […]<\/p>\n","protected":false},"author":2,"featured_media":3625,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false},"categories":[36,41],"tags":[],"yoast_head":"\nUpdate Joomla 2 Using Proxy - E<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Update Joomla 2 Using Proxy - E\" \/>\n<meta property=\"og:description\" content=\"Joomla 2 and below don’t support proxies by default, unfortunately you have to hack the code and remove some files for it to work. Firstly we need to edit the curl transport file and give it the proxy address. To do this we open libraries\/joomla\/http\/transport\/curl.php and look for the following: // If an explicit timeout […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/\" \/>\n<meta property=\"og:site_name\" content=\"E\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-12T11:04:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.ed.gs\/wp-content\/uploads\/2015\/10\/238H.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1365\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ed\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ed\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/\",\"url\":\"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/\",\"name\":\"Update Joomla 2 Using Proxy - E\",\"isPartOf\":{\"@id\":\"https:\/\/ed.gs\/#website\"},\"datePublished\":\"2015-10-12T11:04:27+00:00\",\"dateModified\":\"2015-10-12T11:04:27+00:00\",\"author\":{\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ed.gs\/#website\",\"url\":\"https:\/\/ed.gs\/\",\"name\":\"E\",\"description\":\"automation, consultancy, project management, web\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ed.gs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628\",\"name\":\"Ed\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g\",\"caption\":\"Ed\"},\"url\":\"https:\/\/ed.gs\/author\/ed\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Update Joomla 2 Using Proxy - E","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/","og_locale":"en_GB","og_type":"article","og_title":"Update Joomla 2 Using Proxy - E","og_description":"Joomla 2 and below don’t support proxies by default, unfortunately you have to hack the code and remove some files for it to work. Firstly we need to edit the curl transport file and give it the proxy address. To do this we open libraries\/joomla\/http\/transport\/curl.php and look for the following: // If an explicit timeout […]","og_url":"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/","og_site_name":"E","article_published_time":"2015-10-12T11:04:27+00:00","og_image":[{"width":2048,"height":1365,"url":"https:\/\/static.ed.gs\/wp-content\/uploads\/2015\/10\/238H.jpg","type":"image\/jpeg"}],"author":"Ed","twitter_misc":{"Written by":"Ed","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/","url":"https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/","name":"Update Joomla 2 Using Proxy - E","isPartOf":{"@id":"https:\/\/ed.gs\/#website"},"datePublished":"2015-10-12T11:04:27+00:00","dateModified":"2015-10-12T11:04:27+00:00","author":{"@id":"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ed.gs\/2015\/10\/12\/update-joomla-2-using-proxy\/"]}]},{"@type":"WebSite","@id":"https:\/\/ed.gs\/#website","url":"https:\/\/ed.gs\/","name":"E","description":"automation, consultancy, project management, web","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ed.gs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628","name":"Ed","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/ed.gs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g","caption":"Ed"},"url":"https:\/\/ed.gs\/author\/ed\/"}]}},"_links":{"self":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts\/3629"}],"collection":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/comments?post=3629"}],"version-history":[{"count":0,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts\/3629\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/media\/3625"}],"wp:attachment":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/media?parent=3629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/categories?post=3629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/tags?post=3629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}