Magento报错“No Input File Specified”的解决方法

我的解决方法:

 

1. 修改根目录的php.ini为php5.ini
2. php5.ini中max_input_time改成300,同时在最后添加上 cgi.fix_pathinfo = 1
3. magento目录下.htaccess添加Options -MultiViews  (也就是去掉前面的井号)

 

php5.ini

register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 300  // 修改
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="


; Only uncomment zend optimizer lines if your application requires Zend Optimizer support

;[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so


; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
;		      phpinfo, exec, system, dl, fsockopen, set_time_limit,
;                     popen, proc_open, proc_nice,shell_exec,show_source,symlink"

cgi.fix_pathinfo = 1  // 添加
memory_limit = 256M  // 添加
max_execution_time = 18000  // 添加

magic_quotes_gpc = off  // 添加
flag session.auto_start = off  // 添加
zlib.output_compression = on  // 添加
suhosin.session.cryptua = off  // 添加
zend.ze1_compatibility_mode = off  // 添加
extension=mcrypt.so  // 添加

 

.htaccess

// ....

 Options -MultiViews //修改-删除全面的 #号

// ...


// 添加
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^.+.php$ /bogusfile

RewriteBase /

 

完全参考地址: http://www.magentocommerce.com/wiki/groups/227/error/no_input_file_specified

 

A common error, which usually comes up if you’re hosted by GoDaddy, is the no input file specified error.

 

Try this first: add this to your .htaccess file

RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^.+.php$ /bogusfile
 

Then try to reload your setup page.

If you do not have Magento setup in the root of your server, make sure to add the following to your .htaccess file.

RewriteBase /yourbasepath/
 

Once that is verified, there are a couple things you can do to fix this, but we’ll start with the one that usually works.

 

In your web root directory, there should be a file called php.ini . Rename this to php5.ini .

If there is no php5.ini file. Create the file and upload it to your root directory.

 

If that doesn’t work, add the following to the end of your newly renamed php5.ini file:

cgi.fix_pathinfo = 1
 

And if you’re still getting the error, add the following to the top of your .htaccess file:

Options -MultiViews
 

The first one usually does the trick. If you don’t see this file in there, then create a blank php5.ini file add add the line listed on the second suggestion.

 

If all of the above has not worked, KEEP your changes, wait exactly 24 hours. Go back to youraddress.tld/downloader and try again. You may just be cached and for some reason it takes a bit longer then I was used to. Keep your chin up!

 

If nothing above worked, call GoDaddy up and have them either rename this for you, or make sure you’re on PHP 5.

 

或者试试:

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

 

源自:http://stackoverflow.com/a/19449172/4484798

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值