Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
White plugin page
#1
Hi,

all admin is working properly but plugin show "white page"

If I turn on DEBUG MODE:

Fatal error: Maximum execution time of 30 seconds exceeded in E:\EasyPHP-5.3.9\www\GetSimple_3.1\admin\inc\template_functions.php on line 1001

I use GS 3.1.2 on EasyPHP-5.3.9

My plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<channel>
<item><plugin><![CDATA[anonymous_data.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
<item><plugin><![CDATA[InnovationPlugin.php]]></plugin><enabled><![CDATA[false]]></enabled></item>
<item><plugin><![CDATA[i18n_base.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
<item><plugin><![CDATA[i18n_navigation.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
<item><plugin><![CDATA[sitemap.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
<item><plugin><![CDATA[i18n_search.php]]></plugin><enabled><![CDATA[false]]></enabled></item><item><plugin><![CDATA[user_login.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
<item><plugin><![CDATA[p01-contact_gs.php]]></plugin><enabled><![CDATA[false]]></enabled></item>
<item><plugin><![CDATA[news_manager.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
<item><plugin><![CDATA[dynpages.php]]></plugin><enabled><![CDATA[true]]></enabled></item>
</channel>

Please help me!
Thanks.
------
Sorry for my English but when I was young
instead of studying I preferred to train in judo.
------
Reply
#2
I have this on my local builds also and its caused by local firewall preventing the CURL calls to the GetSimple servers.

Just comment out line 1028 of template_function.php , this one:

Code:
$data = file_get_contents($fetch_this_api);

and its should work fine.
My Github Repos: Github
Website: DigiMute
Reply
#3
n00dles101 Wrote:I have this on my local builds also and its caused by local firewall preventing the CURL calls to the GetSimple servers.

Just comment out line 1028 of template_function.php , this one:

Code:
$data = file_get_contents($fetch_this_api);

and its should work fine.

Thanks mr. N00dles101

I do this in my template_function.php and it seems to work.
Line 1004 isn't enough.

Code:
# debugLog($fetch_this_api.' ' .$cachefile);
    if (file_exists(GSCACHEPATH.$cachefile) && time() - 40000 < filemtime(GSCACHEPATH.$cachefile)) {
        # grab the api request from the cache
        $data = file_get_contents(GSCACHEPATH.$cachefile);
    } else {    
        # make the api call
        if (function_exists('curl_exec')) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_TIMEOUT, 2);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_URL, $fetch_this_api);
//            $data = curl_exec($ch);                           COMMENTED LINE 1001
            curl_close($ch);
        } else {
//            $data = file_get_contents($fetch_this_api);       COMMENTED LINE 1004
        }
    $response = json_decode($data);        
        // we make sure our response is valid before saving it to disk,
        // to avoid corrupt or infected cache files from being saved to local filesystem.
        if($response){
            file_put_contents(GSCACHEPATH.$cachefile, $data);
            chmod(GSCACHEPATH.$cachefile, 0644);
        }    
    }
    return $data;
}

But I still do not understand why until yesterday everything worked well
(same GS 3.1.2 & EasyPhp)
------
Sorry for my English but when I was young
instead of studying I preferred to train in judo.
------
Reply




Users browsing this thread: 1 Guest(s)