phpBB 3.1.10 to 3.2.0 - No input file specified.

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Support Request Template
What version of phpBB are you using? phpBB 3.1.10
What is your board's URL? http://www.mywebsite.com/ (n/a)
Who do you host your board with? No one, it's on my laptop
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What version of phpBB3 did you update from? phpBB 3.1.9
What styles do you currently have installed? prosilver (default)
What language(s) is your board currently using? English, UK
Which database type/version are you using? MySQL 5.6.35
What is your level of experience? Experienced with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I tried to modify my nginx.config file so that the fastcgi and other settings were applied as shown in the examples at https://github.com/phpbb/phpbb/blob/mas ... ample.conf and https://github.com/phpbb/phpbb/blob/3.2 ... ample.conf
Please describe your problem. "500 Internal Server Error" when clicking the "Update" tab in the /install/ folder. This is for the upgrade from 3.1.10 to 3.2.0.
Generated by SRT Generator

Hi,

I've been using phpBB a long time and never needed help until now. I'm very familiar with updates but this upgrade stumped me.

This is how my forums are set up on my website:

http://www.mywebsite.com/forums/

The Overview page looks fine here:

/forums/install/app.php

But as soon as I click the Update or Convert tab, I get the following:
No input file specified.

Any help would be appreciated.


*Edit*

Even with a fresh installation, I still get the same message above. It seems strange that the install instructions included with the downloaded file mentions the database_update.php, and yet that file doesn't even exist. I even followed the instructions under 5. Updating from phpBB 3.0.x/3.1.x to phpBB 3.2.x and yet I still get the message above. What am I missing?

My setup:
  • Windows 7 Pro (64-bit, my website is run on my home laptop)
  • Microsoft Visual C++ 2012 Update 4 (32-bit)
  • nginx 1.10.2
  • MySQL Community Server 5.6.35 (32-bit)
  • PHP 5.6.29 (32-bit)
  • phpBB 3.1.10


*Edit*

Thanks to Paul, I no longer get the "No input file specified" message. However, I am now getting a "500 Internal Server Error" message instead. This looks like progress but I still need help getting my nginx.config file to work with my site and the phpBB upgrade.
Last edited by Heo32 on Wed Jan 11, 2017 5:07 pm, edited 11 times in total.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

I came across this but it did not help:

app.php/db/extension/pages/support/topic/131826

http://wilt.isaac.su/articles/symfony2- ... specified-

And this:

http://php.net/manual/en/security.cgi-bin.php

It might help someone else reading this though.
Last edited by Heo32 on Wed Jan 11, 2017 12:08 am, edited 3 times in total.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Bump.

I doubt this is a permissions issue but it might be a php.ini setting I need to enable.

**************************************************

*Edit 1*

I just came across this.

http://nginxlibrary.com/resolving-no-in ... ied-error/

I'll test it now... still not working.

**************************************************

*Edit 2*

These are the things I've tried. None of them worked. I still need help.


This is to prevent the "No input file specified" notice from appearing, apparently. The following settings are applied in the php.ini file.

Default:

Code: Select all

;cgi.fix_pathinfo=1
Applied:

Code: Select all

cgi.fix_pathinfo=1
http://wilt.isaac.su/articles/symfony2- ... specified-


Default:

Code: Select all

doc_root =
Applied:

Code: Select all

;doc_root =
http://php.net/manual/en/security.cgi-bin.php

I had doubt that the second one would make a difference since it wasn't defined in the first place.

I also edited my nginx.config so that all of the following cases found (3 of them, I think) were changed as shown.

Default:

Code: Select all

            root   html;
Applied:

Code: Select all

            root   C:/nginx/html;
That may have been a mistake but my site still works. The "No input file specified." message during the phpBB upgrade still appears, however.

