■ユーザーズフォーラム リニューアルのお知らせ
新規投稿は新ユーザーズフォーラムにお願いします。

インストール(コントローラがありません)

Mitsuru Hase > インストール(コントローラがありません) @ 2010/4/3 18:03
デフォルトと違うディレクトリにインストールしようとして、以下のような設定をしてインストールをしましたが、表題の「コントローラがありません」とブラウザのタイトルバーに表示され、内容のないページが表示され、[次のステップ]へも行けません。
OS: CentOS release 5.4
Server version: Apache/2.2.3
mysql-5.0.77-4
pkg: basercms-1.5.7.zip
install_dir: /var/www/basercms/ ←パッケージの展開場所
/etc/httpd/conf.d/basercms.conf
Alias /basercms "/var/www/basercms/"
<Directory "/basercms">
    Options FollowSymLinks ExecCGI
    AllowOverride AuthConfig
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from 10.168.
</Directory>


・/ app/ app/webroot/ の各ディレクトリの.htaccess.txtを.htaccessにリネーム。
・RewriteBase /basercms/ この部分だけ修正。
 最初は、コメントアウトしたまま、次にコメントを外し / にするが、pathが違うのでエラーとなる。
・上記の前に.htaccess.txtのまま、/etc/httpd/conf.d/basercms.confに

RewriteEngine on
# RewriteBase / ←ここはコメントアウトしないと文法エラーとなる。
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]

を入れて、「次のステップ」までうまくいったのですが、スマートURLの推奨設定があったので、.htaccessへのリネームをしたが、pathが合わずにうまくいかなかった。

ここのフォーラムでも探してみましたが、同様のトラブルはヒットしませんでした。
このようなトラブルへの対応をご存知の方、お教えください。
non > Re: インストール(コントローラがありません) @ 2010/4/3 19:08
Baser がどうこうの前に、alias の設定が間違ってるかもです。

Directory セクションは、/var/www/basercms に対して記述するべきでは?

http://httpd.apache.org/docs/2.0/ja/mod/mod_alias.html
Mitsuru Hase > Re: インストール(コントローラがありません) @ 2010/4/4 13:01
non さん:ご指摘ありがとうございます。
> Directory セクションは、/var/www/basercms に対して記述するべきでは?
ご指摘のとおり記述ミスでした。他にも
AllowOverride AuthConfig → AllowOverride All
に変更する必要がありました。
上記部分を変更し、httpd reload しましたが、「コントローラがありません」となりました。ログを見ると、
access_log
10.168.xxx.xxx - - [04/Apr/2010:12:47:51 +0900] "GET /basercms/app/webroot/index.php/css/images/bg_page_red.gif HTTP/1.1" 200 434

辺りで終わっていました。1度うまく行った時は、
10.168.xxx.xxx - - [02/Apr/2010:18:28:43 +0900] "POST /basercms/index.php/installations/step2 HTTP/1.1" 200 10631
までできたようです。
RewriteLogを取ってみます。
ryuring > Re: インストール(コントローラがありません) @ 2010/4/5 1:31
こんばんは。

ちなみに、PHPはモジュールとして動かしてますか?それともCGI?

CakePHPの仕様として、URLに、index.php が入っている場合、一旦、index.php を経由するのですが、CGIとして動かしている場合、index.php に画像のパスがうまく渡せない場合があります。

Twitter:@ryuring
baserCMS総合サービスサイト ビーコミ

Mitsuru Hase > Re: インストール(コントローラがありません) @ 2010/4/6 19:01
ryuringさん:お世話になります。
> PHPはモジュールとして動かしてますか?それともCGI?
この意味が分からなかったので、調べてみて、httpd.confに以下を追加しましたが、改善しませんでした。こういうことではなかったのでしょうね。
  AddHandler cgi-script .cgi .pl
! # 2010-04-06 16:39
! AddHandler php5-script .php

mod_rewrite の問題のような気がするんですが…。
OptionsにIncludesが必要とか?ないですよね。
引用:
Make sure that an .htaccess override is allowed?

/etc/httpd/conf.d/basercms.conf
AllowOverride All

引用:
Make sure you are editing the system httpd.conf rather that a user- or site-specific httpd.conf.

DocumentRoot "/var/www/html"
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory "/var/www/html">
    Options Includes IncludesNOEXEC ExecCGI FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>


