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

2018-06-12 Thread Paul Gardiner

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


    
    SetHandler application/x-httpd-php
    
    
    SetHandler application/x-httpd-php-source
    
     DirectoryIndex index.php4
     DirectoryIndex index.php5
     DirectoryIndex index.php



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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



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

2018-06-10 Thread Paul Gardiner

On 10/06/2018 21:00, Yehuda Katz wrote:

I would suggest removing "" from your configuration.
It is possible mod_php7 is not actually loaded and you have some other 
part of your configuration that is setting the handler for .php files.
If you remove "error message instead of having HTTPD ignore the configuration.


"that you have php code be processed instead of downloaded, you shouldn't 
let the server start if there is no php handler.


I'll give that a try, but I don't think that can be the case, because 
the change that Peter suggested was within the IfModule block and when I 
made that change it had an effect: it didn't fix the problem, but it 
stopped php3 files working. I'd also at an earlier stage in trying to 
trace the problem, added some random text within this block and that 
caused an error on apache start up.


Thanks for the suggestion, all the same.

On Sun, Jun 10, 2018 at 3:57 PM Paul Gardiner > wrote:




On 10/06/2018 18:53, Michael A. Peters wrote:
 > On 06/10/2018 06:04 AM, 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
 >>
 >> 
 >>    
 >>    SetHandler application/x-httpd-php
 >>    
 >>    
 >>    SetHandler application/x-httpd-php-source
 >>    
 >>     DirectoryIndex index.php4
 >>     DirectoryIndex index.php5
 >>     DirectoryIndex index.php
 >> 
 >
 > Just change it to
 >
 >
 > 
 >    
 >   SetHandler application/x-httpd-php
 >    
 >    
 >   SetHandler application/x-httpd-php-source
 >    
 >    DirectoryIndex index.php
 > 
 >
 > If you really need .php3 .php4 .php5 add them as separate FilesMatch
 > directives.
 >
 > Lot of stuff in php3/4 is deprecated on php7 so scripts written
for php
 > that ancient are not likely to work unless they are very simple,
and I
 > don't recall .php5 ever being an extension ever officially being
promoted.
 >
 > .php3 was because some servers had both php3 and php4 but I don't
even
 > recall .php4 being an officially endorsed extension, let alone .php5.

Thanks for the suggestion, but it still doesn't work: .php files are
still offered for download rather than being executed. Now that I've
made the change you suggested, .php3 files don't work either
unsurprisingly. There has to be something else in my configuration that
specifically stops .php files being executed but doesn't stop .php3. I
have no idea where to look.

Cheers,
         Paul.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org

For additional commands, e-mail: users-h...@httpd.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



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

2018-06-10 Thread Yehuda Katz
I would suggest removing "" from your configuration.
It is possible mod_php7 is not actually loaded and you have some other part
of your configuration that is setting the handler for .php files.
If you remove " wrote:

>
>
> On 10/06/2018 18:53, Michael A. Peters wrote:
> > On 06/10/2018 06:04 AM, 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
> >>
> >> 
> >>
> >>SetHandler application/x-httpd-php
> >>
> >>
> >>SetHandler application/x-httpd-php-source
> >>
> >> DirectoryIndex index.php4
> >> DirectoryIndex index.php5
> >> DirectoryIndex index.php
> >> 
> >
> > Just change it to
> >
> >
> > 
> >
> >   SetHandler application/x-httpd-php
> >
> >
> >   SetHandler application/x-httpd-php-source
> >
> >DirectoryIndex index.php
> > 
> >
> > If you really need .php3 .php4 .php5 add them as separate FilesMatch
> > directives.
> >
> > Lot of stuff in php3/4 is deprecated on php7 so scripts written for php
> > that ancient are not likely to work unless they are very simple, and I
> > don't recall .php5 ever being an extension ever officially being
> promoted.
> >
> > .php3 was because some servers had both php3 and php4 but I don't even
> > recall .php4 being an officially endorsed extension, let alone .php5.
>
> Thanks for the suggestion, but it still doesn't work: .php files are
> still offered for download rather than being executed. Now that I've
> made the change you suggested, .php3 files don't work either
> unsurprisingly. There has to be something else in my configuration that
> specifically stops .php files being executed but doesn't stop .php3. I
> have no idea where to look.
>
> Cheers,
> Paul.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


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

