dfGallery error Invalid cURL response when accessing Admin control panel and Invalid JSON Data on website page itself.
Current installation: PHP v5.3.1, MySQL v5.1.41, dfGallery v2.0, mod_rewrite & cURL modules are loaded
Change the following files as per rafaelspfonseca suggested here http://www.dezinerfolio.com/forum/discussion-28, then some additional files where we have to assign the website's address:
- /lib/ci/libraries/Loader.php
At line 249, replace$CI->dbutil =& new $class();
with
$CI->dbutil = new $class();
- /lib/ci/libraries/URI.php
At line 190, replaceif ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
withif ( ! preg_match("|^[".($this->config->item('permitted_uri_chars'))."]+$|i",rawurlencode($str)))
- /lib/ci/codeigniter/CodeIgniter.php
At line 60, replaceset_magic_quotes_runtime(0); // Kill magic quotes
withini_set('magic_quotes_runtime', 0);
- /lib/ci/codeigniter/Common.php
At line 123, replace$objects[$class] =& new $name();
with
$objects[$class] = new $name();
At line 129, replace
$objects[$class] =& new $name();
with
$objects[$class] = new $name();
- /lib/ci/database/DB.php
At line 133, replacecommand $DB =& new $driver($params);
with$DB = new $driver($params);
- /app/config/config.php
At line 129, replace$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
with$config['permitted_uri_chars'] = 'a-z 0-9~%\.\:_\-';
- /.htaccess
At line 16, replaceRewriteRule ^(.+)$ index.php?/$1 [L]
withRewriteRule ^(.*)$ http://www.itropics.net/dfgallery/index.php/$1 [L]
- /app/config/config.php
At line 18, replace$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].substr($_SERVER['SCRIPT_NAME'],0,strpos($_SERVER['SCRIPT_NAME'],'/index.php')). '/';
with$config['base_url'] = "http://www.itropics.net/dfgallery/";
- /install.php
At line 103, replace$curl_url = 'http://'.$_SERVER['SERVER_NAME'].substr($_SERVER['SCRIPT_NAME'],0,strpos($_SERVER['SCRIPT_NAME'],'/index.php')). '/api/rest/test_curl';
with$curl_url = 'http://www.itropics.net/dfgallery/index.php/api/rest/test_curl';
That should be it...