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

Comments

mokko’s picture

Stupid 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.

bojanz’s picture

Are you sure that PDO is not installed from PECL?
Looks like it...

jhodgdon’s picture

RE #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).

jhodgdon’s picture

Also, just to point out, I had the same problem in both MySQL and PostgreSQL.

jhodgdon’s picture

Also, 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.

jhodgdon’s picture

chx 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.

jhodgdon’s picture

Title: Cannot install on PHP 5.3.2 » Cannot install on PHP 5.3.2 with xdebug
Priority: Critical » Normal

I 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...

jhodgdon’s picture

Heine 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

jhodgdon’s picture

And 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.

jhodgdon’s picture

StatusFileSize
new312 bytes

here's my xdebug config

jhodgdon’s picture

Status: Active » Closed (works as designed)

Heine 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!!

heine’s picture

Status: Closed (works as designed) » Active

You 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.

heine’s picture

Title: Cannot install on PHP 5.3.2 with xdebug » Display a requirements error when xdebug.show_exception_trace is enabled
heine’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

Please test; I'm not in the possession of an xdebug install atm.

heine’s picture

I tested on an install with xdebug and it does produce a requirements error when the setting is enabled.

moshe weitzman’s picture

Priority: Normal » Minor

I 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?

heine’s picture

There 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.

moshe weitzman’s picture

Category: bug » task
Status: Needs review » Reviewed & tested by the community
shunting’s picture

One more report, and yes, #12 works.

mokko’s picture

I guess shunting means #15. Can somebody confirm that?

jhodgdon’s picture

shunting may mean #12, which is where I told how to get rid of the setting.

webchick’s picture

Hm. 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.

shunting’s picture

I do mean #12.

webchick’s picture

Title: Display a requirements error when xdebug.show_exception_trace is enabled » Warn people not to enable xdebug.show_exception_trace
Status: Reviewed & tested by the community » Fixed

Ok, 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).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xano’s picture

heine’s picture

Status: Active » Fixed

This was fixed via the requirements page.

David_Rothstein’s picture

Status: Fixed » Active

Could 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?

try {
  throw new Exception('Your server is not configured to handle exceptions properly.  See the [system requirements page on d.o.] for more information.');
}
catch (Exception $e) {
}

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.

jhodgdon’s picture

+1 on this simple idea. Maybe there are other reasons exceptions wouldn't work, and this would catch that before the installation just failed.

xano’s picture

That 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...

David_Rothstein’s picture

@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).

jhodgdon’s picture

How about a patch, and a screen shot of what this would look like for someone with exception tracing turned on?

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.