Does anyone know what might be wrong? :(
Last edited by Heo32 on Wed Jan 11, 2017 12:11 am, edited 1 time in total.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Bump.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Paul »

You need to make sure your nginx configuration matches the sample configuration; https://github.com/phpbb/phpbb/blob/mas ... ample.conf
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Thank you for the link, Paul.

I do not understand coding at all, but I sort of got it working.

Old and working: This is how my current nginx.config file looks at the moment until I get the one below to work for the upgrade. My URL has been replaced because I do not wish to share it here. The code below has been used to update and upgrade phpBB 3.0.0 to 3.1.10.

Code: Select all

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        off;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    #keepalive_timeout  65;



    #Custom settings START

    server_tokens         off;
    #client_max_body_size 4096k;
    client_header_timeout 10;
    client_body_timeout   10;
    keepalive_timeout     10;
    send_timeout          10;

    #Custom settings END



    #gzip  on;

    server {
        listen       80;
        server_name  mywebsite.com  www.mywebsite.com;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            try_files $uri $uri/ /index.php;
            root   C:/nginx/html;
            index  index.php index.html index.htm;
        }

        #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   C:/nginx/html;
        }

        # 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$ {
            root           C:/nginx/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  C:/nginx/html/$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;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

New and not fully working: This is how my upcoming nginx.config file is looking so far. It has not been coded correctly due to my lack of experience and knowledge. It will be used for the upgrade from 3.1.10 to 3.2.0 and is obviously work in progress. If anyone can find any mistakes, please point them out to me. My URL has been replaced because I do not wish to share it here. Basically it is similar to http://www.mywebsite.com/ for the main page and http://www.mywebsite.com/forums/ for the forums directory. The code below makes my site run but it does not allow the "Update" tab within the /install/ folder to run when attempting to upgrade from phpBB 3.1.10 to 3.2.0. Clicking the "Update" tab returns a 500 Internal Server Error instead.

Code: Select all

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        off;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    #keepalive_timeout  65;



    #Custom settings START

    server_tokens         off;
    #client_max_body_size 4096k;
    client_header_timeout 10;
    client_body_timeout   10;
    keepalive_timeout     10;
    send_timeout          10;

    #Custom settings END



    #gzip  on;

    # The actual board domain.
    server {
        listen       80;
        server_name  mywebsite.com  www.mywebsite.com;
        
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        root C:/nginx/html;

        location / {
            # phpBB uses index.htm
            index  index.php index.html index.htm;
            try_files $uri $uri/ @rewriteapp;
        }

        location @rewriteapp {
            rewrite ^(.*)$ /app.php/$1 last;
        }
        
        # Deny access to internal phpbb files.
        location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
            deny all;
            # deny was ignored before 0.8.40 for connections over IPv6.
            # Use internal directive to prohibit access on older versions.
            internal;
        }
        
        # Pass the php scripts to fastcgi server specified in upstream declaration.
        location ~ \.php(/|$) {
            # Unmodified fastcgi_params from nginx distribution.
            include fastcgi_params;
            # Necessary for php.
            fastcgi_split_path_info ^(.+\.php)(/.*)$;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
            fastcgi_param DOCUMENT_ROOT $realpath_root;
            try_files $uri $uri/ /app.php$is_args$args;
            fastcgi_pass php;
        }
        
        # Correctly pass scripts for installer
        location /install/ {
            # phpBB uses index.htm
            try_files $uri $uri/ @rewrite_installapp;

            # Pass the php scripts to fastcgi server specified in upstream declaration.
            location ~ \.php(/|$) {
                # Unmodified fastcgi_params from nginx distribution.
                include fastcgi_params;
                # Necessary for php.
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                fastcgi_param DOCUMENT_ROOT $realpath_root;
                try_files $uri $uri/ /install/app.php$is_args$args;
                fastcgi_pass php;
            }
        }

        location @rewrite_installapp {
            rewrite ^(.*)$ /install/app.php/$1 last;
        }

        # Deny access to version control system directories.
        location ~ /\.svn|/\.git {
            deny all;
            internal;
        }
    }

    # If running php as fastcgi, specify php upstream.
    upstream php {
        server localhost:9000;
    }

        # 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$ {
#            root           C:/nginx/html;
#            fastcgi_pass   127.0.0.1:9000;
#            fastcgi_index  index.php;
#            fastcgi_param  SCRIPT_FILENAME  C:/nginx/html/$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;
        #}
    #}


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
Last edited by Heo32 on Wed Jan 11, 2017 4:37 pm, edited 9 times in total.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Bump:

I wrote the following post in hopes of getting this resolved:

viewtopic.php?f=64&t=2399911&p=14605881#p14605881
Heo32 wrote: Tue Jan 10, 2017 5:43 pm
Marc wrote: Mon Jan 09, 2017 9:52 am It's highly recommend to properly declare PATH_INFO when using nginx. Take a look at the sample config file for this:
https://github.com/phpbb/phpbb/blob/3.2 ... ample.conf
That's convenient but it's still difficult to troubleshoot for someone that has no coding experience such as myself. I see that's a sample for "Unix". How about a version for "Windows"? How would it be different? What would the following appear as?

Code: Select all

 server unix:/tmp/php.sock;
Would it look like this?

Code: Select all

 server localhost:9000;
I also see this:

Code: Select all

 server_name myforums.com;
Is that link for the website only, is it assuming the forums are in the root director of the website, or is it saying you enter the URL of the forums on the website?

Code: Select all

 server_name mywebsite.com/forums;
Or it it simply this?

Code: Select all

 server_name mywebsite.com;
And what about this?

Code: Select all

root /path/to/phpbb;
Is that supposed to be this?

Code: Select all

root html;
Or this?

Code: Select all

root C:/nginx/html;
Or this?

Code: Select all

root C:/nginx/html/forums;
And shouldn't the following include an index.php?

Code: Select all

 try_files $uri $uri/ @rewriteapp;
So that it looks like this?

Code: Select all

 try_files $uri $uri/ /index.php @rewriteapp;
Or is that completely unnecessary?

I've done so much work to my nginx.config file and yet I still can't upgrade my forums from 3.1.10 to 3.2.0. When I go to the /install/ folder and click "Update", it returns a "500 Internal Server Error". I don't know what I'm doing wrong.

What I would like to know are two things:
  1. What are the issues with my nginx.config file?
  2. How do I get past the 500 Internal Server Error?
This is my topic:
viewtopic.php?f=556&t=2399956
Last edited by Heo32 on Wed Jan 11, 2017 12:05 am, edited 1 time in total.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 5657
Joined: Tue Oct 30, 2007 10:57 pm
Location: Munich, Germany
Name: Marc
Contact:

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Marc »

I can try to look at it tomorrow on Windows with nginx. Will not get to it before the evening though (work ;)).
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Wow, I would love that!

I look forward to your feedback.

*Edit*

I've edited several of my posts above to include more info.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 5657
Joined: Tue Oct 30, 2007 10:57 pm
Location: Munich, Germany
Name: Marc
Contact:

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Marc »

I've tested this locally and I'm able to install phpBB 3.2.0 locally without issues when using nginx on windows. I'd recommend you enable the error_log at the top of your nginx config, e.g.:

Code: Select all

error_log  logs/error.log;
That should help with finding out if there is an underlying PHP error that results in the 500 error.
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Hello Marc,

I've enabled error_log logs/error.log; as requested and re-visited the /install/ folder. I then clicked the "Update" tab. Here is what the error.log reported back:

Code: Select all

2017/01/11 15:12:14 [error] 3516#2584: *13 rewrite or internal redirection cycle while internally redirecting to "/app.php", client: 108.162.241.123, server: mywebsite.com, request: "GET /forums/install/app.php/update HTTP/1.1", host: "www.mywebsite.com", referrer: "http://www.mywebsite.com/forums/install/app.php"
The result above was done with the forum cache and old error logs removed prior. I also replaced my website URL with "mywebsite.com" to keep it private.

Since you got it to work on your system, would you mind if I see your nginx.config file for comparison?

Something I should mention is that I also use CloudFlare. If you think I should temporarily prevent my site from using that service, I'll tun it off (a few minor configuration changes) and try again.

*Edit*

I'm wondering if it has something to do with this:

Code: Select all

    # If running php as fastcgi, specify php upstream.
    upstream php {
        server localhost:9000;
The example shown here ( https://github.com/phpbb/phpbb/blob/mas ... ample.conf ) has the following:

Code: Select all

    # If running php as fastcgi, specify php upstream.
    upstream php {
        server unix:/tmp/php.sock;
I assumed that server unix:/tmp/php.sock; needed to get replaced with server localhost:9000;. But that may have been a mistake since server was already defiled as explained in the following link regarding "Setting Up FastCGI Proxying" here: http://nginx.org/en/docs/beginners_guide.html

Or maybe I don't know what I'm talking about.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 5657
Joined: Tue Oct 30, 2007 10:57 pm
Location: Munich, Germany
Name: Marc
Contact:

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Marc »

I can post my nginx config file when I'm back home tonight. For what it's worth, I think most of the issue stems from the fact that I just tested it with the forum being in C:\nginx\html\ while you have your forum in C:\nginx\html\forums\. In that case you should change the paths accordingly, e.g.:

Code: Select all

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        off;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    #keepalive_timeout  65;



    #Custom settings START

    server_tokens         off;
    #client_max_body_size 4096k;
    client_header_timeout 10;
    client_body_timeout   10;
    keepalive_timeout     10;
    send_timeout          10;

    #Custom settings END



    #gzip  on;

    # The actual board domain.
    server {
        listen       80;
        server_name  mywebsite.com  www.mywebsite.com;
        
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        root C:/nginx/html;

        location /forums/ {
            # phpBB uses index.htm
            index  index.php index.html index.htm;
            try_files $uri $uri/ @rewriteapp;
        }

        location @rewriteapp {
            rewrite ^(.*)$ /forums/app.php/$1 last;
        }
        
        # Deny access to internal phpbb files.
        location ~ /forums/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
            deny all;
            # deny was ignored before 0.8.40 for connections over IPv6.
            # Use internal directive to prohibit access on older versions.
            internal;
        }
        
        # Pass the php scripts to fastcgi server specified in upstream declaration.
        location ~ \.php(/|$) {
            # Unmodified fastcgi_params from nginx distribution.
            include fastcgi_params;
            # Necessary for php.
            fastcgi_split_path_info ^(.+\.php)(/.*)$;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
            fastcgi_param DOCUMENT_ROOT $realpath_root;
            try_files $uri $uri/ /app.php$is_args$args;
            fastcgi_pass php;
        }
        
        # Correctly pass scripts for installer
        location /forums/install/ {
            # phpBB uses index.htm
            try_files $uri $uri/ @rewrite_installapp;

            # Pass the php scripts to fastcgi server specified in upstream declaration.
            location ~ \.php(/|$) {
                # Unmodified fastcgi_params from nginx distribution.
                include fastcgi_params;
                # Necessary for php.
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                fastcgi_param DOCUMENT_ROOT $realpath_root;
                try_files $uri $uri/ /install/app.php$is_args$args;
                fastcgi_pass php;
            }
        }

        location @rewrite_installapp {
            rewrite ^(.*)$ /forums/install/app.php/$1 last;
        }

        # Deny access to version control system directories.
        location ~ /forums/\.svn|/\.git {
            deny all;
            internal;
        }
    }

    # If running php as fastcgi, specify php upstream.
    upstream php {
        server localhost:9000;
    }

        # 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$ {
#            root           C:/nginx/html;
#            fastcgi_pass   127.0.0.1:9000;
#            fastcgi_index  index.php;
#            fastcgi_param  SCRIPT_FILENAME  C:/nginx/html/$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;
        #}
    #}


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Thank you, Marc. That looks like a good start. I tested it but it still gave the same 500 error.

After testing your suggestion, I also found this:

Code: Select all

        location @rewriteapp {
            rewrite ^(.*)$ /forums/app.php/$1 last;
And changed it to this:

Code: Select all

        location @rewriteapp {
            rewrite ^(.*)$ /forums/install/app.php/$1 last;
Even after adding that, it still didn't work and returned the same error. Maybe I should take out /install, but it looked to me like it belongs there. I could be wrong.

If it's alright with you, I think I'll wait until I can see your working nginx.config file to compare. It could be something small such as / vs. \ for example.

I appreciate all you've done for me so far! :)
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

I finally got the database to update. However, the update did cause my forums page to basically not have a template any longer, or so it appears. Also, the phpMyAdmin page no longer loads either.

Help, please?


This nginx.conf layout is taken directly from the example shown by Paul (here).

All changes listed from the semi-working proposal from Marc's recent nginx.conf post above have been applied to include /forums/ where necessary. One of the required locations needing /forums/ to be present was missed but was added and noted below, which ended up making the upgrade process finally work.

All other edits made in conjunction with Marc's proposal are also posted below to show the "before" and "after" changes with several notes regarding issues and solutions that may fix them.

Once again, my URL in the configuration file below has been changed to "mywebsite.com" since I do not wish to share my link here.

Here is my working nginx.conf file which I used to upgrade phpBB 3.1.10 to 3.2.0 running on Windows:

Code: Select all

# Sample nginx configuration file for phpBB.
# Global settings have been removed, copy them
# from your system's nginx.conf.
# Tested with nginx 0.8.35.

# If you want to use the X-Accel-Redirect feature,
# add the following to your config.php.
#
#  define('PHPBB_ENABLE_X_ACCEL_REDIRECT', true);
#
# See http://wiki.nginx.org/XSendfile for the details
# on X-Accel-Redirect.


# Custom Settings (1 of 2) START

worker_processes                   auto;
error_log                          logs/error.log;

    events {
	    worker_connections 1024;
    }

# Custom Settings (1 of 2) END


http {


    # Custom Settings (2 of 2) START

    #client_body_timeout           60s;
    #client_header_timeout         60s;
    #client_max_body_size          1m;
    #default_type                  application/octet-stream;
    #include                       mime.types;
    #keepalive_timeout             75s;
    #send_timeout                  60s;
    #sendfile                      off;
    server_tokens                  off;
    server_names_hash_bucket_size  64;

    # Custom Settings (2 of 2) END

	
    # Compression - requires gzip and gzip static modules.
    #gzip on;
    #gzip_static on;
    #gzip_vary on;
    #gzip_http_version 1.1;
    #gzip_min_length 700;

    # Compression levels over 6 do not give an appreciable improvement
    # in compression ratio, but take more resources.
    #gzip_comp_level 6;

    # IE 6 and lower do not support gzip with Vary correctly.
    #gzip_disable "msie6";
    # Before nginx 0.7.63:
    #gzip_disable "MSIE [1-6]\.";

    # Catch-all server for requests to invalid hosts.
    # Also catches vulnerability scanners probing IP addresses.
    #server {
        # default specifies that this block is to be used when
        # no other block matches.
        #listen 80 default;

        #server_name bogus;
        #return 444;
        #root /var/empty;
    #}

    # If you have domains with and without www prefix,
    # redirect one to the other.
    server {
        # Default port is 80.
        #listen 80;

        server_name mywebsite.com;

        # A trick from http://wiki.nginx.org/Pitfalls#Taxing_Rewrites:
        rewrite ^ http://www.mywebsite.com$request_uri permanent;
        # Equivalent to:
        #rewrite ^(.*)$ http://www.mywebsite.com$1 permanent;
    }

    # The actual board domain.
    server {
        #listen 80;
        server_name www.mywebsite.com;

        root C:/nginx/html;

        location / {
            # Main index page for WordPress. If it is not running then this is the index page for Nginx. This part may need to be removed if it causes trouble or is unnecessary.
            index index.php index.html index.htm;
            try_files $uri $uri/ /index.php;
        }

        location /forums/ {
            # phpBB uses index.htm
            index index.php index.html index.htm;
            try_files $uri $uri/ @rewriteapp;
        }

        location @rewriteapp {
            rewrite ^(.*)$ /forums/install/app.php/$1 last;
        }

        # Deny access to internal phpBB files.
        location ~ /forums/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
            deny all;
            # deny was ignored before 0.8.40 for connections over IPv6.
            # Use internal directive to prohibit access on older versions.
            internal;
        }

        #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   C:/nginx/html;
        }

        # Pass the php scripts to FastCGI server specified in upstream declaration.
        location ~ \.php(/|$) {
            # Unmodified fastcgi_params from nginx distribution.
            include fastcgi_params;
            # Necessary for php.
            fastcgi_split_path_info ^(.+\.php)(/.*)$;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
            fastcgi_param DOCUMENT_ROOT $realpath_root;
            try_files $uri $uri/ /app.php$is_args$args;
            fastcgi_pass php;
        }

        # Correctly pass scripts for installer
        location /forums/install/ {
            # phpBB uses index.htm
            try_files $uri $uri/ @rewrite_installapp;

            # Pass the php scripts to FastCGI server specified in upstream declaration.
            location ~ \.php(/|$) {
                # Unmodified fastcgi_params from nginx distribution.
                include fastcgi_params;
                # Necessary for php.
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                fastcgi_param DOCUMENT_ROOT $realpath_root;
                try_files $uri $uri/ /forums/install/app.php$is_args$args;
                fastcgi_pass php;
            }
        }

        location @rewrite_installapp {
            rewrite ^(.*)$ /forums/install/app.php/$1 last;
        }

        # Deny access to version control system directories.
        location ~ /\.svn|/\.git {
            deny all;
            internal;
        }
    }

    # If running php as FastCGI, specify php upstream.
    upstream php {
        server localhost:9000;
    }
}
Here is the list of changes and things I want to point out, along with an error in the link provided by Paul that should get fixed at some point:

Code: Select all

------------------------------------------
# Custom Settings (1 of 2) START
------------------------------------------

    worker_processes  1;

    worker_processes  auto;

------------------------------------------

    #error_log  logs/error.log;

    error_log  logs/error.log;

------------------------------------------

# The default is "512", but "worker_connections" has been left at 1024.
    events {
        worker_connections  1024;
    }

------------------------------------------
# Custom Settings (1 of 2) END
------------------------------------------

------------------------------------------
# Custom Settings (2 of 2) START
------------------------------------------

    client_body_timeout   10;

    #client_body_timeout   60s;

------------------------------------------

    client_header_timeout 10;

    #client_header_timeout 60s;

------------------------------------------

    #client_max_body_size 4096k;

    #client_max_body_size 1m;

------------------------------------------

    default_type              application/octet-stream;

    #default_type              application/octet-stream;

------------------------------------------

    include                  mime.types;

    #include                  mime.types;

------------------------------------------

    keepalive_timeout  10;

    #keepalive_timeout  75s;

------------------------------------------

    send_timeout          10;

    #send_timeout          60s;

------------------------------------------

    sendfile        off;

    #sendfile       off;

------------------------------------------

    server_tokens         off;

------------------------------------------

# This is newly added due to an error I was getting. The default is probably 32. It said I need to increase it (32|64|128):

server_names_hash_bucket_size 64;

------------------------------------------
# Custom Settings (2 of 2) END
------------------------------------------


------------------------------------------

# This is from the default templates located at https://github.com/phpbb/phpbb/blob/master/phpBB/docs/nginx.sample.conf and https://github.com/phpbb/phpbb/blob/3.2.x/phpBB/docs/nginx.sample.conf. This appears to be incorrect:

        location @rewriteapp {
            rewrite ^(.*)$ /app.php/$1 last;
        }

# This is how the default template should probably be:

        location @rewriteapp {
            rewrite ^(.*)$ /install/app.php/$1 last;
        }

# And this is how the default template should be for my forums located at http://www.mywebsite.com/forums/:

        location @rewriteapp {
            rewrite ^(.*)$ /forums/install/app.php/$1 last;
        }

------------------------------------------

# Old:

        root html;

# New:

        root C:/nginx/html;

------------------------------------------

# This has been added but it may not be necessary or it may cause problems:

        location / {
            # Main index with WordPress
            index index.php index.html index.htm;
            try_files $uri $uri/ /index.php;
        }

------------------------------------------

# This was temporarily added while WordPress is not running on my site. It will be removed later when WordPress is back on and things are running again:

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   C:/nginx/html;
        }

------------------------------------------

# Old (for Unix(?)):

    # If running php as FastCGI, specify php upstream.
    upstream php {
        server unix:/tmp/php.sock;
    }

# New (for Windows):

    # If running php as FastCGI, specify php upstream.
    upstream php {
        server localhost:9000;
    }

------------------------------------------
Just to clarify, I believe there is a mistake in the following links:

https://github.com/phpbb/phpbb/blob/mas ... ample.conf
https://github.com/phpbb/phpbb/blob/3.2 ... ample.conf

Line #91:

Code: Select all

try_files $uri $uri/ /app.php$is_args$args;
I think it should be this:

Code: Select all

try_files $uri $uri/ /install/app.php$is_args$args;
Without that change, the update or upgrade will not work and the "500 Internal Server Error" will appear when someone clicks the "Update" or "Custom" tabs. Please test the change to confirm this is correct.

*Edit*

Here's something interested I came across:

http://area51.phpbb.com/phpBB/viewtopic ... 81&t=49426
There is something extra that is needed. I got the inspiration from viewtopic.php?f=466&t=2294581 which fixes the ability to add extensions. To get the install working add this snippet before any other rules:

Code: Select all

        location /install/app.php {
                try_files $uri $uri/ /install/app.php?$query_string;
        }
*Edit*

P.S. This is the error.log after visiting my forums after the database was updated to phpBB 3.2.0. The page does not load fully, and as I said, there is no template displayed. All I see is some text from my forums index.

Code: Select all

2017/01/12 23:57:48 [error] 3640#3568: *4 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 108.162.241.123, server: www.mywebsite.com, request: "GET /forums/cron.php?cron_type=cron.task.core.tidy_sessions&sid=950c8ff10f35b32cf09900c0bc9e7708 HTTP/1.1", upstream: "fastcgi://[::1]:9000", host: "www.mywebsite.com", referrer: "http://www.mywebsite.com/forums/"
Last edited by Heo32 on Fri Jan 13, 2017 6:58 pm, edited 1 time in total.
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Heo32
Registered User
Posts: 207
Joined: Sat Jan 07, 2017 10:08 pm

Re: phpBB 3.1.10 to 3.2.0 - No input file specified.

Post by Heo32 »

Bump.

This is interesting. I just found out that the cache for my forums is now in it's own new folder, and not the folder it should be in.

This is where it should be:

http://www.mywebsite.com/forums/cache/

The only files there are the .htaccess and index.htm.

This is where the cache is now located:

http://www.mywebsite.com/forums/cache/production/

Weird! :?

*Edit*

I think I made a mistake with my file.

Wrong? (4th from the bottom)

Code: Select all

        # Correctly pass scripts for installer
        location /forums/install/ {
            # phpBB uses index.htm
            try_files $uri $uri/ @rewrite_installapp;

            # Pass the php scripts to FastCGI server specified in upstream declaration.
            location ~ \.php(/|$) {
                # Unmodified fastcgi_params from nginx distribution.
                include fastcgi_params;
                # Necessary for php.
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                fastcgi_param DOCUMENT_ROOT $realpath_root;
                try_files $uri $uri/ /forums/install/app.php$is_args$args;
                fastcgi_pass php;
            }
        }
Correct?

Code: Select all

        # Correctly pass scripts for installer
        location /forums/install/ {
            # phpBB uses index.htm
            try_files $uri $uri/ @rewrite_installapp;

            # Pass the php scripts to FastCGI server specified in upstream declaration.
            location ~ \.php(/|$) {
                # Unmodified fastcgi_params from nginx distribution.
                include fastcgi_params;
                # Necessary for php.
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                fastcgi_param DOCUMENT_ROOT $realpath_root;
                try_files $uri $uri/ /app.php$is_args$args;
                fastcgi_pass php;
            }
        }
stevemaury wrote: Sun May 20, 2018 8:16 pm I went to your board and looked for an hour or so, but did not see the women without underwear.
Allow using Content-Security-Policy without unsafe-inline • Content-Security-Policy
Post Reply

Return to “[3.2.x] Support Forum”