Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Timeout error
Trying to help someone diagnose a server error message – running a 4.4.1 install.
Fatal error: Maximum execution time of 60 seconds exceeded in /users/home/username/web/public/textpattern/lib/txplib_misc.php(653) : eval()'d code on line 54
Sometimes throws a 500 error too. While checking on this (web server is Joyent), has anyone else come across this timeout error before? It suggests that php may have run out of time trying to process a script or plugin….
Any ideas? Hoping to save time finding the cause…!
Offline
Re: Timeout error
Oh that’s great. Now I’m getting 500 errors on TXP Tips. Only change on that site was to upgrade to TXP 4.5.2. Either this is a Joyent problem or a TXP file I guess.
Offline
Offline
Re: Timeout error
Yes its a bit strange because on both sites I’m able to work with TXP Admin without any issues. Just enabled error logging to file, and get this for TXP Tips (note it runs on a multi-site install):
[24-Oct-2012 13:11:21] PHP Notice: Constant txpath already defined in /users/home/username/domains/txptips.com/web/private/config.php on line 11
[24-Oct-2012 13:11:21] PHP Warning: include(1) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /users/home/username/domains/txptips.com/web/public/index.php on line 27
[24-Oct-2012 13:11:21] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '1' for inclusion (include_path='.:/usr/local/lib/php') in /users/home/username/domains/txptips.com/web/public/index.php on line 27
For the other site, no upgrade was performed so I would imagine it is a plugin. I’ll create error logs and report back..
Offline
Offline
Re: Timeout error
Strange. Must be an issue with Feedburner unless the plugin code is suddenly out of date:
function htn_feedstats($atts) {
extract(lAtts(array(
'id' => '',
'name' => '',
'cache' => 1,
'cachetime' => 21600,
'cachefile' => 'files/feedcache.txt',
'show' => 'readers'
),$atts));
if(!$id || !$name) { $error = "[No FeedID]"; }
$apiurl='http://api.feedburner.com/awareness/1.0/GetFeedData?';
if(!empty($name)) { $check = $apiurl.'uri='.$name; }
if(!empty($id)) { $check = $apiurl.'id='.$id; }
if($cache == true && file_exists($cachefile)) {
$duration = time()-$cachetime;
$array = @file($cachefile);
$feedcount = array(
"readers" => $array[1],
"hits" => $array[2],
"reach" => $array[3],
"errors" => $array[4],
);
if($array[0] <= $duration){
$feedcount = _getfeeddata($check);
$data=time()."\n".$feedcount["readers"]."\n".$feedcount["hits"]."\n".$feedcount["reach"]."\n".$feedcount["errors"];
if(!empty($feedcount["readers"])) {
$fp = fopen ($cachefile, "w");
fwrite ($fp , $data);
fclose ($fp);
}
}
if($feedcount["errors"] != "[None]") {
return $feedcount["errors"];
} else {
return $feedcount[$show];
}
} else {
$feedcount = _getfeeddata($check);
if($feedcount["errors"] != "[None]") {
return $feedcount["errors"];
} else {
return $feedcount[$show];
}
}
}
function _getfeeddata($check) {
$handle = fopen ($check, "r");
while (!feof($handle)) {
$buffer .= fgets($handle);
}
fclose ($handle);
if(empty($buffer)){
$buffer = file_get_contents($check,'r');
}
if(empty($buffer)){
$c = curl_init($check);
curl_setopt($c, CURLOPT_RETURNTRANSFER,1);
$buffer = curl_exec($c);
curl_close($c);
}
if(empty($buffer) || eregi('stat\=\"fail\"',$buffer)){
$array["errors"] = "[No Data]";
} else {$array["errors"] = "[None]";}
preg_match('/circulation\=\"([0-9\.]+)\"/si', $buffer, $x);
$array["readers"] = $x[1];
preg_match('/hits\=\"([0-9\.]+)\"/si', $buffer, $y);
$array["hits"] = $y[1];
preg_match('/reach\=\"([0-9\.]+)\"/si', $buffer, $z);
$array["reach"] = $z[1];
return $array;
}
Offline
Re: Timeout error
Google turned off Feedburner’s API on 20 October. I suspect that’s the root of your problem.
Offline
Re: Timeout error
Hi Joe, must be. They must have turned it off after the 20th though. I’d read something about Feedburner being possibly closed but forgot all about it as it was a while ago.
Offline
Offline
Pages: 1