webserver - How to solve lighttpd "No input file specified." -


last time using apache2+php5 web server , run unless slow when server process script , had change lighttpd + fastcgi. faster , low memory usage.

my problem when lighttpd running time "no input file specified." time ok. when restart lighttpd every come normally. don't know why , how solve it.

this config.

$server["socket"] == ":80" {  $http["host"] == "xxx.xxx.xxx.xxx" {     server.document-root = "/var/www/public_html"     server.errorlog = "/var/www/public_html/logs/error.log"     accesslog.filename = "/var/www/public_html/logs/access.log"     compress.cache-dir = "/var/www/public_html/cache" }  $http["host"] == "sub.domain.com" {     server.document-root = "/var/www/public_html"     server.errorlog = "/var/www/public_html/logs/error.log"     accesslog.filename = "/var/www/public_html/logs/access.log",     compress.cache-dir = "/var/www/public_html/cache" } index-file.names   = ( "index.php", "index.html", "index.htm", "default.htm" ) url.rewrite-if-not-file = (          "^/image(.*)" => "/image-api.php$1",          "^/go/([a-za-z0-9_-]+)" => "/index.php?go=$1",          "^/oembed(.*)" => "/oembed_provider/index.php$1",          "^/player$" => "/library/plugin/video-player/player.swf",          "^/v(.*)" => "/cvd.php$1",          "^/me" => "/user.php",          "^/@(.*)\?(.*)" => "/profile.php?indentity=$1&$2",          "^/@(.*)" => "/profile.php?indentity=$1",          "^/url?g=(.*)" => "/url.php?g=$1",          "^/social_auth/(.*)" => "/partner_api/$1.php",          "^/c/(.*)" => "/view.php?view=$1",          "^/u/(.*)" => "/profile.php?indentity=$1",          "^/project/(.*)" => "/section.php?page=$1",          "^/min/(.*)" => "/mini/index.php$1",          "^/src/(.*)" => "/src/$1",          "^/library/(.*)" => "/library/$1",          "^/\?(.*)" => "/index.php?$1",          "^/(.*)\?(.*)" => "/page.php?p=$1&$2",          "^/(.*)" => "/page.php?p=$1"         )  $http["host"] == "domain.org" { url.redirect = ("/(.*)$" => "https://domain.com/$1") }  $http["host"] == "domain.info" { url.redirect = ("/(.*)$" => "https://domain.com/$1") }  $http["host"] == "domain.net" { url.redirect = ("/(.*)$" => "https://domain.com/$1") }  } 

from faq, looks there several possibilities:

i error "no input file specified" when trying use php

sadly, error message can mean lot of things. common explanation attempt: php unable locate or open file supposed parse.

this can have lot of reasons:

  • you forgot add ''cgi.fix_pathinfo=1 php.ini'' file. see comments in php docs. issue here environment variable script_filename not being passed php.
  • make sure did not set doc_root or userdir in php.ini, or if have set it, make sure has correct value (doc_root should match lighttpd's server.document-root option in case)
  • if open_basedir set, make sure requested file below 1 of directories specified there. in past php parsed files not inside open_basedir well, security problem fixed (in php-5.2.3 or so).
  • if running php different permissions lighttpd (spawn-fcgi -u/-g, execwrap, suexec, ...), check php can read file

if unable find / fix problem, can use strace see if (os-related) permission problem (look out stat*(...yourfile...) = returncode). might set max-procs 1 , php_fcgi_children (see fastcgi docs) in case, can attach strace correct php-cgi process.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -