Re: install issue in trunk : missing domain_cookie function
Maât <[email protected]> Sun, 28 Sep 2008 12:52:22 +0200
| Newsgroups | gmane.comp.web.phpgroupware.devel |
|---|---|
| Message-ID | <[email protected]> |
Maât a écrit :
> Maât a écrit :
>> Dave Hall a écrit :
>>> On Sat, 2008-09-27 at 22:01 +0200, Maât wrote:
>>>
>>>> hi all,
>>>>
>>>> svn reorg main part is nearly done and i'm currently testing the
>>>> result
>>>>
>>>> install process hangs when trying to display config form (step 2)
>>>>
>>>> the crash occurs at line 288 of setup/config.php when $newval ==
>>>> "cookie domain":
>>>>
>>>> $setup_tpl->set_var($value, $newval($current_config) );
>>>>
>>>> because then function cookie_domain() does not exist
>>>>
>>>> now i have found the "why and how" of the crash i need help for the
>>>> "how to solve" part of the debug round :)
>>>>
>>>
>>> As has been discussed here on several occassions - trunk is currently
>>> uninstallable.
>>>
>>> Cheers
>>>
>>> Dave
>>>
>> <mode grunt>
>> i'd rather have received something more useful to solve the problem
>> than this "we-know-its-fscked-mail"
>> </mode>
> answer to myself :
>
> 1) First crash : due to incomplete move to hook system :
>
> a cookie_domain() function is missing in setup/inc/hook_config.inc.php
>
> supposed to return a string like that :
>
> "<option value="value1">label 1</option>
> <option value="value2">label 2</option>
> <option value="value3">label 3</option>"
>
> no clue of what the cookie domain is useful for...
>
> => workaround = create this function so that it exists and returns a
> correct string with "flokloric data"
>
> 2) Once something is done to prevent first crash : Second crash
>
> phpgw session system is used at user creation level but
> $GLOBALS['phpgw_info']['server']['webserver_url'] global param is not
> defined at the moment
>
> => crash in /phpgwapi/inc/class.sessions.inc.php with not defined
> index error in
>
> protected function _phpgw_set_cookie_params() near line 1446 :
>
> session_set_cookie_params(0,
> $GLOBALS['phpgw_info']['server']['webserver_url'],
> $this->_cookie_d2omain, $secure, true);
>
> => i guess this function should check things before trying to set the
> session cookie
>
> possible workaround :
>
> replace the above line by these :
>
> if ( isset($GLOBALS['phpgw_info']['server']['webserver_url']))
> {
> session_set_cookie_params(0,
> $GLOBALS['phpgw_info']['server']['webserver_url'],
> $this->_cookie_domain, $secure, true);
> }
> else
> {
> session_set_cookie_params(60, "/",
> $this->_cookie_domain, $secure, true);
> }
> return $this->_cookie_domain;
> }
>
>
> 3) Then third crash
>
> PHP Fatal error: Class 'phpgwapi_sql_entity' not found in
> phpgwapi/inc/class.contact_addr_type.inc.php on line 28
>
> it seems that most of phpgwapi/inc/class.contact_*.inc.php contain
> classes that extend phpgwapi_sql_entity
>
> ... but the phpgwapi_sql_entity is defined nowhere :-(
>
> i'll try to define an empty phpgwapi_sql_entity class in
> phpgwapi/inc/class.sql_entity.inc.php and check the result.
>
> Stay tuned...
>
> Maât
oh and i forgot the missing phpgwapi/inc/class.globally_denied.inc.php
also called by setup at sysadmin creation step
At the moment the one i created if fairly simple :
class phpgwapi_globally_denied
{
static function user()
{
return null;
}
}