For some reason or another, you might have obtained a copy of CakePHP without the needed .htaccess files. This sometimes happens because some operating systems treat files that start with '.' as hidden, and don't copy them.
# ls -al `find /var/www/basercms/ -name ".htaccess" -print`
-rw-r--r-- 1 apache apache 652 4月 3 15:35 /var/www/basercms/.htaccess
-rw-r--r-- 1 apache apache 650 4月 3 15:35 /var/www/basercms/app/.htaccess
-rw-r--r-- 1 apache apache 704 4月 3 15:35 /var/www/basercms/app/webroot/.htaccess
-rwxr-xr-x 1 apache apache 792 3月 29 20:37 /var/www/basercms/baser/vendors/js/ckeditor/.htaccess

/var/www/basercms/.htaccess, /var/www/basercms/app/.htaccess
<IfModule mod_rewrite.c>
    RewriteEngine  on
    RewriteBase    /basercms
    RewriteRule    ^$ app/webroot/    [L]
    RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

/var/www/basercms/app/webroot/.htaccess
<IfModule mod_rewrite.c>
    RewriteEngine  on
    RewriteBase    /basercms
    RewriteCond    %{REQUEST_FILENAME} !-d
    RewriteCond    %{REQUEST_FILENAME} !-f
    RewriteRule    ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

ryuring > Re: インストール(コントローラがありません) @ 2010/4/6 20:02
こんにちは。

httpd.conf に次の行がなければ、モジュール版だと思います。

AddHandler application/x-httpd-phpcgi .php


モジュール版であれば、モジュール版の方が問題解決が早いと思いますのでそのままでけっこうです。

次の点をご確認ください。

1.リネームのタイミングについて
.htaccessファイルの設置は、ステップ1から行っていると正常に動作しません。
ステップ2の段階で、htaccess.txt を、.htaccess にリネームされているのは間違いないですよね?

2.ステップ1での画面表示について
ステップ1ではCSSは読み込まれてますか?
よろしければその画面のスクリーンショットをここに貼り付けてください。

3.アップロード確認後のURLについて
ステップ2で、.htaccessのリネーム後、必ず「アップロード確認」ボタンをクリックする必要があります。
確認ボタンをクリックした次の画面のURLを教えてください。(ドメインの部分は伏せてください)
それと、よろしければ、その画面のスクリーンショットをここに貼ってみてください。

4.CSSタグ等のURLについて
ドキュメントルートにBaserCMSを設置している場合、
CSSタグ等のURLは、ステップ1の段階において、/index.phpから始まるURLになっているはずです。
HTMLソースを確認してみてください。
ステップ1なので、もちろん.htaccessは設置していない状態です。
(例)
<link rel="stylesheet" type="text/css" href="/index.php/css/import.css" />


この段階で、そうなっていない場合は、rewriteモジュールを含むサーバー環境の問題が強いと思います。
rewrite 原因の場合は、RewriteBase の調整をするしかないように思えます。

以上です。よろしくお願いしますー。

Twitter:@ryuring
baserCMS総合サービスサイト ビーコミ

Mitsuru Hase > Re: インストール(コントローラがありません) @ 2010/4/8 15:13
お手数を煩わせてしまい、申し訳ありません。
引用:
httpd.conf に次の行がなければ、モジュール版だと思います。
AddHandler application/x-httpd-phpcgi .php

AddHandler application/x-httpd-phpcgi .php
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
## for PHP 4
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

がありましたので、コメントアウトし、httpd をrestartしましたが、「コントローラがありません」が表示されました。

引用:
1.リネームのタイミングについて
.htaccessファイルの設置は、ステップ1から行っていると正常に動作しません。
ステップ2の段階で、htaccess.txt を、.htaccess にリネームされているのは間違いないですよね?

間違いありませんが、その後は、ずっと.htaccess のままでした。
それで、.htaccess をhtaccess.txtにリネームし、httpd をrestart後再度、
http://hostname.subd.mydomain.jp/basercms/
にアクセスすると、
Fatal error: Call to a member function trigger() on a non-object in /var/www/basercms/cake/libs/model/model.php on line 2011
とブラウザに表示されました。httpd/error_logにも同様のメッセージが記録されていました。

htaccess.txtを.htaccessに戻し、
引用:
2.ステップ1での画面表示について
ステップ1ではCSSは読み込まれてますか?
よろしければその画面のスクリーンショットをここに貼り付けてください。



引用:
3.アップロード確認後のURLについて
ステップ2で、.htaccessのリネーム後、必ず「アップロード確認」ボタンをクリックする必要があります。

ステップ2まで行っていないので、分かりません。

