Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The error happened when I set up drupal7 at the install page on the last step. I've tried most ways mentioned in the issue and all failed: https://www.drupal.org/node/481758. But this didn't happend with drupal8 (all other things are the same). It seems that PHP7.1 is too new for drupal7.
Error: Call to undefined function field_attach_load() in DrupalDefaultEntityController->attachLoad() (line 354 of /var/www/drupal7/includes/entity.inc).
Environment:
ubuntu: 16.04
PHP: 7.1
Drupal: 7.53
nginx: 1.10.0
Comments
Comment #2
cilefen CreditAttribution: cilefen as a volunteer commentedComment #3
cilefen CreditAttribution: cilefen as a volunteer commentedWhat is the exact version of PHP?
Comment #4
Divya Pandey CreditAttribution: Divya Pandey at HyTechPro.com commentedI have researched this and related issues and found just drop and recreate the database as utf8_general_ci solve the problem
Comment #5
isantolin@cilefen i have the same error with this configuration
PHP 7.0.13
MySQL 5.7.17-0ubuntu0.16.04.1
Apache 2.4.18
Comment #6
isantolinSame error with PHP 5.5.9-1ubuntu4.20, Apache version 2.4.7, MySQL 5.5.54-0ubuntu0.14.04.1 on Drupal Setup
[Sat Feb 11 21:27:00.600010 2017] [:error] [pid 1594] [client 201.6.143.56:33268] PHP Fatal error: Call to undefined function field_attach_load() in /home/ignacio/www/includes/entity.inc on line 354, referer: http://host.com/install.php?profile=standard&locale=en
Anyone can fix that error?
Comment #7
isantolinComment #8
cilefen CreditAttribution: cilefen as a volunteer commentedThis issue is a duplicate of #481758: Fatal error: Call to undefined function field_attach_load() in includes/entity.inc on line 321 during install, which itself may be a duplicate of other issues. Please move the conversation there.
Comment #9
cilefen CreditAttribution: cilefen as a volunteer commentedComment #10
cilefen CreditAttribution: cilefen as a volunteer commentedI am curious about the opcache configuration.
Comment #11
amit0212 CreditAttribution: amit0212 as a volunteer and commentedPatch
I had to:
1. Delete the existing mysql database: drop database drupal7xdev;
2. Create the mysql database: create database drupal7xdev;
3. Run install.php again
*note that I chose to name my database 'drupal7xdev', your database will undoubtedly be named something different.
**note!!! This was a new installation, if you have an existing site, please do NOT drop your database unless you want to lose all your data!!!!!!!!! (you've been warned)
Comment #12
isantolin@cilefen opcache disabled, Same error
Comment #13
joseph.olstadprobably need to add this patch: https://www.drupal.org/node/1525176#comment-6317632
to this issue and trigger the testbot to see if it resolves some of the php 7.1 fails that are currently seen in the testbot results.
Comment #14
Julien Tekrane CreditAttribution: Julien Tekrane commentedI had also this error in a first install on a server.
Look at in your /etc/php5/fpm/php.ini file and look at what is defined for the "session.save_handler" parameter.
In my case I use "memcached".
Does this library is installed in your server ? (I had this clue by tempting an /update.php )
So run this commands in your server (if your are sudoer) :
And restart your PHP server & Webserver server.
Comment #15
MustangGB CreditAttribution: MustangGB commentedComment #17
webservant316 CreditAttribution: webservant316 commentedRidiculous, why I am getting this error with Drupal 7.69?
I cannot even install a fresh copy of D7 on my server.
Sorry, fixed.
My server requires secure cookies and so all access must be on HTTPS, but I forgot that and was trying the install on HTTP. I guess the reason the error persists is maybe there is a 1000 different reason the install can fail at this point.
Comment #18
joseph.olstadsee the above comment (number 4) by Divya Pandey
#2845175-4: Fatal error: Call to undefined function field_attach_load() in entity.inc on line 354 during installation