@ install.php?profile=standard&locale=en&op=start&id=1

Message:
The installation has encountered an error.
Please continue to the error page

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://dev.localhost/d7/install.php?profile=standard&locale=en&id=1&op=do StatusText: OK ResponseText: Fatal error: Class 'FieldException' not found in /home/harry/dev/d7/modules/field/field.attach.inc on line 12

Then enter the error page, 1) fill fields 2) Save and continue
And then show me
Fatal error: Class name must be a valid object or a string in /home/harry/dev/d7/includes/common.inc on line 6540

==
My installing env.
Arch Linux
Apache/2.2.14 (Unix)
MySQL: 5.1.42
PHP 5.2.12 with Suhosin-Patch 0.9.7
Firefox 3.5.7

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ahqar’s picture

It looks like an incompatibility with the eAccellerator extension for PHP.

I had the same problem but it went away when I disabled eAccellerator in PHP. I hope this assists someone in finding a solution.

Cody G’s picture

I get the same error. I'll have to do some research to see if disabling eAccellerator will effect other domains on my server.

baxang’s picture

I got the same problem and succeeded when I turned eAccellerator off.

OS X 10.6, Apache2, MySQL 5.1, PHP5.2.11 with APC installed.

Ahqar’s picture

Issue tags: +eAccellerator

Tagged

akalata’s picture

Same initial error as #1, on a "minimal" install. After clicking on the "Error page" (which didn't describe any errors) and filling in the rest of the site information fields, the next page (@/install.php?q=install.php&profile=minimal&locale=en) displays
Fatal error: Call to undefined function field_attach_load() in /home/drupal7/public_html/includes/entity.inc on line 241

Drupal version 7.0-alpha2
Apache
MySQL 5.0.89
PHP 5.2.11

Install succeeds after disabling eAccellerator.

Cody G’s picture

I would like to get my server D7 capable, but can't get a successful install on current server due to this EAccelerator which is used by other scripts. Can anyone clarify ... will I need to dedicate a server to D7 operations or, will D7 have this issue resolved?

marcvangend’s picture

int’s picture

The issue is posted before that this one... so, this one is duplicated :p

marcvangend’s picture

@#8: I know, but this one is more active and more likely to appear in search results, because it contains the error message in plain text.

marcvangend’s picture

Version: 7.0-alpha1 » 7.x-dev

Marked #743166: AJAX HTTP-Error during installation with minimum configuration as duplicate. It has been reported over there that this issue is still present in the latest dev version.

marcvangend’s picture

Title: The installation has encountered an error. » AJAX HTTP error during install on servers with opcode cache

Better title.

Could this be caused by Bug #14066 Class autoloades earlier when using APC?

MaWe4585’s picture

I now installed xampp on my workstation and activated eAccelerator, now i have the same problems.
When i deactivate eAccelerator it works fine.
I activated eAccelerator again and also eAccelerator-debug.

The error-message when i use http://localhost/drupal7/ is:
Fatal error: Cannot override final method Exception::__clone() in T:\xampp\htdocs\drupal7\modules\field\field.module on line 124

The log-file contains this:

EACCELERATOR hit: "T:\xampp\htdocs\drupal7\index.php"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\bootstrap.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\sites\default\settings.php"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\cache.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\database\database.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\database\mysql\database.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\database\mysql\query.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\database\query.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\module.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\dblog\dblog.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\overlay\overlay.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\session.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\lock.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\common.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\path.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\theme.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\pager.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\database\select.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\menu.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\tablesort.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\file.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\stream_wrappers.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\unicode.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\image.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\form.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\mail.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\actions.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\ajax.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\token.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\errors.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\block\block.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\color\color.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\comment\comment.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\includes\entity.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\contextual\contextual.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\dashboard\dashboard.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.module"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.crud.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.default.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.info.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.multilingual.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.attach.inc"
EACCELERATOR hit: "T:\xampp\htdocs\drupal7\modules\field\field.module"
EACCELERATOR cached: "T:\xampp\htdocs\drupal7\modules\field\field.form.inc"

I use this on a working installation, so don't wonder why i have other messages as shown above.
Looks like this is not an installation problem, but an eAccelerator/Caching-Problem

Ahqar’s picture

Issue tags: +AJAX HTTP error

Added Tag:

dhthwy’s picture

Title: AJAX HTTP error during install on servers with opcode cache » Child before parent class definition order breaks some opcode cachers
Component: install system » field system
Status: Active » Needs review
FileSize
1.17 KB

In field.module child class definitions for the base class FieldException are loaded in before FieldException is defined. This breaks some opcode cachers such as eAccelerator.

