I'm running an Ubuntu box with PHP Version 5.3.2-1ubuntu4.5, MySQL 5.1.41-3ubuntu12.6, Apache/2.2.14 (Ubuntu).
With a clean CVS checkout of Drupal 7 HEAD this morning, I cannot install. I ran install.php with a clean settings.php (copy of default.settings.php), into a clean MySQL database.
It gets far enough to ask me for the database information, and I click the button to proceed. Then it creates the db tables (I can see them in PHPMyAdmin), but I get a PHP error mess on the screen. The errors are all saying it can't find various database tables that exist, such as the variables table.
This happens on both the minimal and standard installs. I also tried it with PostgreSQL 8.4.4 and I got the same problem there (slightly different error messages, of course).
Example of one (of many) lines of error message:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd7dev.variable' doesn't exist in /opt/www/eclipsework/d7new/includes/database/database.inc on line 1970
(d7dev is the database name, and the variables table most certainly does exist).
Error message from PostgreSQL:
PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "variable" does not exist LINE 1: SELECT value FROM variable WHERE name = 'install_task' ^ in /opt/www/eclipsework/d7new/includes/database/database.inc on line 1970
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | do-947616-xdebug-requirements-error.patch | 1.23 KB | heine |
| #11 | xdebug.ini_.txt | 312 bytes | jhodgdon |
Comments
Comment #2
mokko commentedStupid question but are you sure that database has the relevant permissions? You say nothing about setting up the db in your post. Just an idea. I have seen (with D6) similar errors when permissions were wrong/incomplete.
Comment #3
bojanz commentedAre you sure that PDO is not installed from PECL?
Looks like it...
Comment #4
jhodgdonRE #1: the db perms are fine. I just wiped out an existing db, and Drupal was able to create the tables anyway.
RE #3: This server was running Drupal fine until I did a CVS update (previously I was on HEAD from about 7 weeks back).
Comment #5
jhodgdonAlso, just to point out, I had the same problem in both MySQL and PostgreSQL.
Comment #6
jhodgdonAlso, the same server is still running a different PostgreSQL Drupal site, running off of HEAD that was last updated several weeks ago. It's just today's HEAD that wont' install/run. So I think PDO is working fine on this server in general.
Comment #7
jhodgdonchx suggested in IRC that perhaps CVS was giving me trouble, so I just downloaded the tarball from d.o, and had the same problem. I'm going to try running this through the debugger and see what I can find out.
Comment #8
jhodgdonI was running xdebug, so I turned that off (at the suggestion of folks in IRC) and now I can install.
Changing title and downgrading the issue...
Comment #9
jhodgdonHeine asked in IRC about the xdebug version...
phpinfo() reports this at the bottom:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0rc1, Copyright (c) 2002-2010, by Derick Rethans
and dpkg -l reports
package: php5-xdebug 2.1.0RC1
Comment #10
jhodgdonAnd as one more note: I turned off xdebug, installed, and turned xdebug back on. I can now run this Drupal site without any problems. So it's just the installation that is the problem, apparently.
Also, I am running Ubuntu 10.04 , and I am about to attach my xdebug.ini file in a separate comment.
Comment #11
jhodgdonhere's my xdebug config
Comment #12
jhodgdonHeine figured out the problem.
From http://xdebug.org/docs/stack_trace
xdebug.show_exception_trace
Type: integer, Default value: 0
When this setting is set to 1, Xdebug will show a stack trace whenever an exception is raised - even if this exception is actually caught.
I had this setting turned on, so it was barfing on caught exceptions, causing the installer to crash.
I guess this is not a bug after all. phew!
Thanks Heine!!
Comment #13
heine commentedYou are of course welcome.
I'm setting this back to active; because this error happens quite late, we should be able (I guess) to check whether xdebug.show_exception_trace is on during the requirements check.
Comment #14
heine commentedComment #15
heine commentedPlease test; I'm not in the possession of an xdebug install atm.
Comment #16
heine commentedI tested on an install with xdebug and it does produce a requirements error when the setting is enabled.
Comment #17
moshe weitzman commentedI don't see a Drupal bug here. If you ask for trace, you get a trace. It isn't our fault that it happens for caught exceptions. File a bug with xdebug, no?
Comment #18
heine commentedThere is no bug, not in xdebug, not in Drupal.
The setting prevents installation though, and while not all the rage, seems not to be uncommon on potential Drupal developer's local instances. Afaik this is the third or fourth report.
Comment #19
moshe weitzman commentedComment #20
shunting commentedOne more report, and yes, #12 works.
Comment #21
mokko commentedI guess shunting means #15. Can somebody confirm that?
Comment #22
jhodgdonshunting may mean #12, which is where I told how to get rid of the setting.
Comment #23
webchickHm. I'm a bit torn on this one. I don't like putting code into core that checks specific developer tools' configurations. It becomes a "me too" game and pretty soon we end up with vi tab set lines in all of our code files.
OTOH, this is an installer bug, and to those who hit it Drupal will seem extremely broken indeed.
Gonna let this sit for another couple days and thinker a bit more.
Comment #24
shunting commentedI do mean #12.
Comment #25
webchickOk, I have thought this over, and in the end I think we don't want to start including specific checks for specific environment variables in the installer. There's still a couple of days if people strongly disagree.
What I have done instead is my best to encapsulate #12 into the system requirements page (diff) since that does get into all those nitty-gritty configuration details and can be added to/updated at any time (not bound to string freeze).
Comment #27
xanoReopening this issue as per catch's comment in #1074098: DatabaseConnectionNotDefinedException: The specified database connection is not defined: default.
Comment #28
heine commentedThis was fixed via the requirements page.
Comment #29
David_Rothstein commentedCould someone clarify why this setting causes the Drupal installer to stop working? I get why it's printing the stack trace to the screen, of course, but I'm not sure I understand why that prevents Drupal from being installed. It seems there could be a bug.
Either way, I think we can do something within Drupal to address this. It shouldn't be necessary to add code that checks for xdebug-specific settings. At the very least, couldn't we just do something like this earlier in the installation process?
Not very pretty looking, of course, but at least it would give people who run into this a clear message that explains what the problem is.
Comment #30
jhodgdon+1 on this simple idea. Maybe there are other reasons exceptions wouldn't work, and this would catch that before the installation just failed.
Comment #31
xanoThat won't work. Xdebug will display traces no matter if an exception was caught (source).
// Edit: my bad. I just read the code and not the exception's message...
Comment #32
David_Rothstein commented@Xano, yes, that's the idea. The point is that if we can't stop it from showing the exception trace, at least we can make the exception message itself something meaningful for the situation (rather than
"PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd7dev.variable' doesn't exist"like the situation that started this thread, or whatever other random exception might happen to trigger it).Comment #33
jhodgdonHow about a patch, and a screen shot of what this would look like for someone with exception tracing turned on?