Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I've just developed a Drupal site within a subfolder "drupal6". I've then moved it to the root and get the following error :
"Fatal error: require_once() [function.require]: Failed opening required '/var/www/drupal6/sites/all/modules/filefield/field_file.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal6/sites/all/modules/filefield/filefield.module on line 13"
I've cleared all cache tables and done a search on the entire database for "drupal6" (which is the sub folder) and have come up with no results, so am quite confused where this path is being stored.
Comments
Comment #1
quicksketchI swear I answer this question once a week. There are other issues but here are a few:
#983324: Move to new domain, Page Not Found error on filefield links
#409884: a way to refresh filepaths stored in database?
Comment #2
quicksketchSome more:
#729292: ImageField stores complete system path if files table
#324474: migrating servers issue
#434458: Invalid path / file not found
#98199: ['filepath'] is'nt portable. Move servers, change Settings > File system path - everything breaks and can't be updated.
#314022: Problems when moving Drupal sites/files directory
Comment #3
iancawthorne CreditAttribution: iancawthorne commentedThanks for the suggestions quicksketch. I'm not entirely sure this is the same issue though. As far as I can tell the suggestions you have posted are mainly to do with the file upload path set in Drupal, eg the files folder.
The problem I have is the contributed modules folder.
I moved the entire site from a sub folder called 'drupal6' to the root and the filefield module is still looking in the sub folder for an include.
I'm at a total loss as to where this could be getting stored as a full database keyword search will not bring any results for the sub folder.
I even uninstalled the module, deleted the module. Cleared all Drupal cache. Re-installed in the correct location and filefield still persists to ask for the sub folder.
Comment #4
julient CreditAttribution: julient commentedHave you found the solution to your problem?
I'm having the same issue here after moving Drupal from subdirectory to root.
Comment #5
iancawthorne CreditAttribution: iancawthorne commentedI never did find a solution. I ended up leaving a copy of the modules that were causing the errors at the sub directory as the site had to go live.
Comment #6
Aleksander-Belov CreditAttribution: Aleksander-Belov commentedIf anyone's still having problems with this: the reason might be in APC (or any other opcode cache).
In my case clearing the cache has resolved the issue above.
Comment #7
julient CreditAttribution: julient commentedI eventually deleted everything and did the migration from the start again. And this time it worked.
Comment #8
nathan573 CreditAttribution: nathan573 commentedThanks Aleksander,
The solution in #6 was the fix when I moved my site from a subdomain to the root and got the filefield error mentioned above. The first error I actually encountered was a similar "Fatal error: require_once" error, but the file it was looking for was dhtml_menu.theme.inc
Once the APC cache was cleared the error went away.