Join the community today
Become a Member

Upgrade No Input File Specified - Logs?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by BigIron, Dec 2, 2015.

  1. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    Fair warning, noob question ahead! :)

    I just upgraded nginx (to 1.9.7) and php-fpm (to 5.6.15) on our dev server (running v1.2.3-eva2000.08) and now I'm seeing intermittent no input file specified errors. Last time this happened @Matt fixed it, but I'd like to learn how to track it down and fix it on my own. Is there a log file I can reference, or somewhere else I can find clues as to what could be causing it?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    where you seeing the errors ? in browser ? certain actions or specific pages ?

    also what php web apps this occurring in ?
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    this is general explanation at How to Solve "No input file specified" with PHP and Nginx but outlined solutions there are general and file locations to edit for centmin mod would differ depending on the remedy so wouldn't do that. Just take it for general explanation for now

    so if it's permission related see Getting Started guide step 2
     
    Last edited: Dec 2, 2015
    • Like Like x 1
  4. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    Yep, in the browser, forum_list. We have a chatbox which refreshes, so if I leave a window open it'll pop up eventually. It's also happened a few times in the admin panel.
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    Xenforo web app then ? updated my previous reply too so check that too could be just permissions related if you uploaded files as root user instead of the pure-ftpd virtual ftp user.
     
  6. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    Great, this gives me something to go on. Are there no log files that would indicate what exactly might be causing it?

    Edit: Yep, XF.
     
  7. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    I just updated the permissions, so we'll see if that fixes it :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  9. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    I really appreciate how thoroughly you document everything :)
     
    • Like Like x 1
  10. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    Yep, looks like it's a permission issue.

    2015/12/01 14:02:19 [error] 22539#22539: *2236 FastCGI sent in stderr: "Unable to open primary script: /home/xenforo/index.php (Operation not permitted)"

    Upon inspection it looks like they're all over the map :eek:

    Hope this fixed it :)
     
  11. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    Code:
    /home/xenforo/index.php
    
    invalid location given where public web roots are structured as per Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS
    so valid location for domain.com/xenforo/index.php would be
    Code:
    /home/nginx/domains/yourdomain.com/public/xenforo/index.php
     
  12. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    I actually took that out for security (I'm a little paranoid) :cautious:
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    oh that makes more sense :)
     
    • Like Like x 1
  14. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    Hmm, I guess that didn't fix it. I just verified all folders are 0755 and all files are 0644 (except data and internal_data at 0777). I've also made sure the basedir line is commented out in php.conf (and verified with phpinfo).

    Code:
    2015/12/01 16:17:03 [error] 22539#22539: *2940 FastCGI sent in stderr: "Unable to open primary script: /home/nginx/domains/domain.com/public/xenforo/admin.php (Operation not permitted)" while reading response header from upstream, client: x.x.x.x, server: domain.com, request: "GET /xenforo/admin.php?styles/style1.14/export&&_xfRequestUri=%2Fxenforo%2Fadmin.php%3Fstyles%2F&_xfNoRedirect=1&_xfToken=1%2C1449015414%2_xfResponseType=json HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "domain.com", referrer: "https://domain.com/xenforo/admin.php?styles/"
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    what does your nginx vhost domain.com.conf look like in CODE tags ?
     
  16. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    I just noticed it looks like some of this stuff may be doubled up.

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    server {
                listen 80;
                server_name domain.com;
                return 301 https://$server_name$request_uri;
           }
    
    # HTTPS www redirect
    #server {
    #        listen 443 ssl http2;
    #        ssl on;
    #        ssl_dhparm             /usr/local/nginx/conf/ssl/domain.com/dhparm.pem;
    #        ssl_certificate        /usr/local/nginx/conf/ssl/domain.com/domain.com.crt;
    #        ssl_certificate_key    /usr/local/nginx/conf/ssl/domain.com/domain.com.key;
    #        include                /usr/local/nginx/conf/ssl.conf;
    #        server_name            domain.com;
    #        return 301 https://domain.com$request_uri;
    # }
    
    server {
    
            listen          443 reuseport ssl http2;
            server_name     domain.com;
            keepalive_timeout       30;
    
            ssl                     on;
            ssl_certificate         /usr/local/nginx/conf/ssl/domain.com/domain.com.crt;
            ssl_certificate_key     /usr/local/nginx/conf/ssl/domain.com/domain.com.key;
            include                 /usr/local/nginx/conf/ssl.conf;
    
            location /xenforo/ {
                    try_files $uri $uri/ /xenforo/index.php?$uri&$args;
                    index index.php index.html;
                    auth_basic           "Restricted";
                    auth_basic_user_file /usr/local/nginx/conf/htpasswd;
            }
    
            location /xenforo/internal_data/ {
                    internal;
            }
    
            location /xenforo/library/ {
                    internal;
            }
    
            location /data/chat {
                    open_file_cache off;
            }
    
            # ngx_pagespeed & ngx_pagespeed handler
            #include /usr/local/nginx/conf/pagespeed.conf;
            #include /usr/local/nginx/conf/pagespeedhandler.conf;
            #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
            # limit_conn limit_per_ip 16;
            # ssi  on;
            ssl_certificate         /usr/local/nginx/conf/ssl/domain.com/domain.com.crt;
            ssl_certificate_key     /usr/local/nginx/conf/ssl/domain.com/domain.com.key;
            include                 /usr/local/nginx/conf/ssl.conf;
    
            location /xenforo/ {
                    try_files $uri $uri/ /xenforo/index.php?$uri&$args;
                    index index.php index.html;
                    auth_basic           "Restricted";
                    auth_basic_user_file /usr/local/nginx/conf/htpasswd;
            }
    
            location /xenforo/internal_data/ {
                    internal;
            }
    
            location /xenforo/library/ {
                    internal;
            }
    
            location /data/chat {
                    open_file_cache off;
            }
    
            # ngx_pagespeed & ngx_pagespeed handler
            #include /usr/local/nginx/conf/pagespeed.conf;
            #include /usr/local/nginx/conf/pagespeedhandler.conf;
            #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
            # limit_conn limit_per_ip 16;
            # ssi  on;
    
            access_log /home/nginx/domains/domain.com/log/access.log combined buffer=256k flush=60m;
            error_log /home/nginx/domains/domain.com/log/error.log;
    
            root /home/nginx/domains/domain.com/public;
    
            # prevent access to ./directories and files
            location ~ (?:^|/)\. {
                    deny all;
            }
    
            location / {
    
            # block common exploits, sql injections etc
            #include /usr/local/nginx/conf/block.conf;
    
            # Enables directory listings when index file not found
            #autoindex  on;
    
            # Shows file listing times as local time
            #autoindex_localtime on;
    
            # Enable for vBulletin usage WITHOUT vbSEO installed
            # More example Nginx vhost configurations at
            # http://centminmod.com/nginx_configure.html
            #try_files    $uri $uri/ /index.php;
    
            }
    
            include /usr/local/nginx/conf/staticfiles.conf;
            include /usr/local/nginx/conf/php.conf;
            include /usr/local/nginx/conf/drop.conf;
            #include /usr/local/nginx/conf/errorpage.conf;
            include /usr/local/nginx/conf/vts_server.conf;
    }
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
    funky config you have :D

    check vhost generator at Generate Centmin Mod Nginx Vhost - CentminMod.com LEMP Nginx web stack for CentOS enter domain name, ssl check yes and then drop down select xenforo for basics you're missing all the ssl cipher options too

    but you need to construct your /usr/local/nginx/conf/ssl/domain.com/domain.com-trusted.crt for ocsp stapling as outlined in self signed ssl to paid ssl conversion at Nginx Vhost & NSD DNS Setup - CentminMod.com LEMP Nginx web stack for CentOS

    so very close below with exception of you needing to concat and create domain.com-trusted.crt at /usr/local/nginx/conf/ssl/domain.com/domain.com-trusted.crt
    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    server {
                listen 80;
                server_name domain.com;
                return 301 https://$server_name$request_uri;
           }
    
    server {
            listen          443 reuseport ssl http2;
            server_name     domain.com;
            keepalive_timeout       30;
    
            ssl                     on;
            ssl_certificate         /usr/local/nginx/conf/ssl/domain.com/domain.com.crt;
            ssl_certificate_key     /usr/local/nginx/conf/ssl/domain.com/domain.com.key;
            include                 /usr/local/nginx/conf/ssl.conf;
    
      # mozilla recommended
      ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header  X-Content-Type-Options "nosniff";
      #add_header X-Frame-Options DENY;
      #spdy_headers_comp 5;
      ssl_buffer_size 1400;
      ssl_session_tickets on;
    
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
      ssl_trusted_certificate /usr/local/nginx/conf/ssl/domain.com/domain.com-trusted.crt;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
            access_log /home/nginx/domains/domain.com/log/access.log combined buffer=256k flush=60m;
            error_log /home/nginx/domains/domain.com/log/error.log;
    
            root /home/nginx/domains/domain.com/public;
    
            location /xenforo/ {
                    try_files $uri $uri/ /xenforo/index.php?$uri&$args;
                    index index.php index.html;
                    auth_basic           "Restricted";
                    auth_basic_user_file /usr/local/nginx/conf/htpasswd;
            }
    
            location /xenforo/internal_data/ {
                    internal;
            }
    
            location /xenforo/library/ {
                    internal;
            }
    
            location /data/chat {
                    open_file_cache off;
            }
    
             include /usr/local/nginx/conf/staticfiles.conf;
            include /usr/local/nginx/conf/php.conf;
            include /usr/local/nginx/conf/drop.conf;
            #include /usr/local/nginx/conf/errorpage.conf;
            include /usr/local/nginx/conf/vts_server.conf;
    }
    
    but problem is you password protected your /xenforo directory so probably why getting permission issues
    Code:
            location /xenforo/ {
                    try_files $uri $uri/ /xenforo/index.php?$uri&$args;
                    index index.php index.html;
                    auth_basic           "Restricted";
                    auth_basic_user_file /usr/local/nginx/conf/htpasswd;
            }
     
    Last edited: Dec 2, 2015
  18. BigIron

    BigIron Member

    49
    10
    8
    Sep 18, 2015
    Ratings:
    +13
    Local Time:
    2:48 AM
    Ah thanks for taking the time to check that out. I'm sure those tips will keep me busy for a few hours tomorrow!

    What's the best way to password protect a directory?
     
  19. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:48 PM
    Nginx 1.13.x
    MariaDB 5.5
  20. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:48 PM
    1.11
    10.2
    On centminmod based server, this is not needed.
    755 is already enough.
     
    • Like Like x 1