2014年5月17日土曜日

PHP5.3の環境でJoomla1.0を動かす為に。

Joomla1.0で運用しているサイトのレンタルサーバ、HETEMLが6月よりPHP5.2以前の運用を停止するとのことで、5.3以上での運用が必要となり相談を受けました。
そこで、設定を変更したら当然、Error吐き出してページ表示出来ません。色々調べてみて、下記のページを参考にコアファイルを改造。Errorは出ますが、PHP.iniにてError非表示にすることで対応しました。
設定を変更したのは以下のファイル
/includes/Cache/Lite.php
/includes/Cache/Lite/Function.php
勿論、早くバージョンアップしてくれというのは基本だけど、出来ない場合もありますからねぇ。下記は上記ページからの引用です。

Some changes need to be made to this file /includes/Cache/Lite.phpAll occurrences of the set_magic_quotes_runtime function need to be replaced by a conditional if statement.for example change this line near line 524:                        set_magic_quotes_runtime(0);  to this:                       // Check if magic_quotes_runtime is active                                                 if(get_magic_quotes_runtime())                                                    {                                                           // Deactivate                                                           set_magic_quotes_runtime(0);                                                     }Some changes need to be made to this file /includes/Cache/Lite/Function.php Line 72:Change this:    function call()    {        $arguments = func_get_args();        $id = serialize($arguments); // Generate a cache idTo this:    function call()    {                $arguments = func_get_args();                $numargs = func_num_args();                for($i=1; $i < $numargs; $i++){                $arguments[$i] = &$arguments[$i];                }        $id = serialize($arguments); // Generate a cache id 

0 件のコメント:

コメントを投稿