安乐业房产程序在linux下问题,求解决

Notice: Undefined index: jsbtmfiles in /common.inc.php on line 170  
/*
出现上面的错误,测试如下
在这个方法中打印输出有,但是还是会出现smarty 不能编译(/tmp/template_c/ 权限是最高的)生成%%45^45E^45E48.index.tpl.php的文件,但我在本机的windows环境下,是可以生成的,这个是什么问题造成的,大家给点建议
环境是centos下nginx+php ,这个是开源的安乐业房产加补丁了!出现这样的问题很奇怪!


public function getJsHtml($btm=NULL) {
$html = '';
if (!$GLOBALS['cfg']['page']['jsfiles']) {
return;
}
$jsFile = $btm?'jsbtmfiles':'jsfiles'; //ndefined index: jsbtmfiles in 这个问题不影响吧,jsbtmfiles//这个没有定义,晕,不懂在哪定义的,这里echo $jsFile 值为jsfiles
echo '<pre>';
var_dump($GLOBALS['cfg']['page'][$jsFile]);
array(5) {
  ["http://***/common/js/jquery-1.2.6.min.js"]=>
  string(54) "http://***/common/js/jquery-1.2.6.min.js"
  ["http://***/common/js/thickbox.js"]=>
  string(46) "http://***/common/js/thickbox.js"
  ["http://***/common/js/Autocompleter/lib/jquery.bgiframe.min.js"]=>
  string(75) "http://***/common/js/Autocompleter/lib/jquery.bgiframe.min.js"
  ["http://***/common/js/Autocompleter/lib/ajaxQueue.js"]=>
  string(65) "http://***/common/js/Autocompleter/lib/ajaxQueue.js"
  ["http://***/common/js/Autocompleter/jquery.autocomplete.js"]=>
  string(71) "http://***/common/js/Autocompleter/jquery.autocomplete.js"
}
*/
http://***/common/js/jquery-1.2.6.min.jshttp://***/common/js/thickbox.jshttp://***/common/js/Autocompleter/lib/jquery.bgiframe.min.jshttp://***/common/js/Autocompleter/lib/ajaxQueue.jshttp://***/common/js/Autocompleter/jquery.autocomplete.js
Warning: include(/data/website/www.dnkb.com.cn/house.dnkb/tmp/template_c//%%45^45E^45E480CD%%index.tpl.php) [function.include]: failed to open stream: No such file or directory in /data/website/www.dnkb.com.cn/house.dnkb/common/lib/smarty/libs/Smarty.class.php on line 1258

Warning: include() [function.include]: Failed opening '/data/website/www.dnkb.com.cn/house.dnkb/tmp/template_c//%%45^45E^45E480CD%%index.tpl.php' for inclusion (include_path='.:/data/sys/php-cgi/lib/php') in /data/website/www.dnkb.com.cn/house.dnkb/common/lib/smarty/libs/Smarty.class.php on line 1258

作者: freedom_gooboy   发布时间: 2011-06-03

如果不是基於LINUX開發的,那么难免会有很多问题,例如文件名的大小写不同就会出问题.还有就是文件夹的权限不同也会影响程序运行.

作者: sibang   发布时间: 2011-06-03

Notice: Undefined index
没有发现(定义)的变量index,也就是没有$inde这个变量或者数组中不存在下标是index的,至于为什么在windows上没事,估计是环境中报错级别的等级设置不一样

作者: kyzy_yy_pm   发布时间: 2011-06-03

Warning: include(/house.dnkb/tmp/template_c//%%45^45E^45E480CD%%index.tpl.php) [function.include]: failed to open stream: No such file or directory in /house.dnkb/common/lib/smarty/libs/Smarty.class.php on line 1266 //现在是不能编译。。。很晕啊。。。

作者: freedom_gooboy   发布时间: 2011-06-03

引用 3 楼 freedom_gooboy 的回复:

Warning: include(/house.dnkb/tmp/template_c//%%45^45E^45E480CD%%index.tpl.php) [function.include]: failed to open stream: No such file or directory in /house.dnkb/common/lib/smarty/libs/Smarty.class.……

smarty缓存目录目录没有写的权限,你可以chmod 777 -R 目录

作者: kyzy_yy_pm   发布时间: 2011-06-03

已经是777的了 template_c //这个是编译目录

现在我去smarty官网下了个smarty3.07 (http://www.smarty.net/download)
在windows下测试也正常传到linux服务器上,出现如下错误,现在可以确定是之前是因为smarty编译的问题,有遇到的朋友,或者知道的朋友指导下啊,不胜感激

PHP code

object(Smarty)#1 (65) {
  ["auto_literal"]=>
  bool(true)
  ["error_unassigned"]=>
  bool(false)
  ["template_dir"]=>
  string(11) "./templates"
  ["default_template_handler_func"]=>
  NULL
  ["compile_dir"]=>
  string(13) "./templates_c"
  ["plugins_dir"]=>
  array(1) {
    [0]=>
    string(62) "smartys/libs/plugins/"
  }
  ["cache_dir"]=>
  string(7) "./cache"
  ["config_dir"]=>
  string(9) "./configs"
}

Warning:  rename() has been disabled for security reasons in /smartys/libs/sysplugins/smarty_internal_write_file.php on line 48
Warning:  chmod() [function.chmod]: No such file or directory in /smartys/libs/sysplugins/smarty_internal_write_file.php on line 50
Warning:  include(./templates_c/2319eb374ebfda6635cffe78ca7a13eed09695fd.file.test.tpl.php) [function.include]: failed to open stream: No such file or directory in smartys/libs/sysplugins/smarty_internal_template.php on line 432
Warning:  include() [function.include]: Failed opening './templates_c/2319eb374ebfda6635cffe78ca7a13eed09695fd.file.test.tpl.php' for inclusion (include_path='.:/data/sys/php-cgi/lib/php') in /smartys/libs/sysplugins/smarty_internal_template.php on line 432




作者: freedom_gooboy   发布时间: 2011-06-03

1、Notice: Undefined index: jsbtmfiles in /common.inc.php on line 170  
错误应该出现在这里
if (!$GLOBALS['cfg']['page']['jsfiles']) {
健壮的写法应该是
if (! isset($GLOBALS['cfg']['page']['jsfiles']) ) {

2、上传系统时,请不要上传 template_c 目录中的内容
同时用上传工具清除掉 template_c 目录中的全部内容

作者: xuzuning   发布时间: 2011-06-03