3

I get the following error after reinstalling my site on localhost.

Fatal error: require_once() [function.require]: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/sites/all/modules/custom/redirect/redirect.install'

The .install file DOES exist, and is below:

 1 <?php
 2 /**
 3  * @file
 4  * 
 5  */
 6 
 7 /**
 8  * Implementation of hook_install().
 9  */
 10 function redirect_install() {
 11 
 12 }
 13 
 14 /**
 15  * Implementation of hook_uninstall().
 16  */
 17 function redirect_uninstall() {
 18   variable_del('desktop_site_home');
 19   variable_del('mobile_site_home');
 20 }

The module has no require or include statements at all.

Does anyone have any idea whatsoever what might be going wrong here?

Thanks in advance..

rix
  • 10,104
  • 14
  • 65
  • 92
  • 1
    Could it be that XAMPP doesn't have permissions to read the file? The error doesn't specifically say that the file doesn't exist, just that it failed to open it – Clive Jan 27 '12 at 17:45

1 Answers1

2

You have a permissions and/or a file ownership problem.

Fix them quickly. This is my technique:

cd to the module's dir and:

chmod 775 *.install

Optionally, ls -la and see if there is a dominant owner of the files inside the Drupal docroot. Say you have some files owned by www-data in the group www-data.

If so, that's probably the user that your web server is running as. So...

chown www-data:www-data [filename]

hope that helps

joe

Joe Hyde
  • 999
  • 7
  • 17