Freo

エントリー

Freo+Google analytics(js追記時)

CMS:Freo

header内にトラッキング コードを直書きするとエラー

エラー表記:
Fatal error: Smarty error: [in header.html line 27]: syntax error: unrecognized tag: i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments) (Smarty_Compiler.class.php, line 446) in /xxx/freo/libs/smarty/Smarty.class.php on line 1094

 

{literal}で囲んでエラー回避

参考サイト(Freo wiki)

 

 

Freo-URLの簡略化(mod_rewrite)

CMS:Freo

サーバ:さくらインターネット(申込みサービスによってのサーバ環境は不明)

公式案内の.htaccess

DirectoryIndex index.php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1
</IfModule>

→500エラー

下記へ書き換え(同サーバ内でmod_rewriteを使用しているためIfModuleは外しました。)

DirectoryIndex index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule .* index.php [L]

に変更で「index.php」無しでアクセス可へ

※ページパス調整プラグイン未使用のためその他トラブルが発生するかは未確認

→自身の環境では特に問題ないみたいです。

Freo-PHPメモ

PHPのバージョンを上げるとアクセス不可

(PHP5.1?→PHP5.4.22)

以下アクセス時に表示されたエラー


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/xxx/freo/libs/freo/internals/default/default.php on line 117

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/xxx/freo/libs/freo/internals/default/default.php on line 118

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/xxx/freo/libs/freo/internals/default/default.php on line 260

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/xxx/freo/libs/freo/internals/default/default.php on line 261

◆改善方法(sakuraサーバの場合)

サーバコントロールパネル>アプリケーションの設定>PHP設定の編集>php.ini 設定ファイル編集

date.timezone = "Asia/Tokyo"


を追記にて改善

 

 

 

 

エントリーページ移動

Notice

ここは一次創作(オリジナルJUNE)とサイト運営に関するメモを載せたサイトです。

Recent Posts

<<2024年04月>>

S M T W T F S
- 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 - - - -

tag-cloud

Link

Feed