osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [users@httpd] .php3 files recognised but .php files not


On 10/06/2018 14:04, Paul Gardiner wrote:
I have just installed openSUSE Leap 15.0 on a server including Apache 2.4.33 and php 7.2.5.

If I attempt to access .php files, I'm offered them as downloads, although renaming them to .php3 makes them work fine. I have this file amongst my apache config

conf.d/php7.conf

<IfModule mod_php7.c>
        <FilesMatch "\.ph(p[345]?|tml)$">
            SetHandler application/x-httpd-php
        </FilesMatch>
        <FilesMatch "\.php[345]?s$">
            SetHandler application/x-httpd-php-source
        </FilesMatch>
         DirectoryIndex index.php4
         DirectoryIndex index.php5
         DirectoryIndex index.php
</IfModule>


I tried adding an extra FilesMatch clause, matching precisely .php, just in case something has become broken with regular expression matching, but that didn't help.

Please can someone suggest a way to track down the problem?

I see nothing relevant in the logs.

I eventually tracked down the problem. Initially .php files were offered for download because I hadn't added php7 to the list of modules to load. I fixed that very quickly, but there after the file was cached by my browser. Obvious I guess, but it confused me.

Thanks for the help.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx