wordpress WordPress中的“未指定输入文件”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6275755/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"No input file specified" Error in WordPress
提问by abnab
I am working on this site Backend works fine. IN the front end none of the other pages are displayed except index page. the error come "No input file specified"
我在这个网站上工作 后端工作正常。在前端,除了索引页面外,其他页面都不显示。错误来“未指定输入文件”
Thanks for your help
谢谢你的帮助
采纳答案by Todd Moses
This is a problem with your .htaccess file.
这是您的 .htaccess 文件的问题。
The fix:
修复:
Update to the latest WordPress. There is a permalink bug in some installations.
更新到最新的 WordPress。某些安装中存在永久链接错误。
Make sure Apache is configured properly for ModRewrite.
确保为 ModRewrite 正确配置了 Apache。
From Support: On Options > Permalinks, is a section "Optional". It's not SO optional. After upgrading it mentioned for category's index.php/file (I've got the PATHINFO permalinks), I don't want "files" so I altered that to index.php/ Now that I've changed to index.php/_/ (or leave it blank which gives the standard "Category" subpath), its all working again. Here is the Mod Rewrite file:
来自支持:在选项 > 永久链接上,是“可选”部分。这不是可选的。升级它提到的类别的 index.php/file(我有 PATHINFO 永久链接)后,我不想要“文件”,所以我将其更改为 index.php/ 现在我已更改为 index.php/_ / (或将其留空以提供标准的“类别”子路径),一切又可以正常工作了。这是 Mod 重写文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
回答by DavidTaubmann
In my case it was the presence of a file named .user.ini
在我的情况下,它是一个名为的文件的存在 .user.ini
Just deleted it.
刚删了
回答by bocian83
I got the same error. On this server i have some about 70 WP instalation. Whit one i got the same problem.
我得到了同样的错误。在这台服务器上,我有一些大约 70 WP 安装。我遇到了同样的问题。
FIX - CTRL+ F5a few times ... and it works!
修复 - CTRL+F5几次......它有效!
回答by Arnon Weinberg
In my case it turned out to be bad permissions / ownership on the public_html files. The error message is really not very helpful.
在我的情况下,结果证明 public_html 文件的权限/所有权不好。错误消息真的不是很有帮助。
回答by Sébastien Gicquel
I also had the same issue after a migration from a WordPress to a new wordpress (website recreated completely)
从 WordPress 迁移到新的 wordpress 后,我也遇到了同样的问题(网站完全重新创建)
I've made a migration of the datas wth wp-migrate-pro.
我已经使用 wp-migrate-pro 进行了数据迁移。
iTheme Security was installed on the older WordPress ans was not deactivated. So the migration ended up with this error message.
iTheme Security 安装在较旧的 WordPress 上,并且未停用。所以迁移最终出现了这个错误消息。
I start all over again (and deactivated iTheme Security before the migration of the datas with wp-migrate-pro)
我重新开始(并在使用 wp-migrate-pro 迁移数据之前停用 iTheme Security)
回答by Robert Lane
I had this issue and it ended up being an issue with my php configuration. After rebuilding the php.ini, my site then pulled up.
我遇到了这个问题,它最终成为我的 php 配置的问题。重建 php.ini 后,我的网站就启动了。
回答by rtroulak
Check your PHP version! I update my php from 5.4.45 to 7.2.14 and my wordpress pulled up
检查您的 PHP 版本!我将我的 php 从 5.4.45 更新到 7.2.14 并且我的 wordpress 出现了
回答by Evan Donovan
There are any number of reasons that you could get the "no input file specified" error on WordPress.
在 WordPress 上出现“未指定输入文件”错误的原因有很多。
In my case, it was because I was using php-fpm and I had specified the docroot incorrectly in the php-fpm pool configuration file. But that would probably be more likely to cause it for allpages, not just the front end pages.
就我而言,这是因为我使用的是 php-fpm 并且我在 php-fpm 池配置文件中错误地指定了 docroot。但这可能更有可能导致所有页面,而不仅仅是前端页面。
In other cases, it might be a problem with either the Apache vhost configuration or the .htaccess as others have suggested.
在其他情况下,这可能是 Apache vhost 配置或其他人建议的 .htaccess 的问题。
File permissions also makes sense. Here's a link with more info on that in the nginx context: https://blog.martinfjordvald.com/2011/01/no-input-file-specified-with-php-and-nginx/
文件权限也有意义。这是在 nginx 上下文中包含更多信息的链接:https: //blog.martinfjordvald.com/2011/01/no-input-file-specified-with-php-and-nginx/
If it's related to permalinks, you may be able to go to the Permalinks section in the backend and rebuild those (as long as .htaccess is writable by your web server user).
如果它与永久链接有关,您可以转到后端的永久链接部分并重建它们(只要您的 Web 服务器用户可以写入 .htaccess)。
Basically, I think the error is just saying "For some reason, I can't find the file that you are asking me to look for." But it isn't given the standard 404 ErrorDocument that Apache would give so it is confusing.
基本上,我认为错误只是说“出于某种原因,我找不到您要我查找的文件。” 但是它没有给出 Apache 会给出的标准 404 ErrorDocument,所以它很混乱。
According to this answer on StackOverflow, this only happens when PHP is running under CGI or FastCGI: https://stackoverflow.com/a/14578219/263877. That's why it was unfamiliar to me, since I was used to mod_php.
根据 StackOverflow 上的这个答案,这只发生在 PHP 在 CGI 或 FastCGI 下运行时:https: //stackoverflow.com/a/14578219/263877。这就是我不熟悉的原因,因为我已经习惯了 mod_php。