2009年12月1日火曜日

 

【Xoops】PHPデバックモードで「Notice[PHP]: Undefined variable:~」エラーの対処

以下の様なエラーが出る場合の対処。

Notice [PHP]: Undefined variable: global_perms in file xoops_trust_path/modules/gnavi/include/common_prepend.inc.php line 46
Notice [PHP]: Undefined variable: global_perms in file xoops_trust_path/modules/gnavi/include/common_prepend.inc.php line 47
Notice [PHP]: Undefined variable: global_perms in file xoops_trust_path/modules/gnavi/main/category.php line 47
Notice [PHP]: Undefined variable: orgfile_name in file xoops_trust_path/modules/gnavi/main/submit.php line 447
Notice [PHP]: Undefined variable: orgfile_name1 in file xoops_trust_path/modules/gnavi/main/submit.php line 448
Notice [PHP]: Undefined variable: orgfile_name2 in file xoops_trust_path/modules/gnavi/main/submit.php line 449

次の様に修正する。「/xoops_trust_path/modules/gnavi/include/common_prepend.inc.php」を変更。
または、モジュール「XANHTEユーティリティ」をアンインストール。

/* 「/xoops_trust_path/modules/gnavi/include/common_prepend.inc.php」 */
// 変更前
<?php
 //include files require_once dirname(dirname(__FILE__)).'/include/read_configs.php' ;
 require_once dirname(dirname(__FILE__)).'/include/get_perms.php' ;
 require_once dirname(dirname(__FILE__)).'/include/draw_functions.php' ;
 require_once dirname(dirname(__FILE__)).'/include/common_functions.php' ;
 require_once dirname(dirname(__FILE__)).'/include/common_javalang.inc.php' ;
 require_once XOOPS_ROOT_PATH."/class/xoopstree.php" ;

// 変更後
<?php
 //include files require dirname(dirname(__FILE__)).'/include/read_configs.php' ;
 require dirname(dirname(__FILE__)).'/include/get_perms.php' ;
 require_once dirname(dirname(__FILE__)).'/include/draw_functions.php' ;
 require_once dirname(dirname(__FILE__)).'/include/common_functions.php' ;
 require_once dirname(dirname(__FILE__)).'/include/common_javalang.inc.php' ;
 require_once XOOPS_ROOT_PATH."/class/xoopstree.php" ;

モジュール「XANHTEユーティリティ」とバッティングしている為、エラーが出る模様。

参考
HD1.0.2 for XCL2.1 に update後GNAVIで投稿できなくなりました - Xoops Users Group Japan

ラベル:


2009年11月24日火曜日

 

【PHP】ファイルダウンロード

リンククリックで「ファイルを保存する」ウィンドウを開くようにする。
PHPファイルにリンクして、PHPからダウンロードさせるファイルの情報をヘッダとして渡す。
直接、ファイルにリンクしてもブラウザで開くだけだから。

File_Archive - PEAR

PEARライブラリ使うと楽らしい。圧縮も出来る様子。

参考
PHPでファイルダウンロードさせる方法 - ゆるゆると
PHPでクリックした時にファイルをダウンロードさせる設定 - OPQR.jp

ラベル:


 

Basic認証

注意点
参考
Basic認証 - W3G - World Wide Web Guide
.htaccessを使ってアクセス制限するにはどうしたらいいのでしょうか? - XREA FAQ[私設応援団]
暗号化CGIあり。

ラベル:


This page is powered by Blogger. Isn't yours?

登録 投稿 [Atom]

この日記のはてなブックマーク数