6.0.0-beta1
9/24/25

[#3016] preference saving due to PEAR::db failure
Summary preference saving due to PEAR::db failure
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester phyre (at) rogers (dot) com
Created 11/22/2005 (7246 days ago)
Due
Updated 12/01/2005 (7237 days ago)
Assigned 11/22/2005 (7246 days ago)
Resolved 12/01/2005 (7237 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/01/2005 10:31:23 PM Chuck Hagenbuch Comment #7
State ⇒ Resolved
Reply to this comment
Changed in HEAD and FRAMEWORK_3 (will be in Horde 3.1).
12/01/2005 10:19:22 PM Chuck Hagenbuch Comment #6
State ⇒
Reply to this comment
This is _definitely_ a bug in PHP. But after discussion with some of 
the other developers we'll go ahead and work around it for now.
12/01/2005 09:02:11 PM phyre (at) rogers (dot) com Comment #5 Reply to this comment
I don't believe this is bogus, as it does not appear to be a problem 
with PHP.  It seems to be a change in PHP, in which Horde needs to 
account for in order to ensure compatibility.



Moving the require_once('DB.php') from within the _connect function to 
outside of the class in horde/lib/Horde/Prefs/sql.php seems to solve 
the problem.  It is clear that PHP doesn't want you to introduce new 
files while it's shutting down or shuts something down in a different 
order.



It also doesn't change the way the functions work, but just moves the 
define.  So why not move the line and everyone is happy?



To add to it, I've found a few posts on the net stating the same 
solution I found.  The open_basedir is right, but the fact that it's 
trying to include in the shutdown function is causing issues.
12/01/2005 07:15:21 PM Chuck Hagenbuch State ⇒ Not A Bug
 
11/22/2005 06:24:56 PM Chuck Hagenbuch Comment #4 Reply to this comment
I should also note DB.php is in /usr/local/lib/php which is in my 
open_basedir path
there.
Then why are you reporting this as a bug in Horde, not PHP?
11/22/2005 06:23:20 PM phyre (at) rogers (dot) com Comment #3 Reply to this comment
Because the open-basedir seems to bring in this behavour... suggesting 
that maybe something in 5.0.5 changed the order of the shutdown and is 
preventing opening that.



I should also note DB.php is in /usr/local/lib/php which is in my 
open_basedir path there.



-M
11/22/2005 06:21:29 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Nonetheless, this looks like an interesting bug- I'd imagine
something to do with http://bugs.php.net/bug.php?id=33772 maybe?
That bug appears to have nothing to do with open_basedir - what's the 
relation?
11/22/2005 04:18:25 PM phyre (at) rogers (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ preference saving due to PEAR::db failure
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
Reply to this comment
Using php 5.0.5 / MySQL 4.0



I receive the following messages while saving preferences in PHP's 
error log and preferences are not saved.



PHP Warning:  Prefs_sql::_connect(DB.php) [<a href='function.-connect'>func

tion.-connect</a>]: failed to open stream: Operation not permitted in 
/home/e/site/site.com/webmail/horde/lib/Horde/Prefs/sq

l.php on line 381, referer: 
http://webmail.site.com/horde/services/prefs.php?group=identities&app=horde



PHP Fatal error:  Prefs_sql::_connect() [<a href='function.require'>functio

n.require</a>]: Failed opening required 'DB.php' 
(include_path='/home/e/site/site.com/webmail/horde/lib:.:/usr/local/lib/php

') in /home/e/site/site.com/webmail/horde/lib/Horde/Prefs/sql.php on 
line 381, referer: http://webmail.site.com/horde/s

ervices/prefs.php?group=identities&app=horde



This is with open_basedir on.



Moving the require_once('DB.php') from within the _connect function to 
outside of the class in horde/lib/Horde/Prefs/sql.php seems to solve 
the problem.



Nonetheless, this looks like an interesting bug- I'd imagine something 
to do with http://bugs.php.net/bug.php?id=33772 maybe?

Saved Queries