個人用ツール

「レンタルサーバー毎の設定」を編集中

提供: baserCMS公式ガイド

移動: 案内, 検索

警告: ログインしていません。

編集すると、IPアドレスがこのページの編集履歴に記録されます。
この編集を取り消せます。 下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 編集中の文章
行181: 行181:
  
 
さくらレンタルサーバから送信可能なアドレスを指定してインストールしてください。
 
さくらレンタルサーバから送信可能なアドレスを指定してインストールしてください。
 
 
=== basic認証が2回表示される ===
 
htaccessファイルに以下を記載して回避できる。
 
 
<pre>
 
<If "%{HTTP:X-SAKURA-FORWARDED-FOR} != ''">
 
AuthType Basic
 
AuthName "Input your ID and Password."
 
AuthUserFile /your/password/path/.htpasswd
 
require valid-user
 
</If>
 
</pre>
 
 
- 参考: http://kayakuguri.github.io/blog/2017/10/10/sakura-ssl/
 
 
 
 
=== SSLへリダイレクト出来ない場合(2018/02/22時点) ===
 
 
X-Sakura-Forwarded-For変数で判別できないサーバはで.htaccessファイルに以下を記載することで対応可能です。
 
 
<pre>
 
Allow from all
 
RewriteEngine on
 
RewriteBase /
 
 
SetEnvIf REDIRECT_HTTPS (.*) HTTPS=$1
 
RewriteCond %{ENV:HTTPS} !^on$
 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
 
 
RewriteCond %{REQUEST_FILENAME} !-d
 
RewriteCond %{REQUEST_FILENAME} !-f
 
RewriteRule ^(.*)$ index.php [QSA,L]
 
</pre>
 
 
 
 
- 参考: https://help.sakura.ad.jp/hc/ja/articles/115000051662
 
- 参考: https://help.sakura.ad.jp/hc/ja/articles/360000027581-%E3%83%AC%E3%83%B3%E3%82%BF%E3%83%AB%E3%82%B5%E3%83%BC%E3%83%90%E3%81%AE%E4%BB%95%E6%A7%98%E5%A4%89%E6%9B%B4%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6-2018%E5%B9%B43%E6%9C%88-
 
  
 
== CPIサーバ ==
 
== CPIサーバ ==
行255: 行215:
 
CPIサーバでRewriteを有効にするには .htaccess に Options +FollowSymLinks を追記する必要がある。
 
CPIサーバでRewriteを有効にするには .htaccess に Options +FollowSymLinks を追記する必要がある。
 
(Options +FollowSymLinks の記載がないと Internal server error)
 
(Options +FollowSymLinks の記載がないと Internal server error)
 
<pre>
 
Options +FollowSymLinks
 
</pre>
 
 
 
参考: http://acesr.document.secure.ne.jp/other/tips-htaccess/
 
  
 
参考: http://ameblo.jp/huangke/entry-10429548096.html
 
参考: http://ameblo.jp/huangke/entry-10429548096.html
行530: 行483:
  
 
参考: http://phpexcel.codeplex.com/discussions/238547
 
参考: http://phpexcel.codeplex.com/discussions/238547
 
=== メールフォーム設定画面 送信先メールアドレス のラジオボタンが消える ===
 
 
HTMLのラジオボタン生成時にIDの0が消えてしまって、JSの動作が正しく動いていない。
 
保存される値には影響がないが見た目がおかしい。
 
 
本来は
 
 
<pre>
 
<input name="data[MailContent][sender_1_]" id="MailContentSender1_" value="" class="firstChild empty" type="hidden">
 
<input name="data[MailContent][sender_1_]" id="MailContentSender10" value="0" class="firstChild lastChild empty" checked="checked" type="radio">
 
<input name="data[MailContent][sender_1_]" id="MailContentSender11" value="1" class="firstChild lastChild empty" type="radio">
 
 
<input name="data[MailContent][sender_1]" size="40" maxlength="255" value="" id="MailContentSender1" class="lastChild empty" style="display: inline;" type="text">
 
