升級到php5.3.27之後, *.tpl.php全部失效

來源:互聯網
上載者:User

標籤: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 ?
12345 <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指令碼好像沒運行

經過百度和Google,重新安裝了ZendGuardLoader,並注釋掉了老的zend:
Plain Text code ?
1234567 ;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.sozend_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全部失效

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.