バージョン選択
フォーラム
メニュー
オンライン状況
|
|
44 人のユーザが現在オンラインです。 (33 人のユーザが フォーラム を参照しています。) |
|
|
機能要望 > その他 > 【Windows上での開発環境】XAMPPでApacheが落ちます |
|
その他
投稿者 |
スレッド |
nanasess |
投稿日時: 2010/8/12 19:58
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2313 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます SC_Query を singleton にして異常な状態を改善してみました. http://svn.ec-cube.net/open_trac/changeset/18784手元の環境では, この対応で SC_Helper_Session のコメントアウト無しでも, Apache が強制終了することは無くなりました. お手空きの際にでもお試し下さいませ.
|
|
|
nanasess |
投稿日時: 2010/8/10 16:49
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2313 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 引用: ECCUOREさんは書きました: 引用: 本件, 手元の環境では data/class/helper/SC_Helper_Session.php の 83行目を削除 or コメントアウトすることで解消しました.
弊社のXAMPP環境でも、動作を確認しました。 ありがとうございます。
良かったです! 根本解決できるよう, 対策を考えてみます.
|
|
|
ECCUORE |
投稿日時: 2010/8/10 11:02
対応状況: −−−
|
長老 登録日: 2009/10/22 居住地: 東京 投稿: 248 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 引用: 本件, 手元の環境では data/class/helper/SC_Helper_Session.php の 83行目を削除 or コメントアウトすることで解消しました.
弊社のXAMPP環境でも、動作を確認しました。 ありがとうございます。 ---------------- EC CUORE 株式会社クオーレ カスタマイズ御相談下さい。
|
|
|
nanasess |
投稿日時: 2010/8/9 17:26
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2313 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 本件, 手元の環境では data/class/helper/SC_Helper_Session.php の 83行目を削除 or コメントアウトすることで解消しました.
--- a/data/class/helper/SC_Helper_Session.php
+++ b/data/class/helper/SC_Helper_Session.php
@@ -83,7 +83,6 @@
*/
function sfSessWrite($id, $sess_data)
{
- if (!$this->objDb->sfTabaleExists("dtb_session")) return false;
$objQuery = new SC_Query();
$count = $objQuery->count("dtb_session", "sess_id = ?", array($id));
$sqlval = array();
根本原因までは追い切れていませんが, とり急ぎご報告まで. やはり, SC_DB_DBFactory と SC_Query の循環参照が関係あるかもしれません. また, 該当の処理は不要だと思われますので, 削除してしまっても問題ないかと思われます.
|
|
|
nanasess |
投稿日時: 2010/8/9 13:34
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2313 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 引用: ECCUOREさんは書きました: 今回の件は、SC_DB_DBFactoryとSC_Queryの循環参照の問題は関係無いでしょうか?
可能性あると思います. しかし以前も, SC_Query の中で SC_DbConn のインスタンスを生成しており, 結果的に循環参照していたはずなんですけどね... 引用: 直接関係無いかもしれませんが、質問があります。 SC_DB_DBFactoryとSC_QueryとSC_Helper_DBの関係性についてです。
SC_DB_DBFactoryは、Factoryと名が付いていますが、実際はファクトリークラスとしてだけでは無いように見えます。 SC_DB_DBFactoryが各DBに応じたオブジェクト(SC_QueryかSC_Helper_DB)を返すのが良い気がしますが、どうでしょうか?
具体的な実装提案としては、 今のSC_Helper_DBをベースとして、SC_Helper_DB_MYSQL、SC_Helper_DB_PGSQLを作り、SC_DB_DBFactory_MYSQL、PGSQLにある固有の処理を移す。(SC_Queryも同様) DBアクセスの経路は、SC_DB_DBFactory::getHelper_DBInstance と SC_DB_DBFactory::getQueryInstance で返るオブジェクトの2経路に絞る。
元々の設計思想としては, SC_Query を直接呼ばずに SC_DB_DBFactory のみにしたかったのです. SC_Helper_DB は, SC_DB_DBFactory のヘルパーという位置付けです. しかし, 分散した SC_Query をすべて置き替えるだけの工数が割けませんでした. 今回も, スケジュール的には if (DB_TYPE == と条件分岐している箇所を SC_DB_DBFactory に置き替えるだけで精一杯な気がします...
|
|
|
ECCUORE |
投稿日時: 2010/8/9 11:29
対応状況: −−−
|
長老 登録日: 2009/10/22 居住地: 東京 投稿: 248 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 今回の件は、SC_DB_DBFactoryとSC_Queryの循環参照の問題は関係無いでしょうか? 直接関係無いかもしれませんが、質問があります。 SC_DB_DBFactoryとSC_QueryとSC_Helper_DBの関係性についてです。 SC_DB_DBFactoryは、Factoryと名が付いていますが、実際はファクトリークラスとしてだけでは無いように見えます。 SC_DB_DBFactoryが各DBに応じたオブジェクト(SC_QueryかSC_Helper_DB)を返すのが良い気がしますが、どうでしょうか? 具体的な実装提案としては、 今のSC_Helper_DBをベースとして、SC_Helper_DB_MYSQL、SC_Helper_DB_PGSQLを作り、SC_DB_DBFactory_MYSQL、PGSQLにある固有の処理を移す。(SC_Queryも同様) DBアクセスの経路は、SC_DB_DBFactory::getHelper_DBInstance と SC_DB_DBFactory::getQueryInstance で返るオブジェクトの2経路に絞る。 ---------------- EC CUORE 株式会社クオーレ カスタマイズ御相談下さい。
|
|
|
seasoft |
投稿日時: 2010/8/8 14:01
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7367 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 関連があるかもしれない現象を別途投稿いたしました。 http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=6512&forum=14 ---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
nanasess |
投稿日時: 2010/8/6 15:31
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2313 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます Windows 環境を用意してみました.
---------------------------------------- DBサーバ MySQL 5.0.45-community-nt WEBサーバ Apache/2.2.15 (Win32) PHP/5.2.13 PHP 5.2.13 OS WIndows XP ----------------------------------------
XAMPP を使用せず, それぞれ個別にインストールしましたが, こちらの環境でも再現しました. 発現位置については, 管理画面TOP には変わりないのですが, 何らかの DB アクセスをしようとすると Apache が強制終了するようです.
本日時点のコミュニティ版(r18755) では再現しませんので, どうやら MDB2 の対応が関連していそうな感じです.
MDB2 に対応するため, include_path を書きかえたりと, 結構強引なことをしているので, もう少し調べてみます.
|
|
|
ECCUORE |
投稿日時: 2010/8/5 15:29
対応状況: −−−
|
長老 登録日: 2009/10/22 居住地: 東京 投稿: 248 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 返信ありがとうございます。 getOneの箇所でPEAR::Errorが発生していないようです。 (前述のログが出力されませんでした) html/require.phpのコメントアウトも事前に行ってみたのですが、結果は同じでした。 管理者TOP画面で落ちている原因を探ってみましたが、画面自体は表示されますので強制終了の場所はわかりませんでした。 原因と思しき箇所としては、data/class/pages/admin/LC_Page_Admin_Home.phpの64行目付近がエラーが発生してるようです。 <エラー発生するケース>
// DBバージョンの取得
$objDb = new SC_Helper_DB_Ex();
$this->db_version = $objDb->sfGetDBVersion();
下記のように変更した場合、エラーが発生しなくなりました。 <エラー発生しないケース>
// DBバージョンの取得
$this->db_version = $objQuery->getOne("select version()");
2つのケースを比べると、行ってる事にそう大差ないので 特定のSQLを発行したらエラーとなるようなケースや、特定のメソッドを読んで起こる問題では無く、実装の仕方によるものではないかと思われます。。 エラー発生ケースのみに出力されるエラーログが下記です。handle_errorでSTRICTも出力するようにしたものです。
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\class\\helper\\SC_Helper_DB.php:57 Non-static method SC_DB_DBFactory_Ex::getInstance() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\class\\SC_Query.php:61 Non-static method MDB2::connect() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:436 Non-static method MDB2::factory() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:379 Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:388 Non-static method MDB2::loadClass() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:330 Non-static method MDB2::classExists() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:389 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:2353 Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:395 Non-static method MDB2::setOptions() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:287 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:287 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:396 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:437 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2\\Driver\\mysql.php:563 Non-static method MDB2::areEquals() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:442 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\class\\SC_Query.php:80 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:1008 Non-static method MDB2::errorMessage() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:779 Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:856 Non-static method PEAR::getStaticProperty() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\class\\SC_Query.php:70 Non-static method SC_DB_DBFactory_Ex::getInstance() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2\\Driver\\mysql.php:563 Non-static method MDB2::areEquals() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:1911 Non-static method MDB2::classExists() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:1918 Non-static method MDB2::loadClass() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:330 Non-static method MDB2::classExists() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\MDB2.php:1937 Non-static method MDB2::classExists() should not be called statically, assuming $this from incompatible context
[error] [client 127.0.0.1] handle_error Error(2048) \\xampp\\htdocs\\version-2_5-dev\\data\\module\\PEAR.php:269 is_a(): Deprecated. Please use the instanceof operator
---------------- EC CUORE 株式会社クオーレ カスタマイズ御相談下さい。
|
|
|
nanasess |
投稿日時: 2010/8/5 14:41
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2313 |
Re: 【Windows上での開発環境】XAMPPでApacheが落ちます 強制終了してしまうのは,
$objQuery = new SC_Query($dsn, true, true);
と, SC_Query のコンストラクタの第二引数に true を設定している箇所ですかね? ずいぶん前から, この引数は無効でした. しかし, SC_Query 内部で, DBエラーが発生しても, 処理を止めてはいけないケースがあったりする(インストーラのテーブルチェックなど)ので, エラーが発生してもエラー画面を表示させずに処理を続行するオプションとして利用しようかなと思っています. 具体的には, このオプションが有効の場合は, trigger_error をスローせず, PEAR::Error を返して return するように考えています.
|
|
|
|
統計情報
総メンバー数は88,699名です
総投稿数は109,943件です
|