PEAK XOOPS - Minor problem with IIS in englishin japanese

Minor problem with IIS

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2005/2/23 16:58
herve  ¾åÅùʼ From: France  Posts: 25
Hello,

Under IIS 5.1, $_SERVER['PATH'] is not defined, may be it could be replaced with $_SERVER['PATH_TRANSLATED'] ?

Bye,
Herv
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/2/25 4:24
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi herve

Quote:
Under IIS 5.1, $_SERVER['PATH'] is not defined, may be it could be replaced with $_SERVER['PATH_TRANSLATED'] ?

$_SERVER['PATH'] is a part for generating server-unique Tickets.

Even if $_SERVER['PATH'] is blank, the other uniq envs protects it from attacks like dictionary.

Or you mean displaying "Notice" ?

OK. I'll add a check with empty() into my ticket system.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/2/25 4:47
herve  ¾åÅùʼ From: France  Posts: 25
Hello GIJOE,

Yes, that's just because of the warning. It's not really important.

PS : Very interesting "system". Can I ask you the permission to use the ticket system for the News module ?

Bye,
Herv
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/2/25 5:01
GIJOE  ÀèǤ·³Áâ   Posts: 4110
- copy gtickets.php into modules/(dirname)/include/
- include gtickets.php in your scripts
- add Ticket hidden into your forms like this:
<input type='hidden' name='op' value='order' />
".$xoopsGTicket->getTicketHtml( __LINE__ )."
<input type='submit' name='submit' value='"._SUBMIT."' />
4 methods are valid for each usages.
See the last of this post.

- add Ticket checker into your recipent of form data like this:
if ( ! $xoopsGTicket->check() ) {
	redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
}
- That's all!


4 methods of getting a ticket:
	// render form as plain html
	function getTicketHtml( $salt = '' , $timeout = 1800 )
	{
		return '<input type="hidden" name="XOOPS_G_TICKET" value="'.$this->issue( $salt , $timeout ).'" />' ;
	}

	// returns an object of XoopsFormHidden including theh ticket
	function getTicketXoopsForm( $salt = '' , $timeout = 1800 )
	{
		return new XoopsFormHidden( 'XOOPS_G_TICKET' , $this->issue( $salt , $timeout ) ) ;
	}

	// returns an array for xoops_confirm() ;
	function getTicketArray( $salt = '' , $timeout = 1800 )
	{
		return array( 'XOOPS_G_TICKET' => $this->issue( $salt , $timeout ) ) ;
	}

	// return GET parameter string.
	function getTicketParamString( $salt = '' , $noamp = false , $timeout=1800 )
	{
	    return ( $noamp ? '' : '&' ) . 'XOOPS_G_TICKET=' . $this->issue( $salt, $timeout ) ;
	}

Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2005/2/25 5:08
herve  ¾åÅùʼ From: France  Posts: 25
Hi again GIJOE,

In fact I have took the time to study the class
So can I suppose that your reply means "yes" ?
I will, of course, give you all the necessary credits.

Bye,
Herv
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/22 2:33
herve  ¾åÅùʼ From: France  Posts: 25
Hello,

I have added, but may be you saw it, the ticket class to the News module, but some users (webmasters) can't edit their news because they receive, from the ticket class the following error message :
Quote:
Invalid session
Do you hava a idea of what could cause the problem ?

A user reported me that the problem was solved when he created a SESSION folder at the root of his Xoops installation.

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/23 0:35
okuhiki  ¸àĹ   Posts: 47
日本語で失礼します。
blocksadmin 0.27 gtickets.php Line 41
$token = crypt( $salt . $usec . $_SERVER['PATH'] . $sec ) ;
$token = crypt( $salt . $usec . (empty($_SERVER['PATH']) ? $_ENV['Path'] : $_SERVER['PATH']) . $sec ) ;
として試ました。
両方とも存在しない環境では、無意味でしょうが、多少でも意図した動作に近づくでしょうか?
Votes:3 Average:10.00

question Re: Minor problem with IIS

msg# 1.1.1.1.2.1
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/31 7:00
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi herve.

It sounds just an issue of usage of SESSION with IIS.
I'm sorry that I can't understand IIS environment at all.

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/31 7:02
GIJOE  ÀèǤ·³Áâ   Posts: 4110
okuhikiさん、こんにちは。

IISでは、$_SERVER['PATH'] が定義されておらず、代わりに $_ENV['Path'] が定義されている、ということでしょうか?

それなら、ぜひそのコードを採用させていただきます。

'Path'

で間違いないですよね?
こういう部分は、 CaseSensitive ですのでそれだけ気になっています。
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/31 8:27
okuhiki  ¸àĹ   Posts: 47
こんにちは
あちらでも、こちらでも、お世話になります。

『代わりに $_ENV['Path']』ではなく、別物だと思います。
Unix系でも、存在する環境は有りますね($_ENV['PATH'])として。
Mac系は知りません。

日本語の、Windows(2000,2003,XP)ですが、初期設定では、['Path']です。

ただ、autoexec.batや、ユーザの環境設定画面で変更された場合の大文字小文字は、ユーザ任せになってしまうようです。
決め打ちでは、手落ちとなるかも知れませんね。
['Path']環境で、['PATH']は存在しませんでした。

中には、変わり者も居て、大小織り交ぜて、などという方もいらっしゃると思いますので、
path環境変数名を取得して、それを使用すると、よいかも(って他人事のように言ってみる)。
path,patH,paTh,paTH,pAth,pAtH,pATh,pATH
Path,PatH,PaTh,PaTH,PAth,PAtH,PATh,PATH
16通りですか。
何か、良い方策を発見できることをお祈りして。
----- 再起動して来ました-----
Windows2003ですが、ユーザ・管理者がシステム用のPathも合せて、path名を'Path'から'PATH'に変更して試ましたが、IIS+PHP(ISAPI)からは、['Path']で取得可能でした。
存在しない事も、固有の環境と割り切るとか。(無責任に言ってみる)
-----その後-----
色々と設定を変えてみましたが、_ENV["Path"]で取得出来るようです。_ENV['PATH']は、いずれでも存在しませんでした。
apache - Windowsでは、_SERVER['PATH']が存在してますから問題無いですね。

意味が解って書いたのではなく、実作業して得た情報です。
私の知らない環境では、不明のままです。
Votes:0 Average:0.00

normal Re: Minor problem with IIS

msg# 1.1.1.1.2.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2005/4/1 1:51
herve  ¾åÅùʼ From: France  Posts: 25
Hello,

The problem seems to be related to Internet Explorer too because on the same computer, with IIS, I have this error message with IE but not with Mozilla.
Votes:0 Average:0.00

question Re: Minor problem with IIS

msg# 1.1.2.1.1.1
Previous post - Next post | Parent - No child | Posted on 2005/4/4 16:00
GIJOE  ÀèǤ·³Áâ   Posts: 4110
okuhikiさん、こんにちは。

いろいろと実験していただきありがとうございます。

おかげで、$_SERVER['PATH']があればそれを利用して、なければ、$_ENV['Path']をトライする、という方針でよさそうですね。

参考にさせていただきます。
Votes:1 Average:10.00

normal Re: Minor problem with IIS

msg# 1.1.1.1.2.1.1.1
Previous post - Next post | Parent - No child | Posted on 2005/4/4 16:07
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi herve.

hmmm.
The behavior sounds odd.

I can do nothing till I get more informations.
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!