No input file specified.

387 views
Skip to first unread message

michael schouman

unread,
Oct 1, 2018, 2:51:52 AM10/1/18
to SimpleSAMLphp
Hi guys,

I am struggling to get this repo to run. I am running Apache 2.4 with php 7.1.20 (in a Vagrant env). In my Apache config I have the following settings:

        SetEnv SIMPLESAMLPHP_CONFIG_DIR /home/vagrant/code/appsaml/config
       
Alias /simplesaml /home/vagrant/code/vendor/simplesamlphp/simplesamlphp/www
       
<Directory /home/vagrant/code/vendor/simplesamlphp/simplesamlphp/www>
           
<IfModule !mod_authz_core.c>
           
# For Apache 2.2:
           
Order allow,deny
           
Allow from all
           
</IfModule>
            <IfModule mod_authz_core.c>
            # For Apache 2.4:
            Require all granted
            </
IfModule>
       
</Directory>

I installed the Simplesamlphp files using composer.

When i request
/simplesaml

i get a redirect to
/simplesaml/module.php/core/frontpage_welcome.php

And on that page i get
No input file specified.

I have tried allot of things with htaccess files etc. But i can't get this code to run. Can somebody point me in the right direction?

   
"name": "simplesamlphp/simplesamlphp",
"version": "v1.15.0"


Jaime Perez Crespo

unread,
Oct 1, 2018, 3:01:38 AM10/1/18
to SimpleSAMLphp
Hi Michael,
First things first: you should always run the latest version of the software. There are security issues fixed in 1.16 that you are exposed to if you are running an older version.

Now, that said, “No input file specified” is not an error coming from SimpleSAMLphp, so it must be something with your deployment. Have you looked into your web server’s logs?


Jaime Pérez
UNINETT / Feide

jaime...@uninett.no
jaime...@protonmail.com
9A08 EA20 E062 70B4 616B 43E3 562A FE3A 6293 62C2

"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost

michael schouman

unread,
Oct 1, 2018, 3:16:25 AM10/1/18
to SimpleSAMLphp
Hi Jaime,

I would love to use the latest version. But when trying to update, using composer i get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for simplesamlphp/simplesamlphp 1.16 -> satisfiable by simplesamlphp/simplesamlphp[1.16.0].
    - simplesamlphp/simplesamlphp 1.16.0 requires robrichards/xmlseclibs dev-master#93f8c07976b36b6050ab341ab5850484dc897ce0 as 3.0.2 -> satisfiable by robrichards/xmlseclibs[dev-master] but these conflict with your requirements or minimum-stability.


I am aware that SimpleSAMLphp is not to blame, to a certain extend. I think that SimpleSAMLphp should include an .htaccess file in the www dir to help most users out.

Anyway, i get this in the error logs:

[Mon Oct 01 06:54:39.670582 2018] [proxy_fcgi:error] [pid 1398:tid 139657220183808] [client 192.168.10.1:59717] AH01071: Got error 'Unable to open primary script: redirect:/index.php/frontpage_welcome.php (No such file or directory)\n'

Jaime Perez Crespo

unread,
Oct 1, 2018, 4:03:55 AM10/1/18
to SimpleSAMLphp
Hi again,

On 1 Oct 2018, at 09:16, michael schouman <meta...@gmail.com> wrote:
> Hi Jaime,
>
> I would love to use the latest version. But when trying to update, using composer i get the following error:
>
> Your requirements could not be resolved to an installable set of packages.
>
> Problem 1
> - Installation request for simplesamlphp/simplesamlphp 1.16 -> satisfiable by simplesamlphp/simplesamlphp[1.16.0].
> - simplesamlphp/simplesamlphp 1.16.0 requires robrichards/xmlseclibs dev-master#93f8c07976b36b6050ab341ab5850484dc897ce0 as 3.0.2 -> satisfiable by robrichards/xmlseclibs[dev-master] but these conflict with your requirements or minimum-stability.

That has been fixed in 1.16.2, so you shouldn’t have that problem now, unless you are explicitly forcing the installation of 1.16.0 (which you shouldn’t do).

> I am aware that SimpleSAMLphp is not to blame, to a certain extend. I think that SimpleSAMLphp should include an .htaccess file in the www dir to help most users out.
>
> Anyway, i get this in the error logs:
>
> [Mon Oct 01 06:54:39.670582 2018] [proxy_fcgi:error] [pid 1398:tid 139657220183808] [client 192.168.10.1:59717] AH01071: Got error 'Unable to open primary script: redirect:/index.php/frontpage_welcome.php (No such file or directory)\n'

That’s clearly indicating that there’s some misconfiguration in your web server. Are you using mod_rewrite? That “redirect:” shouldn’t be there, and the rest of the URL is wrong as well.

michael schouman

unread,
Oct 1, 2018, 5:06:40 AM10/1/18
to SimpleSAMLphp
I changed the minimum-stability so i can run the latest and greatest. Still in Development so no worries there, for now ;-)

And yes, i am using mod rewrite.

Jaime Perez Crespo

unread,
Oct 1, 2018, 5:17:08 AM10/1/18
to SimpleSAMLphp
Hi,

On 1 Oct 2018, at 11:06, michael schouman <meta...@gmail.com> wrote:
> I changed the minimum-stability so i can run the latest and greatest. Still in Development so no worries there, for now ;-)

You don’t need to do that now. I just tested again, and it works fine without downgrading the minimum stability. You need to avoid specifying exactly 1.16.0, though.

> And yes, i am using mod rewrite.

That’s probably the issue. Try with mod_rewrite disabled, and see if you can make it work then. If it works, then that’s clearly what’s causing the issue here.

michael schouman

unread,
Oct 1, 2018, 5:45:47 AM10/1/18
to SimpleSAMLphp
You where right, composer.json locked the version to 1.16.0... My bad. This is working now, no crazy dev dependencies now.

