public $allowed_php_tokens = array('array','isset','empty','is_empty','count', 'sizeof',
'is_array','is_int','is_float','is_long','is_numeric','is_object',
'is_scalar','is_string','gettype','is_real',
'abs','acos','acosh','asin','asinh','atan2','atan','atanh','base_','bindec',
'ceil','cos','cosh','decbin','dechex','decoct','deg2rad','exp','expm1','floor',
'fmod','getrandmax','hexdec','hypot','is_','is_','is_','lcg_','log10','log1p',
'log','max','min','mt_','mt_','mt_','octdec','pi','pow','rad2deg','rand',
'round','sin','sinh','sqrt','srand','tan','tanh',
'constant','strlen','time','var_dump','var_export',
'gmp_*','ctype_*','array_','addcslashes','addslashes','bin2hex','chop','chr',
'chunk_split','convert_cyr_string','convert_uudecode','convert_uuencode','count_chars',
'crc32','crypt','echo','explode','fprintf','get_html_translation_table','hebrev','hebrevc',
'html_entity_decode','htmlentities','htmlspecialchars_decode','htmlspecialchars','implode',
'join','levenshtein','localeconv','ltrim','md5_file','md5','metaphone','money_format',
'nl_langinfo','nl2br','number_format','ord','parse_str','print','printf',
'quoted_printable_decode','quotemeta','rtrim','sha1_file','sha1','similar_text',
'soundex','sprintf','sscanf','str_ireplace','str_pad','str_repeat','str_replace',
'str_rot13','str_shuffle','str_split','str_word_count','strcasecmp','strchr',
'strcmp','strcoll','strcspn','strip_tags','stripcslashes','stripos','stripslashes',
'stristr','strlen','strnatcasecmp','strnatcmp','strncasecmp','strncmp','strpbrk',
'strpos','strrchr','strrev','strripos','strrpos','strspn','strstr','strtok',
'strtolower','strtoupper','strtr','substr_compare','substr_count','substr_replace',
'substr','trim','ucfirst','ucwords','vfprintf','vprintf','vsprintf','wordwrap');
почему три раза?'is_','is_','is_'
public $allowed_php_tokens = array('array','isset','empty','is_empty','count', 'sizeof',
'is_array','is_int','is_float','is_long','is_numeric','is_object',
'is_scalar','is_string','gettype','is_real',
'abs','acos','acosh','asin','asinh','atan2','atan','atanh','base_','bindec',
'ceil','cos','cosh','decbin','dechex','decoct','deg2rad','exp','expm1','floor',
'fmod','getrandmax','hexdec','hypot','is_finite','is_infinite','is_nan','lcg_','log10','log1p',
'log','max','min','mt_getrandmax','mt_rand','mt_srand','octdec','pi','pow','rad2deg','rand',
'round','sin','sinh','sqrt','srand','tan','tanh',
'constant','strlen','time','var_dump','var_export',
'gmp_*','ctype_*','array_*','addcslashes','addslashes','bin2hex','chop','chr',
'chunk_split','convert_cyr_string','convert_uudecode','convert_uuencode','count_chars',
'crc32','crypt','echo','explode','fprintf','get_html_translation_table','hebrev','hebrevc',
'html_entity_decode','htmlentities','htmlspecialchars_decode','htmlspecialchars','implode',
'join','levenshtein','localeconv','ltrim','md5_file','md5','metaphone','money_format',
'nl_langinfo','nl2br','number_format','ord','parse_str','print','printf',
'quoted_printable_decode','quotemeta','rtrim','sha1_file','sha1','similar_text',
'soundex','sprintf','sscanf','str_ireplace','str_pad','str_repeat','str_replace',
'str_rot13','str_shuffle','str_split','str_word_count','strcasecmp','strchr',
'strcmp','strcoll','strcspn','strip_tags','stripcslashes','stripos','stripslashes',
'stristr','strlen','strnatcasecmp','strnatcmp','strncasecmp','strncmp','strpbrk',
'strpos','strrchr','strrev','strripos','strrpos','strspn','strstr','strtok',
'strtolower','strtoupper','strtr','substr_compare','substr_count','substr_replace',
'substr','trim','ucfirst','ucwords','vfprintf','vprintf','vsprintf','wordwrap','and','or');
$this->compile_id
$this->template_dir
$this->compile_dir
$this->compile_check
... и т.д.
Warning occured
File /www/quicky/Quicky.class.php
Line 320
fopen(/www/templates/en/header) [function.fopen]: failed to open stream: No such file or directory
The fatal error occured, sorry.
а у тебя нет ли статистики - насколько квики стала медленнее после самой первой версии?> Какие настройки есть в Quicky?
Все кроме compile_id, в след. версии будет.
{helper myhelper ($a,$b)}
{$a}*{$b} = {$a*$b}
{/}
{myhelper(10,15)}<br />
{myhelper b=15 a=10}
/* 10*15 = 150
10*15 = 150
*/
Правда на bugs.php.net все кивают на новые настройки (pcre.backtrack_limit и pcre.recursion_limit) и не хотят убеждаться, что проблема сущствует, и этими параметрами не лечится.С PHP 5.2.2 Quicky не работает по причине Segmentation fault в PCRE 7.0.
'Upgraded PCRE to version 7.0 (Nuno)'
Надо добиваться отката, до исправления бага в PCRE.
private function GetFilePath($path, $cache_id, $compile_id)
{
if ($compile_id === NULL) {
$compile_id = $this->compile_id;
}
if ($cache_id === NULL) {
$cache_id = $this->cache_id;
}
$path = $this->_get_template_path($path);
$ds = $this->use_sub_dir ? DIRECTORY_SEPARATOR : '^';
$ckey = ''; $cid = '';
if (empty($path)) {
// обработка ошибки? в лог?
}else{
$path = urlencode($id);
$cid = sprintf('%08X', crc32($path.$cache_id));
// /home/cachedir/$cid*$id_$ckey.php
}
if (isset($compile_id)) {
if (gettype($compile_id) !=='string')
$compile_id = @serialize($compile_id);
// /home/cachedir/$cid_($ckey).php
$ckey = sprintf('%08X', crc32($key));
}
return $this->cache_dir . substr($cid, 0, 2) . $ds
. substr($cid, 0, 3) . $ds
. $path .'_'. $cid . '_' .$ckey. '.'. $this->file_ex;
// поиск glob ("/home/cache/*$ds*$ds*.$this->file_ex"); // удалю или найду все
//glob ("/home/cache/*.$ds.*.$ds.test*_433d4_4daxax.$this->file_ex"); // удалю или найду по нужной маске
// в итоге получаю полный контроль за кешем по ключю, ид, по имени (тест1, тесе2) tes*_*_$compile_id -найду все начинающее с tes но с ключом
}
$name = basename($path).($this->auto_filename_prefix !== '' ? '.'.$this->auto_filename_prefix: '').($compile_id !== ''?'.'.$compile_id:'').($cache_id !== ''?'.'.$cache_id:'').'.'.substr(md5($path),0,6).'.php';