未指定输入文件 [英] No input file specified

查看:2045
本文介绍了未指定输入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跑锚CMS( http://anchorcms.com/ ),我刚刚升级到0.8版本。当我尝试运行安装程序,我收到了无输入文件中指定的错误。我相信这是更可能一个htaccess的问题,但我不知道什么是正确的设置应该是。任何一种帮助将不胜AP preciated。

I'm running Anchor CMS (http://anchorcms.com/) and I just upgraded to version 0.8. When I try and run the installer I get a 'No input file specified' error. I believe it's more than likely a .htaccess problem but I'm not sure what the correct settings should be. Any kind help would be greatly appreciated.

我的网站可以在这里找到: http://coleroberts.me/anchor-cms-master/

My site can be found here: http://coleroberts.me/anchor-cms-master/

我的.htaccess设置为:

My .htaccess is set to:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase {base}

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ {index} [L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>

我还使用一个GoDaddy的作为托管服务提供商是否有帮助。

I'm also using a GoDaddy as the hosting provider if that helps.

推荐答案

没有输入文件中指定的是一条消息,你是因为PHP的服务器上执行psented以$ P $其中在这种情况下,指示执行CGI(可以与 进行验证的phpinfo() )。

The No input file specified is a message you are presented with because of the implementation of PHP on your server, which in this case indicates a CGI implementation (can be verified with phpinfo()).

现在,正确地解释了这一点,你需要有一些基本的了解你的系统的URL是如何工作的。根据你的.htaccess文件,看来你的CMS预计沿为 PATH_INFO 变量传递的URL。 CGI和FastCGI实现没有 PATH_INFO 可用,因此试图沿着传递URI时,PHP失败,该消息。

Now, to properly explain this, you need to have some basic understanding on how your system works with URL's. Based on your .htaccess file, it seems that your CMS expects the URL to passed along as a PATH_INFO variable. CGI and FastCGI implementations do not have PATH_INFO available, so when trying to pass the URI along, PHP fails with that message.

我们需要找到一个替代品。

We need to find an alternative.

一种选择是,试图解决这个问题。展望为 php.ini核心配置选项的文档你可以看到,你可以改变工作方式为您实现。虽然,GoDaddy的可能不会让你改变在一个共享环境的PHP设置。

One option is to try and fix this. Looking into the documentation for core php.ini directives you can see that you can change the workings for your implementation. Although, GoDaddy probably won't allow you to change PHP settings on a shared enviroment.

我们需要找到一种替代修改PHP设置
展望第40行系统/ uri.php ,你会看到,CMS尝试两种类型的URI的检测 - 第一个是 PATH_INFO ,这是我们刚刚得知将无法正常工作 - 另一个是 REQUEST_URI

We need to find an alternative to modifying PHP settings
Looking into system/uri.php on line 40, you will see that the CMS attempts two types of URI detection - the first being PATH_INFO, which we just learned won't work - the other being the REQUEST_URI.

这应该基本上是够了 - 但URI的解析通过,将导致你更多的麻烦,因为URI,你可以将传递给 REQUEST_URI 变量,力量 parse_url() 只返回URL路径 - 这基本上让你回零

This should basically, be enough - but the parsing of the URI passed, will cause you more trouble, as the URI, which you could pass to REQUEST_URI variable, forces parse_url() to only return the URL path - which basically puts you back to zero.

现在,有实际上只有一个possibilty离开 - 而这改变了CMS的核心。该URI检测部是不够的。

Now, there's actually only one possibilty left - and that's changing the core of the CMS. The URI detection part is insufficient.

添加 QUERY_STRING 来第40行阵列的的第一个元素的在系统/ uri.php 并改变你的.htaccess看起来是这样的:

Add QUERY_STRING to the array on line 40 as the first element in system/uri.php and change your .htaccess to look like this:

RewriteEngine On 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

RewriteRule ^(.*)$ index.php?/$1 [L]

您请求的index.php QUERY_STRING 这将通过URI和有URI检测找到它

This will pass the URI you request to index.php as QUERY_STRING and have the URI detection to find it.

这,在另一方面,使其无法更新CMS不改变核心文件直到这已得到修复。 ,吸...

This, on the other hand, makes it impossible to update the CMS without changing core files till this have been fixed. That sucks...

需要一个更好的选择?
找到一个更好的CMS。

Need a better option?
Find a better CMS.

这篇关于未指定输入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