Welcome! Log In Create A New Profile

Advanced

No input file specified

Posted by lewy1 
No input file specified
April 10, 2012 02:10PM
Hi,
I'm new to Nginx and have limited knowledge about web servers, but have read up on it and have been trying to install Freepbx on a home server on my pogoplug. I had Freepbx up and running with Nginx and php5 and fastcgi with Debian Squeeze, but had various problems with Freepbx and other things so I upgraded to Wheezy. In my setup I have the document root located in /var/www and can access Freepbx's welcome page with the links to voicemail flash operator and administration panel, but when I click on any one of those links I get no input file specified.
Here is my sites-available configuration

server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name _;
access_log /var/log/nginx/localhost.access.log;
root /var/www;
index index.php index.html index.htm;
location / {
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}
location /images {
root /usr/share;
autoindex on;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}



and here are the permissions

root@debian:/var/www# ls -la
total 48
drwxr-xr-x 7 asterisk asterisk 4096 Apr 9 08:35 .
drwxr-xr-x 12 root root 4096 Apr 9 05:11 ..
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 _asterisk
drwxr-x--- 11 asterisk asterisk 4096 Apr 9 08:35 admin
drwxr-xr-x 2 asterisk asterisk 4096 Apr 9 06:38 html
-rw-r--r-- 1 asterisk asterisk 602 Apr 9 08:35 index.html
-rw-r--r-- 1 www-data www-data 19 Apr 9 04:18 info.php
-rw-r--r-- 1 asterisk asterisk 4542 Apr 9 08:35 mainstyle.css
drwxr-x--- 6 asterisk asterisk 4096 Apr 9 08:35 panel
drwxr-x--- 7 asterisk asterisk 4096 Apr 9 08:35 recordings
-rw-r--r-- 1 asterisk asterisk 361 Apr 9 08:35 robots.txt
root@debian:/var/www#
root@debian:/var/www# cd /var/www/admin
root@debian:/var/www/admin# ls -la
total 152
drwxr-x--- 11 asterisk asterisk 4096 Apr 9 08:35 .
drwxr-xr-x 7 asterisk asterisk 4096 Apr 9 08:35 ..
drwxr-x--- 5 asterisk asterisk 4096 Apr 9 08:34 assets
-rw-r--r-- 1 asterisk asterisk 8682 Apr 9 08:34 bootstrap.php
drwxr-x--- 6 asterisk asterisk 4096 Apr 9 08:34 cdr
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 common
-rw-r--r-- 1 asterisk asterisk 11226 Apr 9 08:34 config.php
-rw-r--r-- 1 asterisk asterisk 17540 Apr 9 08:34 functions.inc.php
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 helpers
drwxr-x--- 15 asterisk asterisk 4096 Apr 9 08:34 i18n
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 images
-rw-r--r-- 1 asterisk asterisk 41 Apr 9 08:34 index.php
drwxr-x--- 3 asterisk asterisk 4096 Apr 9 08:34 libraries
-rw-r--r-- 1 asterisk asterisk 470 Apr 9 08:34 module-builtin.xml
drwxr-x--- 14 asterisk asterisk 4096 Apr 9 08:35 modules
-rw-r--r-- 1 asterisk asterisk 45724 Apr 9 08:35 page.modules.php
-rw-r--r-- 1 asterisk asterisk 1188 Apr 9 08:35 panel.php
-rw-r--r-- 1 asterisk asterisk 2242 Apr 9 08:35 reports.php
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:35 views

The reason i gave permissions ro asterisk is because I have Nginx running as user and group asterisk as needed by Freepbx. (On a side note, is it possible to run it as www-data for other vhosts?)

Thanks
Re: No input file specified
August 04, 2012 01:35PM
What user is your php-fpm setup running as? If I had to guess I'd say it's not asterisk. Have you checked the contents of the log file for your php-fpm setup?

I use Ubuntu instead of Debian, so my setup may be a little different than yours.

In my case, the php-fpm log file is /var/log/php5-fpm.log. The process when it is running is php-fpm and if you grep your processes you should see the conf file for php-fpm and below that the account that php-fpm runs under when it is processing php code:

ps aux | grep php

root 753 0.0 0.1 103564 856 ? Ss Aug01 2:08 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 754 0.0 7.0 113252 35672 ? S Aug01 0:32 php-fpm: pool www

So in my case php-fpm runs as the user 'www-data' and needs to have read access to the php files and execute permissions to any directories it needs to enter. If that account can't enter certain directories, I *believe* it will give you 403 errors instead of the one you're getting, but it is worth checking your permissions just to be sure.

You may also find these resources helpful:

http://blog.martinfjordvald.com/2011/01/no-input-file-specified-with-php-and-nginx/
https://wiki.archlinux.org/index.php/Nginx#Error:_No_input_file_specified
http://stackoverflow.com/questions/7004161/random-no-input-files-specified-in-nginx-and-php-fpm
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready