httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Iliffe <>
Subject Re: [users@httpd] Unstable PHP under Apache
Date Tue, 02 May 2017 01:13:01 GMT
Thanks Arthur.

That was my initial thought, that the file permissions were wrong.

I just checked again and the permission on the root directory of this page 
(/httpd) is rwxr-xr-x and it is owned by root so the directory can be world 
read and descended.

Same for all of the virtual host lever directories below it, so they are 
world-readable and world descendable.  All of these directories are also 
owned by root, mainly to control anything being written over the page and 
script files.

All of the page and script files are world readable but owned by their 
"user".  For example, the phpinfo file that won't run is:

-rw-r--r--.  1 John John   213 Mar 19 17:23 phpinfo.php

Making this file executable doesn't do anything for the problem.  It 
shouldn't but it was worth a try.

As a test, I picked a file on which I don't have any permissions in a 
different virtual host and was able to cat it.  So no matter what uid apache 
and mod_fcgid/php-cgi are running under should be able to read the script.

When I try to run the script phpinfo from a fresh start of Apache, before 
the script runs there is no php-cgi shown as running.  After attempting to 
run, php-cgi is running and is a child of one of the httpd process 
children.  That is, httpd is under pid 10613, the httpd children are 10614 
to 10617 with parent pid 10613, and the php-cgi process is pid 10780 with 
parent pid 10614.

As a further test I modified things so that the php script was not treated 
as php and the page displays only the pure html lines in the script.  No 
problems getting there.

On Monday 01 May 2017 17:27:05 Arthur E. Johnston wrote:
> I experienced similar messages when working outside of the Apache
> directory.
> Check your permissions.
> Arthur Johnston
> Sent from my iPhone.  Please excuse
> The typos.
> > On May 1, 2017, at 1:20 PM, John Iliffe <> wrote:
> > 
> > This is set to:
> > 
> > max_execution_time = 30
> > max_input_time = 60
> > 
> > This is the default and I would expect to run a simple phpinfo it
> > would be adequate.
> > 
> > I was playing further and now I have got rid of the "No Input File
> > Specified" in favour of "Prohibited".   I had this problem before
> > while I was trying to resolve the situation.
> > 
> > Makes me think that there is a configuration error somewhere that is
> > affecting the security settings in Apache, but the directory has
> > "Require All Granted" set on it and I'm not aware of any others.
> > 
> > John
> > ==================================
> > 
> >> On Monday 01 May 2017 15:08:17 Arthur E. Johnston wrote:
> >> John
> >> 
> >> I am not near my computer right now.
> >> 
> >> There is a setting in PHP.ini to extend the time for each process.
> >> 
> >> 
> >> Arthur Johnston
> >> 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message