I disabled the mod_rewrite but this did nothing. I also tried adding a htaccess and disabling from there, but no. Still same response :-(

In the access logs i get this:
192.168.10.1 - - [01/Oct/2018:09:40:01 +0000] "GET /simplesaml/ HTTP/1.1" 302 3402 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
192.168.10.1 - - [01/Oct/2018:09:40:01 +0000] "GET /simplesaml/module.php/core/frontpage_welcome.php HTTP/1.1" 404 283 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"


 Error log:
[Mon Oct 01 09:40:01.454367 2018] [proxy_fcgi:error] [pid 5619:tid 140175082551040] [client 192.168.10.1:64020] AH01071: Got error 'Unable to open primary script: redirect:/index.php/frontpage_welcome.php (No such file or directory)\n'

Tim van Dijen

unread,
Oct 1, 2018, 8:42:03 AM10/1/18
to SimpleSAMLphp


Op maandag 1 oktober 2018 11:45:47 UTC+2 schreef michael schouman:

 Error log:
[Mon Oct 01 09:40:01.454367 2018] [proxy_fcgi:error] [pid 5619:tid 140175082551040] [client 192.168.10.1:64020] AH01071: Got error 'Unable to open primary script: redirect:/index.php/frontpage_welcome.php (No such file or directory)\n'


Hi Michael,

You're proxying php-filles to a PHP-processor like php-fpm or similar.. The issue appears to be in the forwarding..
I may be able to help you if you can post the complete vhost-configuration..

- Tim

michael schouman

unread,
Oct 1, 2018, 9:07:47 AM10/1/18
to SimpleSAMLphp
Hi Tim,

Thanks for the response. 

This is the current setup:

<IfModule mod_ssl.c>


    <VirtualHost *:443>


        ServerAdmin webmaster@localhost


        ServerName somesite.test

       ServerAlias www.somesite.test


        DocumentRoot /home/vagrant/code


       


        SetEnv SIMPLESAMLPHP_CONFIG_DIR /home/vagrant/code/somesitesaml/config


        Alias /simplesaml /home/vagrant/code/vendor/simplesamlphp/simplesamlphp/www


        <Directory /home/vagrant/code/vendor/simplesamlphp/simplesamlphp/www>


          RewriteEngine off


        </Directory>




        <Directory /home/vagrant/code>


            AllowOverride All


            Require all granted


        </Directory>




        #LogLevel info ssl:warn




        ErrorLog ${APACHE_LOG_DIR}/somesite.test-error.log


        CustomLog ${APACHE_LOG_DIR}/somesite.test-access.log combined




        #Include conf-available/serve-cgi-bin.conf




        #   SSL Engine Switch:


        #   Enable/Disable SSL for this virtual host.


        SSLEngine on




        #SSLCertificateFile  /etc/ssl/certs/ssl-cert-snakeoil.pem


        #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key




        SSLCertificateFile      /etc/nginx/ssl/somesite.test.crt


        SSLCertificateKeyFile   /etc/nginx/ssl/somesite.test.key






        #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt




        #SSLCACertificatePath /etc/ssl/certs/


        #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt




        #SSLCARevocationPath /etc/apache2/ssl.crl/


        #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl




        #SSLVerifyClient require


        #SSLVerifyDepth  10




        <FilesMatch "\.(cgi|shtml|phtml|php)$">


            SSLOptions +StdEnvVars


        </FilesMatch>


        <Directory /usr/lib/cgi-bin>


            SSLOptions +StdEnvVars


        </Directory>




        <IfModule mod_fastcgi.c>


            AddHandler php7.1-fcgi .php


            Action php7.1-fcgi /php7.1-fcgi


            Alias /php7.1-fcgi /usr/lib/cgi-bin/php7.1


            FastCgiExternalServer /usr/lib/cgi-bin/php7.1 -socket /var/run/php/php7.1-fpm.sock -pass-header Authorization


        </IfModule>


        <IfModule !mod_fastcgi.c>


            <IfModule mod_proxy_fcgi.c>


                <FilesMatch ".+\.ph(ar|p|tml)$">


                    SetHandler "proxy:unix:/var/run/php/php7.1-fpm.sock|fcgi://localhost/"


                </FilesMatch>


            </IfModule>


        </IfModule>


        BrowserMatch "MSIE [2-6]"             nokeepalive ssl-unclean-shutdown             downgrade-1.0 force-response-1.0


        # MSIE 7 and newer should be able to use keepalive


        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown




    </VirtualHost>


</IfModule>

Peter Schober

unread,
Oct 1, 2018, 9:30:33 AM10/1/18
to SimpleSAMLphp
* michael schouman <meta...@gmail.com> [2018-10-01 15:07]:
> <IfModule mod_fastcgi.c>
> AddHandler php7.1-fcgi .php
> Action php7.1-fcgi /php7.1-fcgi
> Alias /php7.1-fcgi /usr/lib/cgi-bin/php7.1
> FastCgiExternalServer /usr/lib/cgi-bin/php7.1 -socket /var/run/php/php7.1-fpm.sock -pass-header Authorization
> </IfModule>
>
> <IfModule !mod_fastcgi.c>
> <IfModule mod_proxy_fcgi.c>
> <FilesMatch ".+\.ph(ar|p|tml)$">
> SetHandler "proxy:unix:/var/run/php/php7.1-fpm.sock|fcgi://localhost/"
> </FilesMatch>
> </IfModule>
> </IfModule>

Note that the above doesn't tell us how you're running PHP: It could
be mod_fastcgi (which I thought was dead and had license issues,
AFAIR) or it could be PHP FPM with mod_proxy_fcgi.

-peter

Tim van Dijen

unread,
Oct 1, 2018, 9:36:46 AM10/1/18
to SimpleSAMLphp
You should make sure the .sock file exists and that php-fpm is running..
The rules by themselves look perfectly fine.

- Tim

michael schouman

unread,
Oct 1, 2018, 10:14:32 AM10/1/18
to SimpleSAMLphp

Screenshot 2018-10-01 at 16.12.22.png


Php-fpm is running fine. There is another site in the document root which works like a charm.

Tim van Dijen

unread,
Oct 1, 2018, 10:32:24 AM10/1/18
to SimpleSAMLphp
SElinux, file permissions.. All known to cause this error, but unfortunately impossible for us to troubleshoot...

michael schouman

unread,
Oct 1, 2018, 10:35:50 AM10/1/18
to SimpleSAMLphp
Is there some way to increase debugging info?

Tim van Dijen

unread,
Oct 1, 2018, 10:40:33 AM10/1/18
to SimpleSAMLphp
Not that I'm aware of... You just have to rule out any possible causes.

Op maandag 1 oktober 2018 16:35:50 UTC+2 schreef michael schouman:

michael schouman

unread,
Oct 8, 2018, 4:35:19 AM10/8/18
to SimpleSAMLphp
Alright, i found a fix. 
You should enable the following setting in your php.ini file (and restart php-fpm)
cgi.fix_pathinfo=1

I am a bit confused why this is a problem, but it works and i already spent to long on this issue. Moving on...

rahu...@swiggy.in

unread,
Jul 23, 2020, 5:28:55 AM7/23/20
to SimpleSAMLphp
This works like a charm!
Reply all
Reply to author
Forward
0 new messages