引用:
4.CSSタグ等のURLについて
ドキュメントルートにBaserCMSを設置している場合、
CSSタグ等のURLは、ステップ1の段階において、/index.phpから始まるURLになっているはずです。

access_log
10.168.xxx.xxx - - [08/Apr/2010:14:36:54 +0900] "GET /basercms/ HTTP/1.1" 200 160
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/ HTTP/1.1" 200 2932
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/css/font_small.css HTTP/1.1" 200 648
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/jquery-1.3.2.min.js HTTP/1.1" 200 57254
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/i18n/ui.datepicker-ja.js HTTP/1.1" 200 858
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/css/import.css HTTP/1.1" 200 1214
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/jquery.colorbox-min.js HTTP/1.1" 200 8304
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/functions.js HTTP/1.1" 200 2932
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/jquery.corner.js HTTP/1.1" 200 8387
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/jquery-ui-1.7.2.custom.min.js HTTP/1.1" 200 192628
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/css/admin/default.css HTTP/1.1" 200 2823
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/startup.js HTTP/1.1" 200 2903
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/styleswitcher.js HTTP/1.1" 200 1889
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/js/jquery.bt.min.js HTTP/1.1" 200 22713
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/admin/layout.css HTTP/1.1" 200 1541
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/admin/class.css HTTP/1.1" 200 8076
10.168.xxx.xxx - - [08/Apr/2010:14:37:41 +0900] "GET /basercms/app/webroot/index.php/css/admin/footer.css HTTP/1.1" 200 908
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/admin/contents.css HTTP/1.1" 200 9308
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/admin/header.css HTTP/1.1" 200 1579
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/font_large.css HTTP/1.1" 200 655
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/font_medium.css HTTP/1.1" 200 655
php/css/images/bg_body_red.jpg HTTP/1.1" 200 467
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/images/bg_header_red.jpg HTTP/1.1" 200 13320
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/images/bg_glb_menu_red.jpg HTTP/1.1" 200 9465
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/images/bg_gradation_shadow_red.jpg HTTP/1.1" 200 9468
10.168.xxx.xxx - - [08/Apr/2010:14:37:42 +0900] "GET /basercms/app/webroot/index.php/css/images/bg_page_red.gif HTTP/1.1" 200 434

ひとまず、ご報告まで。
ryuring > Re: インストール(コントローラがありません) @ 2010/4/9 15:06
こんにちは。

スクリーンショットを見る限り、CSSを読み込まれているようですが、
ログを見る限りURLがおかしいですね。

◆ 間違い
/basercms/app/webroot/index.php/js/jquery-1.3.2.min.js

◆ 正しい
/basercms/index.php/js/jquery-1.3.2.min.js

一度リセットして頂いてやり直した方がよさそうですね。
次のURLを表示してみてください。

http://ドメイン/basercms/installations/reset

BaserCMSの初期化画面が表示されるはずですが、もしこれも正常に動作しない場合は、
次のファイルを削除し、.htaccess を htaccess.txt に戻した状態で、
インストール画面を表示させてみてください。
http://ドメイン/basercms/

※ 次のファイルは存在しない場合もあります。

◆ app/config/database.php
◆ app/config/install.php

そして、その状態のスクリーンショットと、ログを貼り付けてみてください。

Twitter:@ryuring
baserCMS総合サービスサイト ビーコミ

Mitsuru Hase > Re: インストール(コントローラがありません) @ 2010/4/9 17:53
引用:
一度リセットして頂いてやり直した方がよさそうですね。
次のURLを表示してみてください。
http://ドメイン/basercms/installations/reset

ありがとうございます。
おかげさまで無事にインストールができました。
トップページも管理者ページも表示されました。
これから、ボチボチとCMSの設定をしていきます。
一連のアドバイスに感謝申し上げます。
MySQLのDB作成場所に迷いましたが、localhostにしました。
[basercms]# mysql -u root -p
Enter password: *********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on BaserCMS.* to BaserCMS@"localhost" IDENTIFIED BY "**********";
Query OK, 0 rows affected (0.02 sec)

mysql> create database BaserCMS;
Query OK, 1 row affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye

ログイン
ユーザー名:
パスワード:


  新規登録 / パスワード紛失

検索

facebook
フォーラムで悩みが解決した場合など、よかったら「いいね!」をポチっとクリックしてください!質問の回答者や開発者の励みになります

フォーラムガイド


関連リンク

オンライン状況
3 人のユーザが現在オンラインです。 (3 人のユーザが フォーラム を参照しています。)

登録ユーザ: 0
ゲスト: 3