致命错误:带有模块 .install 文件的 require_once(),drupal 7

发布于 2024-12-29 04:10:27 字数 689 浏览 3 评论 0原文

在本地主机上重新安装我的网站后,出现以下错误。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

负佳期 2025-01-05 04:10:28

您有权限和/或文件所有权问题。

快速修复它们。这是我的技术:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文