码迷,mamicode.com
首页 > Web开发 > 详细

升级到php5.3.27之后, *.tpl.php全部失效

时间:2014-10-29 23:45:35      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:style   http   io   color   ar   sp   div   on   html   

因一个网站功能,昨天升级了服务器的php到5.3.27,用的是wdlinux的lanmp,安装之后启动apache或者php -v会报错:
Cannot load Zend Extension Manager - it was built with configuration 1.2.0,
而且,所有的*.tpl.php都不正常,比如index.tpl.php页面里有如下脚本:

PHP code
 
?
1
2
3
4
5
<frame src="<?=u(‘index‘,‘top‘)?>" noresize="noresize" frameborder="no" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
  <frameset cols="200,*"  id="frame">
    <frame src="<?=u(‘index‘,‘left‘)?>" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" target="main" />
    <frame src="<?=u($_GET[‘go_mod‘],$_GET[‘go_act‘])?>" name="main" noresize="noresize" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" target="_self" />
  </frameset>

页面打开全是404,查看源码之后,发现地址是http://xx.xx.xx/xx/xx/<?=u(‘index‘,‘left‘)?>,php脚本好像没运行

经过百度和谷歌,重新安装了ZendGuardLoader,并注释掉了老的zend:
Plain Text code
 
?
1
2
3
4
5
6
7
;zend_extension_manager.optimizer=/www/wdlinux/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/www/wdlinux/Zend/lib/Optimizer_TS-3.3.3
;zend_optimizer.version=3.3.3
;zend_extension=/www/wdlinux/Zend/lib/ZendExtensionManager.so
;zend_extension_ts=/www/wdlinux/Zend/lib/ZendExtensionManager_TS.so
<span style="color: #FF0000;">zend_extension = /www/wdlinux/Zend/lib/ZendGuardLoader.so
zend_loader.enable = 1</span>

重启apache,还是无效,求助该怎么办

 

--------解决方案--------
php.ini
short_open_tag = On

干脆升到 php5.4.21
无论 short_open_tag 怎么设置都支持  <?= ?>
--------解决方案--------
引用 1 楼 xuzuning 的回复:
php.ini
short_open_tag = On

干脆升到 php5.4.21
无论 short_open_tag 怎么设置都支持  <?= ?>

非常感谢,解决了,结贴给你

升级到php5.3.27之后, *.tpl.php全部失效

标签:style   http   io   color   ar   sp   div   on   html   

原文地址:http://www.cnblogs.com/happysean/p/4060690.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!