当前位置:网站首页>no input file specified 解决方案
no input file specified 解决方案
2022-07-22 09:05:00 【enoshxu】
no input file specified 解决方案
服务器运维admin 1年前 (2018-07-17) 1616次浏览
(一)IIS Noinput file specified
方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS
方法二:
请修改php.ini
找到
; cgi.force_redirect = 1
去掉前面分号,把后面的1改为0
即
cgi.force_redirect = 0
(二)apacheNo input file specified
apache No input filespecified,今天是我们配置apache RewriteRule时出现这种问题,解决办法很简单如下
打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”
完整代码如下
- .htaccess
- RewriteEngine on
- RewriteCond $1 !^(index.php|images|robots.txt)
- RewriteRule ^(.*)$ /index.php?/$1 [L]
如果是apache服务器出问题,看看是不是的Apache 把 .php 后缀的文件解析哪里有问题了。
总结
Apache 将哪些后缀作为 PHP 解析。例如,让 Apache 把 .php 后缀的文件解析为PHP。可以将任何后缀的文件解析为 PHP,只要在以下语句中加入并用空格分开。这里以添加一个 .phtml 来示例。
AddType application/x-httpd-php .php .phtml
为了将 .phps教程作为 PHP 的源文件进行语法高亮显示,还可以加上:
AddType application/x-httpd-php-source .phps
用通常的过程启动 Apache(必须完全停止 Apache 再重新启动,而不是用 HUP 或者USR1 信号使 Apache 重新加载)。
(三)nginx配置遭遇No inputfile specified
虚拟机测试nginx 遭遇 Noinput file specified,多方查找终于找到解决办法
1、 php.ini(/etc/php5/cgi/php.ini)的配置中这两项
cgi.fix_pathinfo=1 (这个是自己添加的)
doc_root=
2、nginx配置文件/etc/nginx/sites-available/default中注意以下部分
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include fastcgi_params;
}
红色部分路径需要根据你主机主目录的实际情况填写
配置完以上部分,重启一下service nginx restart,应该没问题了
(四)注意检查下网站目录是否有相关用户的写入权限
边栏推荐
猜你喜欢
Yunyuanyuan (10) | introduction to kubernetes in kubernetes
"Review of software engineering in Wuhan University of technology" Chapter 5 | software architecture
Using pypyodbc in Ubuntu cannot connect to SQL Server
Mail Informer
DistSQL 深度解析:打造动态化的分布式数据库
Installation and introduction of Lin UI component library of wechat applet - Advanced
sql注入
垃圾回收
Mutexes and semaphores
Is it really necessary to define VO, Bo, Po, do, dto?
随机推荐
glibc 源码分析
charm zaza functional test (by quqi99)
力扣解法汇总1252-奇数值单元格的数目
Summary of front-line Internet P7 interview questions - Supplementary
互斥锁和信号量
call()和apply()
Geowebcache publishes ArcGIS slice data
【10点公开课】:云视频会议系统私有化实践
手写shallowReadonly和readonly
力扣解法汇总513-找树左下角的值
[标准规范] 低代码的概念和定义到底是什么?无代码是否属于低代码?
It took two hours to find the bug about scrollto scrolling the distance from offsettop to the top
"Review of software engineering in Wuhan University of technology" Chapter III software requirements
腾讯持久化框架MMKV原理探究
Thread learning notes
Fabric. JS centered element
Codeforces Round #799 (Div. 4)(8/8)
线程学习笔记
力扣解法汇总1051-高度检查器
Js高级-基本数据类型与引用数据类型