致命错误:带有模块 .install 文件的 require_once(),drupal 7
在本地主机上重新安装我的网站后,出现以下错误。
Fatal error: require_once() [function.require]: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/sites/all/modules/custom/redirect/redirect.install'
.install 文件确实存在,如下所示:
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 }
该模块根本没有 require 或 include 语句。
有谁知道这里可能出了什么问题吗?
提前致谢..
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..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有权限和/或文件所有权问题。
快速修复它们。这是我的技术:
cd 到模块的目录并:
chmod 775 *.install
(可选) ls -la 并查看 Drupal 文档根目录中是否存在文件的主要所有者。假设您在 www-data 组中有一些由 www-data 拥有的文件。
如果是这样,则该用户可能是您的 Web 服务器正在运行的用户。所以...
chown www-data:www-data [文件名]
希望对
乔有帮助
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