2018-06-10 Thread Paul Gardiner




On 10/06/2018 18:53, Michael A. Peters wrote:

On 06/10/2018 06:04 AM, 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


   
   SetHandler application/x-httpd-php
   
   
   SetHandler application/x-httpd-php-source
   
    DirectoryIndex index.php4
    DirectoryIndex index.php5
    DirectoryIndex index.php



Just change it to



   
  SetHandler application/x-httpd-php
   
   
  SetHandler application/x-httpd-php-source
   
   DirectoryIndex index.php


If you really need .php3 .php4 .php5 add them as separate FilesMatch 
directives.


Lot of stuff in php3/4 is deprecated on php7 so scripts written for php 
that ancient are not likely to work unless they are very simple, and I 
don't recall .php5 ever being an extension ever officially being promoted.


.php3 was because some servers had both php3 and php4 but I don't even 
recall .php4 being an officially endorsed extension, let alone .php5.


Thanks for the suggestion, but it still doesn't work: .php files are 
still offered for download rather than being executed. Now that I've 
made the change you suggested, .php3 files don't work either 
unsurprisingly. There has to be something else in my configuration that 
specifically stops .php files being executed but doesn't stop .php3. I 
have no idea where to look.


Cheers,
Paul.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



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

2018-06-10 Thread Michael A. Peters

On 06/10/2018 06:04 AM, 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


   
   SetHandler application/x-httpd-php
   
   
   SetHandler application/x-httpd-php-source
   
DirectoryIndex index.php4
DirectoryIndex index.php5
DirectoryIndex index.php



Just change it to



  
 SetHandler application/x-httpd-php
  
  
 SetHandler application/x-httpd-php-source
  
  DirectoryIndex index.php


If you really need .php3 .php4 .php5 add them as separate FilesMatch 
directives.


Lot of stuff in php3/4 is deprecated on php7 so scripts written for php 
that ancient are not likely to work unless they are very simple, and I 
don't recall .php5 ever being an extension ever officially being promoted.


.php3 was because some servers had both php3 and php4 but I don't even 
recall .php4 being an officially endorsed extension, let alone .php5.


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



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

2018-06-10 Thread Paul Gardiner
There's nothing coming up in error_log when I access these files. 
There's just the normal startup lines:


[Sun Jun 10 18:09:59.954937 2018] [mpm_prefork:notice] [pid 4652] 
AH00163: Apache/2.4.33 (Linux/SUSE) OpenSSL/1.1.0h-fips PHP/7.2.5 
configured -- resuming normal operations
[Sun Jun 10 18:09:59.954998 2018] [core:notice] [pid 4652] AH00094: 
Command line: '/usr/sbin/httpd-prefork -D SYSCONFIG -D SSL -C PidFile 
/var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf 
-C Include /etc/apache2/sysconfig.d//global.conf -f 
/etc/apache2/httpd.conf -c Include 
/etc/apache2/sysconfig.d//include.conf -D SYSTEMD -D FOREGROUND'


On 10/06/2018 14:08, Miguel Gonzalez wrote:

What the error_log says?

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



SetHandler application/x-httpd-php


SetHandler application/x-httpd-php-source

 DirectoryIndex index.php4
 DirectoryIndex index.php5
 DirectoryIndex index.php



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.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



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

2018-06-10 Thread Miguel Gonzalez
What the error_log says?

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
>
>
>
>SetHandler application/x-httpd-php
>
>
>SetHandler application/x-httpd-php-source
>
> DirectoryIndex index.php4
> DirectoryIndex index.php5
> DirectoryIndex index.php
>
>
>
>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.
>
>-
>To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>For additional commands, e-mail: users-h...@httpd.apache.org
>