Closed (fixed)
Project:
Drupal core
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
23 Jun 2005 at 11:28 UTC
Updated:
12 Oct 2005 at 07:20 UTC
Jump to comment: Most recent file
I've found that new cvs version doesn't get properly db_prefix.
In bootstrap.inc (function _drupal_bootstrap($phase) )
I added another global variable $db_prefix, and then it goes .
I don't know if my solution is good because on my local site I can't see any blocks and on my internet site I have some caching and I can't see anything :)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 20050630.1.bootstrap-patch.patch | 3.34 KB | chx |
| #6 | 20050630.bootstrap-patch.patch | 2.92 KB | chx |
| #5 | 20050630.bootstrap-prefix-update.patch | 1.21 KB | bart jansens |
| #2 | db_prefix_global.patch | 582 bytes | Jaza |
| bootstrap.diff | 422 bytes | kuba.zygmunt |
Comments
Comment #1
kuba.zygmunt commentedAbove I've put my patch
Comment #2
Jaza commentedAlso noticed this bug, when trying to install a fresh CVS snapshot. Attached is my patch against CVS HEAD (same as kubaZygmunt's, basically).
Comment #3
chx commentedYes, this is a bug, if you look at the bootstrap patch, there were versions when I thought variables in settings.php should be written as $GLOBALS['something'] but then introduced global $something . Forgot when that something is db_prefix .
Comment #4
Jaza commentedCan this patch be applied to HEAD please? This is not something that should be left sitting around in the issues list. Chx has identified that it was a simple honest mistake on his part, and has indicated that the submitted patch(es) will fix the mistake.
Until this patch is applied, anyone who tries to install HEAD using db prefixes will get a fatal error. It doesn't get much more critical than that :-p.
Comment #5
bart jansens commentedThere is another related problem, it is no longer possible to override variables in settings.php.
And update.php no longer works.
Updated patch attached.
Comment #6
chx commentedOh, and XML-RPC client is broken too. I talked with walkah and we found it the best to move xmlrpc.inc to modules which use them.
Comment #7
chx commentedsome more xml-rpc fixes.
Comment #8
Steven commentedMaking XML-RPC a conditional include was discussed a while ago, and decided against due to problems with the class persistency. Why is this now possible?
Comment #9
walkah commentedbasically - it's not. the problem is, well, the xmlrpc.inc is not very well written. It requires / depends on several global variables, etc. which leads to a fair bit of the scoping issues. If you look at what PEAR has done with this (since their XML-RPC module is based on the same original code)... you'll notice lots of $GLOBALS['...'] usage (see http://cvs.php.net/co.php/pear/XML_RPC/RPC.php) . Basically, I think we have 3 options:
1) keep banging on this old code to make it work.
2) switch libraries to either PEAR::XML-RPC or something like incutio's (http://scripts.incutio.com/xmlrpc/)
3) re-write our own custom xml-rpc library
personally, I'd +1 #2 - since #1 is ugly, and #3 I personally don't have time for, and I'd rather see our developer resources going to more interesting things.
that said, i know there are those with strong feelings against 3rd party libraries... but this needs to get fixed quickly. blogapi and drupal dist_auth are both currently broken in HEAD. (isn't there anyone else here that tests XML-RPC stuff??)
Comment #10
walkah commentedjust to follow up.. chx's patch in #7 only fixes XMLRPC servers... anything that uses XML-RPC client (i.e. drupal_auth or ping) will still be busted.
Comment #11
moshe weitzman commentedthe 'we shouldn't use 3rd party libraries' argument is hogwash. that was recenyly followed up with 'look where that got us recently' which is even more stupid. security problems happen in your own code, and in other people's code. we've had several security mistakes of our own, and those mistakes have persisted a long time.
the benefit of 3rd party libraries is that you don't have to write them, debug them, document them, or maintain them. if someone here is willing to do all of this for XMLRPC then great. But thats extremely unlikely so we either have to drop the whole feature set or use a 3rd party library.
as you can tell, i favor #2 as well - switching libraries so we can do conditional inclusion.
Comment #12
dries commented#2 isn't GPL
Comment #13
dries commentedLooks like WordPress might be using that class though. Weird. I know Wordpress had a least two security issues with their XML-RPC library (and they aren't using Edd Dumbill's). There is no word about this at http://scripts.incutio.com/xmlrpc/ so it looks like it isn't maintained either (which renders the advantages of using third-party libraries moot-ish).
Comment #14
dries commentedThe WP developers confirmed that they are using this library.
Turns out there is a new website for it too: http://simon.incutio.com/archive/2005/05/23/ixr. WordPress' version lives at http://trac.wordpress.org/log/trunk/wp-includes/class-IXR.php. Some extra details at http://trac.wordpress.org/ticket/1400.
Looking at the code, it doesn't appear to be PHP5 compliant. Plus, I'm not sure the license is compatible.
Comment #15
chx commentedI will rewrite the Incutio XML-RPC library for our own usage in July, I know this for quite a long time.
a) I intend to start with Incutio's XML-RPC
b) I contacted the author already and he is fine with GPL'ing the result.
c) the result will be quite a bit different from the original, 'cos I'll make it use procedural notation and overall, more Drupalish.
Comment #16
chx commentedComment #17
chx commentedDries, while the xmlrpc rewrite is under way please commit Bart's patch http://drupal.org/node/25600#comment-34362
Comment #18
matt westgate commentedI've tested out Bart's patch and it does indeed restore update.php and allow $conf overrides. Might be worth fixing this for now while we continue to work on a long term solution.
Comment #19
dries commentedI think error handling is broken too. On drupal.org, PHP warnings/errors show up on pages while they are configured only to show up in the logs. They no longer show up in logs; it looks like the call to
set_error_handler()didn't "stick" ...Comment #20
dries commentedupdate.phpis broken too.chx: if you can't come up fixes within 24 hour, I'll have to rollback this patch for the time being. It's a bottleneck problem.
Comment #21
dries commentedFYI: I committed Bart's update.php patch. Sorry, it got lost in the discussion/flow.
Comment #22
chx commentedhttp://drupal.org/node/26391 bootstrap itself is fixed, xmlrpc is rewritten but that's a new isue altogether.
Comment #23
(not verified) commentedComment #24
(not verified) commentedComment #25
(not verified) commentedComment #26
Tobias Maier commentedComment #27
(not verified) commentedComment #28
(not verified) commentedComment #29
(not verified) commented