| Summary | Horde with PHP 5.0.3: Prefs don't get saved in the database |
| Queue | Horde Base |
| Queue Version | 3.0.2 |
| Type | Bug |
| State | Not A Bug |
| Priority | 2. Medium |
| Owners | |
| Requester | webmaster (at) ragnarokonline (dot) de |
| Created | 02/07/2005 (7579 days ago) |
| Due | |
| Updated | 02/16/2005 (7570 days ago) |
| Assigned | 02/08/2005 (7578 days ago) |
| Resolved | 02/16/2005 (7570 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | |
| Patch | No |
State ⇒ Not A Bug
setting of my vhost, where horde is installed ...
However. It worked fine with PHP 4.
Can anyone tell me, why this requires access to my Apache2 base dir to
work? Even allowing every single subdirectory of my Apache2-dir didn't
fix this.
no problems.
so it's not a misconfiguration issue on my side.
The following testcase works as expected, so this semms not to be a
global issue with PHP 5:
<?php
class FOO
{
var $test1 = 123;
var $test2 = 'blah';
var $test3 = true;
var $test4 = false;
var $test5 = array(123, 'blah', true, false);
var $test6 = 0;
}
function foobar($return = false)
{
global $docroot, $foobar;
if (!$return)
file_put_contents($docroot . '/foobar.txt', '$foobar = ' .
var_export($foobar, true) . ";\n");
else
return "\n\n\$foobar = " . var_export($foobar, true) . ";\n";
}
function blah($return = false)
{
global $docroot, $blah;
if (!$return)
file_put_contents($docroot . '/blah.txt', '$blah = ' .
var_export($blah, true) . ";\n");
else
return "\n\n\$blah = " . var_export($blah, true) . ";\n";
}
$docroot = $_SERVER['DOCUMENT_ROOT'];
register_shutdown_function('foobar');
register_shutdown_function('blah');
$foobar = clone(new Foo());
$blah =& new Foo();
echo foobar(true);
echo blah(true);
$blah->test1 = $foobar->test1 = 456;
$blah->test2 = $foobar->test2 = 'moo';
$blah->test3 = $foobar->test3 = false;
$blah->test4 = $foobar->test4 = true;
$blah->test5 = $foobar->test5 = array(456, 'moo', false, true);
$blah->test6 = $foobar->test6 = 12;
echo foobar(true);
echo blah(true);
?>
State ⇒ Feedback
*huge* BC break in PHP5, if that's really the case.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Horde with PHP 5.0.3: Prefs don't get saved in the database
Queue ⇒ Horde Base
After some research I've found out, that the changes get lost
somewhere between the end of the script and the execution of the
shutdown-function.
Adding $prefs->store(); to the very end of
/path/to/horde/services/prefs.php and
/path/to/horde/services/portal/edit.php did the trick as a workaround.
Looks, like PHP 5 destroys the $prefs-instance, before the
shutdown-function is being executed.