For example, I have different subdomain, like "www.myweb.com", "tw.myweb.com", "us.myweb.com"

I want all this use the "same" Auth function ( PHP PEAR AUTH function)

I want to loing in one place, then all places can work (in diffent sub domainname).

So, I have to set cookie to the same domain name.

 

step 1:

go to CentOS,  usr -> share -> PEAR -> Auth.php

(if you use WAMP, it will be in WAMP -> php -> PEAr -> Auth.php

 

step 2:

Open and edit Auth.php

 

step 3:

find this

setcookie('authchallenge', $this->session['challengecookie'], 0, '/');

replace to (in this example, we have to write to myweb.com):

setcookie('authchallenge', $this->session['challengecookie'], 0, '/', 'myweb.com');

there are two lines to be changed, don't forget.

 

step 4:

restart your server --"service httpd restart"

done!

 

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Chung 的頭像
    Chung

    SAP與其他程式學習筆記

    Chung 發表在 痞客邦 留言(0) 人氣()