Discussion:
install issue in trunk : missing domain_cookie function
Maât
2008-09-27 20:01:25 UTC
Permalink
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 ineed help for the "how
to solve" part of the debug round :)

cheers,
Maat
Dave Hall
2008-09-28 05:59:37 UTC
Permalink
Post by Maât
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
$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 ineed 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
Maât
2008-09-28 06:29:49 UTC
Permalink
Post by Dave Hall
Post by Maât
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
$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>
Maât
2008-09-28 10:07:27 UTC
Permalink
Post by Maât
Post by Dave Hall
Post by Maât
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 ==
$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
Maât
2008-09-28 10:52:22 UTC
Permalink
Post by Maât
Post by Maât
Post by Dave Hall
Post by Maât
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 ==
$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>
a cookie_domain() function is missing in setup/inc/hook_config.inc.php
"<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
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
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;
}
}

Loading...