</pre>
 
 
のようなHTMLが生成されるが、このサーバの場合は
 
<pre>
 
<input name="data[MailContent][sender_1_]" id="MailContentSender1_" value="" class="firstChild empty" type="hidden">
 
<input name="data[MailContent][sender_1_]" id="MailContentSender1" value="0" class="firstChild lastChild empty" checked="checked" type="radio">
 
<input name="data[MailContent][sender_1_]" id="MailContentSender11" value="1" class="firstChild lastChild empty" type="radio">
 
 
<input name="data[MailContent][sender_1]" size="40" maxlength="255" value="" id="MailContentSender1" class="lastChild empty" style="display: inline;" type="text">
 
</pre>
 
 
と表示されてしまう(理由は不明)
 
 
id="MailContentSender10" → id="MailContentSender1" のように0が消えてしまう。
 
 
その為、テキストエリアのid="MailContentSender1" とかぶってしまうのが原因。
 
 
==== 対応方法 ====
 
 
・見た目だけなので、放置する
 
 
・ソースを書き換え、ID重複がしないように変更する
 
 
lib/Baser/Plugin/Mail/View/MailContents/admin/form.php を
 
app/webroot/theme/(テーマ名)/MailContents/admin/form.php へコピーする。(フォルダも作成)
 
 
app/webroot/theme/(テーマ名)/MailContents/admin/form.php を変更する
 
 
22行目
 
<pre>
 
$('input[name="data[MailContent][sender_1_]"]').click(mailContentSender1ClickHandler);
 
 
          ↓
 
 
$('input[name="data[MailContent][sender_1a]"]').click(mailContentSender1ClickHandler);
 
</pre>
 
 
27行目
 
<pre>
 
$("#MailContentSender1_1").attr('checked',true);
 
}else{
 
$("#MailContentSender1_0").attr('checked',true);
 
 
          ↓
 
 
$("#MailContentSender1a1").attr('checked',true);
 
}else{
 
$("#MailContentSender1a").attr('checked',true);
 
</pre>
 
 
60行目
 
<pre>
 
if($('input[name="data[MailContent][sender_1_]"]:checked').val() == '1'){
 
 
          ↓
 
 
if($('input[name="data[MailContent][sender_1a]"]:checked').val() == '1'){
 
</pre>
 
 
135行目
 
<pre>
 
echo $this->BcForm->input('MailContent.sender_1_', array(
 
 
          ↓
 
 
echo $this->BcForm->input('MailContent.sender_1a', array(
 
</pre>
 
 
 
※ baserCMS 3.0.15で確認、baserCMS4系はこちらのサーバで動作しないので未確認。
 
  
  
行688: 行557:
  
 
=== PHPバージョン切り替え ===
 
=== PHPバージョン切り替え ===
参考: https://www.just-size.net/support/manual_php.php#change_ver
+
参考: http://www.just-size.net/support/manual_cgi_ssi_php.php#php
  
 
<pre>
 
<pre>
PHP 7.1.x の場合 AddHandler php7.1-script .php
+
PHP 5.6.x の場合 AddHandler php5.6-script .php
PHP 7.2.x の場合 AddHandler php7.2-script .php
+
PHP 7.0.x の場合 AddHandler php7.0-script .php
PHP 7.3.x の場合 AddHandler php7.3-script .php
+
 
</pre>
 
</pre>
  
 
[[Category:利用ガイド]]
 
[[Category:利用ガイド]]

baserCMS公式ガイドへのすべての投稿は、他の利用者によって編集、変更、除去される場合があります。 あなたの投稿を、他人が遠慮なく編集するのを望まない場合は、ここには投稿しないでください。
また、投稿するのは、あなたが書いたものか、パブリック ドメインまたはそれに類するフリーな資料からの複製であることを約束してください (詳細は[[Basercms:著作権 ]]を参照)。 著作権保護されている作品を、許諾なしに投稿してはいけません!

Add Categories
Update Categories

利用ガイド

  

中止 | 編集の仕方 (新しいウィンドウで開きます)