According to: http://php.net/manual/en/keyword.extends.php

Note: Classes must be defined before they are used! If you want the class Named_Cart to extend the class Cart, you will have to define the class Cart first. If you want to create another class called Yellow_named_cart based on the class Named_Cart you have to define Named_Cart first. To make it short: the order in which the classes are defined is important.

catch’s picture

Status: Needs review » Needs work

This looks great but I think the link to PHP docs is better added to http://drupal.org/coding-standards - we can't be adding that same block to every place this might occur. Otherwise looks RTBC. Suggest we commit this patch but leave the issue open (downgraded to normal) in case others show up.

dhthwy’s picture

Status: Needs work » Needs review
FileSize
1.04 KB

Removed comments I added per catch.

After I patched the install went smooth. Went ahead and enabled all core modules and played around for a bit and all seems fine now. So hopefully field.module is the only file that needs the fix.

catch’s picture

Status: Needs review » Reviewed & tested by the community
dhthwy’s picture

Ok I discovered that this issue is a duplicate of http://drupal.org/node/708426 which has a status of "Won't Fix" by chx on the grounds that it's an Xcache bug (in that case).

This is not an Xcache or an eAccelerator bug. The PHP docs very clearly state that order of class definitions IS important and the parent definition MUST come first. The opcode cachers are going to follow design spec laid out by PHP. The code in its current state isn't proper use of classes in PHP and therefore is broken and we can't expect Xcache or eAccel. to fix something that PHP apparently wasn't designed for.

A LOT of people are going to be wanting to run Xcache or eAccel with Drupal 7 and as it is right now, no one's going to be able to use them until this gets fixed.

marcvangend’s picture

Dries already proved back in 2006 that opcode caching is a good way to improve performance: http://buytaert.net/drupal-webserver-configurations-compared. I see no reason why this patch should not be committed.

Half a dozen people have reported this bug; two others even created duplicate issues because it's not easy to find the cause of this error. In other words, it wouldn't be right to dismiss this as an APC/Xcache/eAccel bug and be done with it - especially since it seems to be easy to fix on our side.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Heine’s picture

@ #18, the link you provided documents PHP 4 behaviour. I cannot see a similar statement, nor formal rules, for PHP 5.

That said, the problem is easily prevented in this case. What happens when one extends a class that still needs to be autoloaded?

dhthwy’s picture

Heine,

Thanks for pointing out that the documentation I referenced was for PHP4. I can't believe I missed that :)
I wasn't able to find much documentation on it either. I was only able to find bug reports, many of which were never replied to.
I'm certainly by no means a PHP guru and especially not a PHP OOP guru. My understanding is that the __autoload function was introduced to address this problem.

Interestingly I turned off Zend Optimizer and eAccelerator and tried the following code:

class one extends two {}
class two extends three {}
class three {}

Even with the opcode caching turned off, PHP5 still throws a fatal error on my install (I made sure to verify the opcode caching was disabled).

According to bug reports, class order shouldn't matter as long as they're defined in the same file (PHP4 bug report, which differs from their PHP4 docs), _however_ it does seem to make a difference when you've got more than 2 levels of inheritance. So this code will work with only 2 levels:

class one extends two {}
class two {}

I suppose I can try filing a PHP bug report and request that they clarify this in their PHP5 docs.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Status: Closed (fixed) » Active

I did a git pull from git.drupalfr.org (a516e373) and tried to do an install on php 5.2.13 with apc 3.1.3 enabled. Same thing: apc.enabled="1" gives "the loop" while apc.enabled="0" turns into above error ( field_attach_load() ). Turning APC completely off solves the issue.

marcvangend’s picture

jbergstroem: can you test it with CVS HEAD? I don't know what's in git.drupalfr.org but CVS is leading.

dhthwy’s picture

Please paste the exact error that occurred.

Anonymous’s picture

marcvangend: Did a clean CVS checkout (the git.drupalfr.org is synced to this, so it is essentially the same version) - same result.

dhthwy: What I currently experience is the "loop" where database settings post returns to itself or the site info post returns to database settings. No tables are created. Can I further debug this with any debug flags in drupal?

Heine’s picture

Anonymous’s picture

Status: Active » Closed (fixed)

Heine: Thanks a bunch for the input, stat was indeed set to 0. I'll close this again.

royce.williams’s picture

I have researched this and related issues - often collectively referred to as "The 31 Tables Problem", because it interrupts the table creation process before all 73 or so tables are loaded. See this comment for a semi-exhaustive list of things that have helped people work through this issue. If your fix does not appear in my list, contact me and I will add it to the comment.