PHP5.4でもSugarCRM5.2jをインストールするには
無料の顧客管理システムのSugarCRMの日本語版は開発が止まっているのでPHPバージョン5.2までの環境にしかインストール出来ません。
イマドキは、たいていのサーバはPHP5.3以上。なんとかインストール出来ないものかと思って調べてみました。
インストール途中でエラー
sugarcrm/install/welcome.php(163行目のPHPバージョン判定を無効化してみたら行けました!)
| 1 2 | //if (version_compare(phpversion(),'5.1.0') < 0 || version_compare(phpversion(),'5.3.0') >= 0) { if(false){ | 
管理画面へのログイン画面で、いきなりFatal Error!
調べてみると、PHP5.3で非推奨、PHP5.4で削除された関数(session_unregister)を使っていましたので、unset($_SESSION[”])に置き換えてみる。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | session_unregister()はphp5.4では削除されているので、unset($_SESSION[''])に置き換える。 		//session_unregister('login_error'); 		unset($_SESSION['login_error']); //grepしたら、以下の箇所で使われているのでチマチマと修正 modules\Employees\WapAuthenticate.php(71): 	session_unregister('login_password'); modules\Employees\WapAuthenticate.php(72): 	session_unregister('login_error'); modules\Employees\WapAuthenticate.php(73): 	session_unregister('login_user_name'); modules\Users\authentication\AuthenticationController.php(104): 				session_unregister('authenticated_user_id'); modules\Users\authentication\EmailAuthenticate\EmailAuthenticateUser.php(86):                 session_unregister('lastUserId'); modules\Users\authentication\EmailAuthenticate\EmailAuthenticateUser.php(87):                 session_unregister('lastUserName'); modules\Users\authentication\EmailAuthenticate\EmailAuthenticateUser.php(88):                 session_unregister('emailAuthToken'); modules\Users\authentication\SugarAuthenticate\SugarAuthenticate.php(71): 		session_unregister('login_error'); modules\Users\authentication\SugarAuthenticate\SugarAuthenticate.php(128): 		session_unregister('login_password'); modules\Users\authentication\SugarAuthenticate\SugarAuthenticate.php(129): 		session_unregister('login_error'); modules\Users\authentication\SugarAuthenticate\SugarAuthenticate.php(130): 		session_unregister('login_user_name'); modules\Users\authentication\SugarAuthenticate\SugarAuthenticate.php(131): 		session_unregister('ACL'); | 
これで、とりあえず管理画面は動いているっぽいけど、非推奨とか削除された関数は、まだまだあるんだろうな…。