You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Iliffe <jo...@iliffe.ca> on 2017/04/30 18:56:18 UTC

[users@httpd] Unstable PHP under Apache

I have a new Apache 2.4.25 installation that I have been trying to get 
running properly for a few months now.   After many attempts to run PHP 
using php-fpm, I finally reverted to mod-fcgid and I still can't get 
everything to run properly.

Calling a PHP script, when the php.ini  file is syntactically correct, leads 
to a "No Input File Specified" error.  Note that this DOES NOT lead to a 404 
error from Apache; leading me to the conclusion that the problem is in 
mod_fcgid and its configuration somewhere.

As I understand it, mod_fcgid **should** start several children to run php 
calls.

Here is what I have:

1.  start Apache so I have a clean copy
	systemctl start httpd

2.  check it is running:
	ps -ef | grep httpd
root     29599     1  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29600 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29601 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29602 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29603 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

3.  check for php child processes:
 ps -ef | grep php

So, at this point, there are 4 httpd workers runnning and no php children 
are running  

4.  try a call to a php script (phpinfo.php)

ps -ef | grep php
apache   29789 29600  0 14:02 ?        00:00:00 /usr/php-7.1.3/bin/php-cgi

Now Apache has started php-cgi, the parent process is one of the workers  
The response to the browser is "No input file specified"

There are no errors shown in the Apache error log, nor in the php.log, nor 
in the php-fpm.log.  

----------------------
The relevant parts of the Apache config file are:

LoadModule fcgid_module modules/mod_fcgid.so

# Add mod_fcgid changes
<IfModule fcgid_module>
<Directory "/httpd/*">
	Options +ExecCGI
        AddHandler fcgid-script .php
        FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
</Directory>
</IfModule>

LoadModule php7_module        modules/libphp7.so 

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

The related parts of the php.ini file are:

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
; http://php.net/doc-root
doc_root = /httpd

The rest of php.ini is the distributed file, except that the log files are 
pointed to /var/log/php/  so they should be written properly.

A week or so back I had a workaround for this but it isn't acceptable as a 
production system (for one thing, it blows all the PHP errors out on the 
user's browser screen) and another week's work hasn't resolved the issue.  
Both php-fcgid and php-fpm are so common that I am convinced that I have a 
configuration problem but even starting back with a new PHP and Apache 
install doesn't resolve it.

Can anyone suggest where I should look next?  

[FYI, in the past I have routinely brought up new server hardware/new web 
server combinations in about 3 weeks work.  This one is approaching 4 
months and not improving my self-esteem!]

John


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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
Linux, Fedora 25, SELinux set to permissive and permissions on the 
directories are correct.

John

On Monday 01 May 2017 00:57:36 Arthur E. Johnston wrote:
> What operating system?
> 
> Arthur Johnston
> Meadowbrook Kennels
> 
> -----Original Message-----
> From: John Iliffe [mailto:john.iliffe@iliffe.ca]
> Sent: Sunday, April 30, 2017 11:56 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Unstable PHP under Apache
> 
> I have a new Apache 2.4.25 installation that I have been trying to get
> running properly for a few months now.   After many attempts to run PHP
> using php-fpm, I finally reverted to mod-fcgid and I still can't get
> everything to run properly.
> 
> Calling a PHP script, when the php.ini  file is syntactically correct,
> leads to a "No Input File Specified" error.  Note that this DOES NOT
> lead to a 404 error from Apache; leading me to the conclusion that the
> problem is in mod_fcgid and its configuration somewhere.
> 
> As I understand it, mod_fcgid **should** start several children to run
> php calls.
> 
> Here is what I have:
> 
> 1.  start Apache so I have a clean copy
> 	systemctl start httpd
> 
> 2.  check it is running:
> 	ps -ef | grep httpd
> root     29599     1  0 14:00 ?        00:00:00
> /usr/apache-2.4.25/bin/httpd -k start
> 
> apache   29600 29599  0 14:00 ?        00:00:00
> /usr/apache-2.4.25/bin/httpd -k start
> 
> apache   29601 29599  0 14:00 ?        00:00:00
> /usr/apache-2.4.25/bin/httpd -k start
> 
> apache   29602 29599  0 14:00 ?        00:00:00
> /usr/apache-2.4.25/bin/httpd -k start
> 
> apache   29603 29599  0 14:00 ?        00:00:00
> /usr/apache-2.4.25/bin/httpd -k start
> 
> 3.  check for php child processes:
>  ps -ef | grep php
> 
> So, at this point, there are 4 httpd workers runnning and no php
> children are running
> 
> 4.  try a call to a php script (phpinfo.php)
> 
> ps -ef | grep php
> apache   29789 29600  0 14:02 ?        00:00:00
> /usr/php-7.1.3/bin/php-cgi
> 
> Now Apache has started php-cgi, the parent process is one of the workers
> The response to the browser is "No input file specified"
> 
> There are no errors shown in the Apache error log, nor in the php.log,
> nor in the php-fpm.log.
> 
> ----------------------
> The relevant parts of the Apache config file are:
> 
> LoadModule fcgid_module modules/mod_fcgid.so
> 
> # Add mod_fcgid changes
> <IfModule fcgid_module>
> <Directory "/httpd/*">
> 	Options +ExecCGI
>         AddHandler fcgid-script .php
>         FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
> </Directory> </IfModule>
> 
> LoadModule php7_module        modules/libphp7.so
> 
> ----------------------
> 
> The related parts of the php.ini file are:
> 
> ; The root of the PHP pages, used only if nonempty.
> ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ;
> if you are running php as a CGI under any web server (other than IIS) ;
> see documentation for security issues.  The alternate is to use the ;
> cgi.force_redirect configuration below ; http://php.net/doc-root
> doc_root = /httpd
> 
> The rest of php.ini is the distributed file, except that the log files
> are pointed to /var/log/php/  so they should be written properly.
> 
> A week or so back I had a workaround for this but it isn't acceptable as
> a production system (for one thing, it blows all the PHP errors out on
> the user's browser screen) and another week's work hasn't resolved the
> issue. Both php-fcgid and php-fpm are so common that I am convinced
> that I have a configuration problem but even starting back with a new
> PHP and Apache install doesn't resolve it.
> 
> Can anyone suggest where I should look next?
> 
> [FYI, in the past I have routinely brought up new server hardware/new
> web server combinations in about 3 weeks work.  This one is approaching
> 4 months and not improving my self-esteem!]
> 
> John
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


RE: [users@httpd] Unstable PHP under Apache

Posted by "Arthur E. Johnston" <ar...@verizon.net>.
What operating system?

Arthur Johnston
Meadowbrook Kennels

-----Original Message-----
From: John Iliffe [mailto:john.iliffe@iliffe.ca] 
Sent: Sunday, April 30, 2017 11:56 AM
To: users@httpd.apache.org
Subject: [users@httpd] Unstable PHP under Apache

I have a new Apache 2.4.25 installation that I have been trying to get 
running properly for a few months now.   After many attempts to run PHP 
using php-fpm, I finally reverted to mod-fcgid and I still can't get
everything to run properly.

Calling a PHP script, when the php.ini  file is syntactically correct, leads
to a "No Input File Specified" error.  Note that this DOES NOT lead to a 404
error from Apache; leading me to the conclusion that the problem is in
mod_fcgid and its configuration somewhere.

As I understand it, mod_fcgid **should** start several children to run php
calls.

Here is what I have:

1.  start Apache so I have a clean copy
	systemctl start httpd

2.  check it is running:
	ps -ef | grep httpd
root     29599     1  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29600 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29601 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29602 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

apache   29603 29599  0 14:00 ?        00:00:00 
/usr/apache-2.4.25/bin/httpd -k start

3.  check for php child processes:
 ps -ef | grep php

So, at this point, there are 4 httpd workers runnning and no php children
are running  

4.  try a call to a php script (phpinfo.php)

ps -ef | grep php
apache   29789 29600  0 14:02 ?        00:00:00 /usr/php-7.1.3/bin/php-cgi

Now Apache has started php-cgi, the parent process is one of the workers The
response to the browser is "No input file specified"

There are no errors shown in the Apache error log, nor in the php.log, nor
in the php-fpm.log.  

----------------------
The relevant parts of the Apache config file are:

LoadModule fcgid_module modules/mod_fcgid.so

# Add mod_fcgid changes
<IfModule fcgid_module>
<Directory "/httpd/*">
	Options +ExecCGI
        AddHandler fcgid-script .php
        FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php </Directory>
</IfModule>

LoadModule php7_module        modules/libphp7.so 

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

The related parts of the php.ini file are:

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if
you are running php as a CGI under any web server (other than IIS) ; see
documentation for security issues.  The alternate is to use the ;
cgi.force_redirect configuration below ; http://php.net/doc-root doc_root =
/httpd

The rest of php.ini is the distributed file, except that the log files are
pointed to /var/log/php/  so they should be written properly.

A week or so back I had a workaround for this but it isn't acceptable as a
production system (for one thing, it blows all the PHP errors out on the
user's browser screen) and another week's work hasn't resolved the issue.  
Both php-fcgid and php-fpm are so common that I am convinced that I have a
configuration problem but even starting back with a new PHP and Apache
install doesn't resolve it.

Can anyone suggest where I should look next?  

[FYI, in the past I have routinely brought up new server hardware/new web
server combinations in about 3 weeks work.  This one is approaching 4 months
and not improving my self-esteem!]

John


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


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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
Thanks for your response Arthur.  I had considered that but in the end I 
have just capitulated and am running everything exactly as one would expect 
it to work under mod_php. phpinfo confirms that the underlying version of 
PHP is 7.1.3 under mod_php.  

That avoids the problems of reconfiguring the fairly large batch component 
of PHP on this server that is working properly already.  

The problem appears to have been that the script startup info passed to PHP 
by Apache either wasn't correct or wasn't complete, I don't know which, and 
I don't know how to find out.  One thing I did notice was that the notes in 
the Apache documentation seem to be aimed at 2.2 rather than 2.4 and I'm on 
PHP 7.1.3 which is noted in the PHP documentation as having a different API.  
Maybe there should be an upgrade to the docs? 

Anyhow, everything came up fine, so far as testing has shown up to now, 
under mod_php and I've run out of my window of opportunity to play with 
this new server, so I have to stop now.

Again, thanks to you and to all who responded to my questions.  I'm sorry 
that I was not able to get this resolved, but I guess we all have to call 
"enough" at some point.

Regards,

John
===================================
On Tuesday 02 May 2017 10:41:29 Arthur E. Johnston wrote:
> With your current configuration, PHP is not operating.  If PHP was
> operating you would (or should) have an entry in a PHP.log.
> 
> My suggestion is to eliminate your current PHP installation and use the
> default installation available with your operating system.
> 
> After PHP is operating, perform the modifications you desire.
> 
> Somewhere, in this chain you mentioned you did not use the method of
> installing PHP that was available with your operating system, because it
> would update PHP without allowing you control.
> 
> Rather than modifying the standard installation of PHP, modify the
> actions of the program that updates your operating system.
> 
> Arthur Johnston
> Meadowbrook Kennels
> 
> -----Original Message-----
> From: John Iliffe [mailto:john.iliffe@iliffe.ca]
> Sent: Tuesday, May 02, 2017 7:25 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Unstable PHP under Apache
> 
> That's the weird thing - there nothing in the php.log and php-fpm.log
> has only errors originating from the batch file processing.  (these are
> legitimate).
> 
> In the Apache error log, nothing.
> 
> In the Apache access log, the response is shown as 404 even though the
> browser displays "No Input file specified".  If I deliberately change
> the request location to be wrong, then the browser displays the
> expected 404 and so does the Apache access log.  The Apache error log
> never writes anything for this.
> 
> John
> =================================
> 
> On Monday 01 May 2017 23:18:04 Arthur E. Johnston wrote:
> > What are the errors in your PHP-FPM.LOG?
> > 
> > 
> > Arthur Johnston
> > Meadowbrook Kennels
> > 
> > -----Original Message-----
> > From: John Iliffe [mailto:john.iliffe@iliffe.ca]
> > Sent: Monday, May 01, 2017 7:53 PM
> > To: users@httpd.apache.org
> > Subject: Re: [users@httpd] Unstable PHP under Apache
> > 
> > Still poking around with this and one thing seems very odd to me.
> > 
> > Coded exactly as shown in the Apache docs, php is NOT invoked by a php
> > script.  What I mean is:
> > 
> > This is from the docs, as I understand them:
> > -----------------------------
> > # Add FCGI changes
> > <IfModule fcgid_module>
> > FcgidMaxRequestsPerProcess 10000
> > 
> > Alias /phpapp/ /httpd/
> > <Location /phpapp/>
> > ##<Directory /httpd/*>
> > 
> >     AddHandler fcgid-script .php
> > 
> > ##    AllowOverride None
> > 
> >     Options +ExecCGI
> > 
> > #  Caution - if the version of Apache is updated then probably
> > #            this wrapper script will need to be updated too
> > 
> >     FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
> >     Require all granted
> > 
> > #
> > 
> > ##</Directory>
> > </Location>
> > </IfModule>
> > -------------------------------
> > Passes the apachectl -t test for syntax, but outputs only the html
> > portion of the page.
> > 
> > This one at least invokes php
> > --------------------------------
> > # Add FCGI changes
> > <IfModule fcgid_module>
> > FcgidMaxRequestsPerProcess 10000
> > 
> > #Alias /phpapp/ /httpd/
> > #<Location /phpapp/>
> > <Directory /httpd/*>
> > 
> >     AddHandler fcgid-script .php
> > 
> > ##    AllowOverride None
> > 
> >     Options +ExecCGI
> > 
> > #  Caution - if the version of Apache is updated then probably
> > #            this wrapper script will need to be updated too
> > 
> >     FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
> >     Require all granted
> > 
> > #
> > 
> > </Directory>
> > #</Location>
> > </IfModule>
> > --------------------------------
> > Starts php-cgi but outputs "No Input file specified".
> > 
> > No error messages in http error log in either case.
> > 
> > John
> > ==================================
> > 
> > On Monday 01 May 2017 21:13:01 John Iliffe wrote:
> > > 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.
> > > 
> > > John
> > > ========================================
> > > 
> > > 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 <jo...@iliffe.ca>
> > > > > 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: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


RE: [users@httpd] Unstable PHP under Apache

Posted by "Arthur E. Johnston" <ar...@verizon.net>.
With your current configuration, PHP is not operating.  If PHP was operating
you would (or should) have an entry in a PHP.log. 

My suggestion is to eliminate your current PHP installation and use the
default installation available with your operating system.

After PHP is operating, perform the modifications you desire.

Somewhere, in this chain you mentioned you did not use the method of
installing PHP that was available with your operating system, because it
would update PHP without allowing you control.

Rather than modifying the standard installation of PHP, modify the actions
of the program that updates your operating system.

Arthur Johnston
Meadowbrook Kennels

-----Original Message-----
From: John Iliffe [mailto:john.iliffe@iliffe.ca] 
Sent: Tuesday, May 02, 2017 7:25 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Unstable PHP under Apache

That's the weird thing - there nothing in the php.log and php-fpm.log has
only errors originating from the batch file processing.  (these are 
legitimate).   

In the Apache error log, nothing.

In the Apache access log, the response is shown as 404 even though the
browser displays "No Input file specified".  If I deliberately change the
request location to be wrong, then the browser displays the expected 404 and
so does the Apache access log.  The Apache error log never writes anything
for this.

John
=================================
On Monday 01 May 2017 23:18:04 Arthur E. Johnston wrote:
> What are the errors in your PHP-FPM.LOG?
> 
> 
> Arthur Johnston
> Meadowbrook Kennels
> 
> -----Original Message-----
> From: John Iliffe [mailto:john.iliffe@iliffe.ca]
> Sent: Monday, May 01, 2017 7:53 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Unstable PHP under Apache
> 
> Still poking around with this and one thing seems very odd to me.
> 
> Coded exactly as shown in the Apache docs, php is NOT invoked by a php 
> script.  What I mean is:
> 
> This is from the docs, as I understand them:
> -----------------------------
> # Add FCGI changes
> <IfModule fcgid_module>
> FcgidMaxRequestsPerProcess 10000
> 
> Alias /phpapp/ /httpd/
> <Location /phpapp/>
> ##<Directory /httpd/*>
>     AddHandler fcgid-script .php
> ##    AllowOverride None
>     Options +ExecCGI
> #  Caution - if the version of Apache is updated then probably
> #            this wrapper script will need to be updated too
>     FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
>     Require all granted
> #
> 
> ##</Directory>
> </Location>
> </IfModule>
> -------------------------------
> Passes the apachectl -t test for syntax, but outputs only the html 
> portion of the page.
> 
> This one at least invokes php
> --------------------------------
> # Add FCGI changes
> <IfModule fcgid_module>
> FcgidMaxRequestsPerProcess 10000
> 
> #Alias /phpapp/ /httpd/
> #<Location /phpapp/>
> <Directory /httpd/*>
>     AddHandler fcgid-script .php
> ##    AllowOverride None
>     Options +ExecCGI
> #  Caution - if the version of Apache is updated then probably
> #            this wrapper script will need to be updated too
>     FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
>     Require all granted
> #
> 
> </Directory>
> #</Location>
> </IfModule>
> --------------------------------
> Starts php-cgi but outputs "No Input file specified".
> 
> No error messages in http error log in either case.
> 
> John
> ==================================
> 
> On Monday 01 May 2017 21:13:01 John Iliffe wrote:
> > 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.
> > 
> > John
> > ========================================
> > 
> > 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 <jo...@iliffe.ca>
> > > > 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: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
That's the weird thing - there nothing in the php.log and php-fpm.log has 
only errors originating from the batch file processing.  (these are 
legitimate).   

In the Apache error log, nothing.

In the Apache access log, the response is shown as 404 even though the 
browser displays "No Input file specified".  If I deliberately change the 
request location to be wrong, then the browser displays the expected 404 
and so does the Apache access log.  The Apache error log never writes 
anything for this.

John
=================================
On Monday 01 May 2017 23:18:04 Arthur E. Johnston wrote:
> What are the errors in your PHP-FPM.LOG?
> 
> 
> Arthur Johnston
> Meadowbrook Kennels
> 
> -----Original Message-----
> From: John Iliffe [mailto:john.iliffe@iliffe.ca]
> Sent: Monday, May 01, 2017 7:53 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Unstable PHP under Apache
> 
> Still poking around with this and one thing seems very odd to me.
> 
> Coded exactly as shown in the Apache docs, php is NOT invoked by a php
> script.  What I mean is:
> 
> This is from the docs, as I understand them:
> -----------------------------
> # Add FCGI changes
> <IfModule fcgid_module>
> FcgidMaxRequestsPerProcess 10000
> 
> Alias /phpapp/ /httpd/
> <Location /phpapp/>
> ##<Directory /httpd/*>
>     AddHandler fcgid-script .php
> ##    AllowOverride None
>     Options +ExecCGI
> #  Caution - if the version of Apache is updated then probably
> #            this wrapper script will need to be updated too
>     FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
>     Require all granted
> #
> 
> ##</Directory>
> </Location>
> </IfModule>
> -------------------------------
> Passes the apachectl -t test for syntax, but outputs only the html
> portion of the page.
> 
> This one at least invokes php
> --------------------------------
> # Add FCGI changes
> <IfModule fcgid_module>
> FcgidMaxRequestsPerProcess 10000
> 
> #Alias /phpapp/ /httpd/
> #<Location /phpapp/>
> <Directory /httpd/*>
>     AddHandler fcgid-script .php
> ##    AllowOverride None
>     Options +ExecCGI
> #  Caution - if the version of Apache is updated then probably
> #            this wrapper script will need to be updated too
>     FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
>     Require all granted
> #
> 
> </Directory>
> #</Location>
> </IfModule>
> --------------------------------
> Starts php-cgi but outputs "No Input file specified".
> 
> No error messages in http error log in either case.
> 
> John
> ==================================
> 
> On Monday 01 May 2017 21:13:01 John Iliffe wrote:
> > 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.
> > 
> > John
> > ========================================
> > 
> > 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 <jo...@iliffe.ca>
> > > > 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: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


RE: [users@httpd] Unstable PHP under Apache

Posted by "Arthur E. Johnston" <ar...@verizon.net>.
What are the errors in your PHP-FPM.LOG?


Arthur Johnston
Meadowbrook Kennels

-----Original Message-----
From: John Iliffe [mailto:john.iliffe@iliffe.ca] 
Sent: Monday, May 01, 2017 7:53 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Unstable PHP under Apache

Still poking around with this and one thing seems very odd to me.

Coded exactly as shown in the Apache docs, php is NOT invoked by a php
script.  What I mean is:

This is from the docs, as I understand them:
-----------------------------
# Add FCGI changes
<IfModule fcgid_module>
FcgidMaxRequestsPerProcess 10000

Alias /phpapp/ /httpd/
<Location /phpapp/>
##<Directory /httpd/*>
    AddHandler fcgid-script .php
##    AllowOverride None
    Options +ExecCGI
#  Caution - if the version of Apache is updated then probably
#            this wrapper script will need to be updated too
    FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
    Require all granted
#
        
##</Directory>
</Location>
</IfModule>
-------------------------------
Passes the apachectl -t test for syntax, but outputs only the html portion
of the page.

This one at least invokes php
--------------------------------
# Add FCGI changes
<IfModule fcgid_module>
FcgidMaxRequestsPerProcess 10000

#Alias /phpapp/ /httpd/
#<Location /phpapp/>
<Directory /httpd/*>
    AddHandler fcgid-script .php
##    AllowOverride None
    Options +ExecCGI
#  Caution - if the version of Apache is updated then probably
#            this wrapper script will need to be updated too
    FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
    Require all granted
#
        
</Directory>
#</Location>
</IfModule>
--------------------------------
Starts php-cgi but outputs "No Input file specified".

No error messages in http error log in either case.

John
==================================

On Monday 01 May 2017 21:13:01 John Iliffe wrote:
> 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.
> 
> John
> ========================================
> 
> 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 <jo...@iliffe.ca>
> > > 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: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
Still poking around with this and one thing seems very odd to me.

Coded exactly as shown in the Apache docs, php is NOT invoked by a php 
script.  What I mean is:

This is from the docs, as I understand them:
-----------------------------
# Add FCGI changes
<IfModule fcgid_module>
FcgidMaxRequestsPerProcess 10000

Alias /phpapp/ /httpd/
<Location /phpapp/>
##<Directory /httpd/*>
    AddHandler fcgid-script .php
##    AllowOverride None
    Options +ExecCGI
#  Caution - if the version of Apache is updated then probably
#            this wrapper script will need to be updated too
    FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
    Require all granted
#
        
##</Directory>
</Location>
</IfModule>
-------------------------------
Passes the apachectl -t test for syntax, but outputs only the html portion 
of the page.

This one at least invokes php
--------------------------------
# Add FCGI changes
<IfModule fcgid_module>
FcgidMaxRequestsPerProcess 10000

#Alias /phpapp/ /httpd/
#<Location /phpapp/>
<Directory /httpd/*>
    AddHandler fcgid-script .php
##    AllowOverride None
    Options +ExecCGI
#  Caution - if the version of Apache is updated then probably
#            this wrapper script will need to be updated too
    FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php
    Require all granted
#
        
</Directory>
#</Location>
</IfModule>
--------------------------------
Starts php-cgi but outputs "No Input file specified".

No error messages in http error log in either case.

John
==================================

On Monday 01 May 2017 21:13:01 John Iliffe wrote:
> 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.
> 
> John
> ========================================
> 
> 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 <jo...@iliffe.ca>
> > > 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: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
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.

John
========================================
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 <jo...@iliffe.ca> 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: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Unstable PHP under Apache

Posted by "Arthur E. Johnston" <ar...@verizon.net>.
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 <jo...@iliffe.ca> 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
>> 
>> Sent from my iPhone.  Please excuse
>> The typos.
>> 
>>> On May 1, 2017, at 8:24 AM, John Iliffe <jo...@iliffe.ca> wrote:
>>> 
>>> Thanks for the response Nick.
>>> 
>>> I originally suspected PHP too but using mod_php most of this works. 
>>> (It all does on the old server on Apache-2.4.10 using mod_php)  I'm
>>> using mod_fcgid on Apache so that is why I posted here.  I already
>>> tried the Apache download of PHP-FPM about a month back with mostly
>>> similar errors, even with a considerable amount of help by Daniel; so
>>> I gave up and went to what looked like it should be the easier path
>>> (mod_fcgid).  As it turned out, it wasn't.
>>> 
>>> The odd install locations are because I don't want to use the Fedora
>>> repositories to get the Apache and PHP and other software.  I've been
>>> hit before by a non-trivial change when the software gets updated and
>>> something breaks.  So now I maintain my own and I always have a
>>> back-out position.
>>> 
>>> The locations for the PHP scripts are because there are several named
>>> virtual hosts on Apache and each one has its own subdirectory under
>>> /httpd. For example, the test server, and the hacker trap on the
>>> first named host is iliffe.ca with /httpd/iliffe  as the document
>>> root.  Both scripts and static pages related to the virtual server
>>> are stored in the same place.
>>> 
>>> The really odd thing is that if the PHP ini file is incorrect (syntax
>>> error in one line) then everything works as it should.  The problem
>>> that arises is that every page served has a line right in the middle
>>> of the page that says something like "syntax error in ini file on
>>> line #432"  or similar. Certainly not acceptable for a production
>>> server!  Note that this occurs on EVERY page served, indicating that
>>> a new PHP child process must have been started on every script which
>>> is not what I would expect from the docs on mod_fcgid.  (which should
>>> have started a pool I would have thought).
>>> 
>>> So, yes, you are correct, I may be barking up the wrong tree.  The
>>> problem is, I'm lost in the forest!
>>> 
>>> Regards,
>>> 
>>> John
>>> =========================================
>>> 
>>>> On Monday 01 May 2017 01:54:26 Nick Kew wrote:
>>>> On Sun, 2017-04-30 at 14:56 -0400, John Iliffe wrote:
>>>> 
>>>> I find your post confusing, so I may be barking up the
>>>> 
>>>> wrong tree.  But I see:
>>>>> Now Apache has started php-cgi, the parent process is one of the
>>>>> workers The response to the browser is "No input file specified"
>>>>> 
>>>>> There are no errors shown in the Apache error log, nor in the
>>>>> php.log, nor in the php-fpm.log.
>>>> 
>>>> It looks as if you're looking in the wrong place.
>>>> It's all working fine as far as Apache is concerned:
>>>> PHP has accepted a request and produced a response.
>>>> Your problem lies in something PHP is doing.
>>>> 
>>>> Questions to consider:
>>>> Why the idiosyncratic install locations of httpd and php
>>>> in your filesystem?
>>>> What's the HTTP response?
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
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
> 
> Sent from my iPhone.  Please excuse
> The typos.
> 
> > On May 1, 2017, at 8:24 AM, John Iliffe <jo...@iliffe.ca> wrote:
> > 
> > Thanks for the response Nick.
> > 
> > I originally suspected PHP too but using mod_php most of this works. 
> > (It all does on the old server on Apache-2.4.10 using mod_php)  I'm
> > using mod_fcgid on Apache so that is why I posted here.  I already
> > tried the Apache download of PHP-FPM about a month back with mostly
> > similar errors, even with a considerable amount of help by Daniel; so
> > I gave up and went to what looked like it should be the easier path
> > (mod_fcgid).  As it turned out, it wasn't.
> > 
> > The odd install locations are because I don't want to use the Fedora
> > repositories to get the Apache and PHP and other software.  I've been
> > hit before by a non-trivial change when the software gets updated and
> > something breaks.  So now I maintain my own and I always have a
> > back-out position.
> > 
> > The locations for the PHP scripts are because there are several named
> > virtual hosts on Apache and each one has its own subdirectory under
> > /httpd. For example, the test server, and the hacker trap on the
> > first named host is iliffe.ca with /httpd/iliffe  as the document
> > root.  Both scripts and static pages related to the virtual server
> > are stored in the same place.
> > 
> > The really odd thing is that if the PHP ini file is incorrect (syntax
> > error in one line) then everything works as it should.  The problem
> > that arises is that every page served has a line right in the middle
> > of the page that says something like "syntax error in ini file on
> > line #432"  or similar. Certainly not acceptable for a production
> > server!  Note that this occurs on EVERY page served, indicating that
> > a new PHP child process must have been started on every script which
> > is not what I would expect from the docs on mod_fcgid.  (which should
> > have started a pool I would have thought).
> > 
> > So, yes, you are correct, I may be barking up the wrong tree.  The
> > problem is, I'm lost in the forest!
> > 
> > Regards,
> > 
> > John
> > =========================================
> > 
> >> On Monday 01 May 2017 01:54:26 Nick Kew wrote:
> >> On Sun, 2017-04-30 at 14:56 -0400, John Iliffe wrote:
> >> 
> >> I find your post confusing, so I may be barking up the
> >> 
> >> wrong tree.  But I see:
> >>> Now Apache has started php-cgi, the parent process is one of the
> >>> workers The response to the browser is "No input file specified"
> >>> 
> >>> There are no errors shown in the Apache error log, nor in the
> >>> php.log, nor in the php-fpm.log.
> >> 
> >> It looks as if you're looking in the wrong place.
> >> It's all working fine as far as Apache is concerned:
> >> PHP has accepted a request and produced a response.
> >> Your problem lies in something PHP is doing.
> >> 
> >> Questions to consider:
> >> Why the idiosyncratic install locations of httpd and php
> >> in your filesystem?
> >> What's the HTTP response?
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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


Re: [users@httpd] Unstable PHP under Apache

Posted by "Arthur E. Johnston" <ar...@verizon.net>.
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

Sent from my iPhone.  Please excuse
The typos.


> On May 1, 2017, at 8:24 AM, John Iliffe <jo...@iliffe.ca> wrote:
> 
> Thanks for the response Nick.
> 
> I originally suspected PHP too but using mod_php most of this works.  (It 
> all does on the old server on Apache-2.4.10 using mod_php)  I'm using 
> mod_fcgid on Apache so that is why I posted here.  I already tried the 
> Apache download of PHP-FPM about a month back with mostly similar errors, 
> even with a considerable amount of help by Daniel; so I gave up and went to 
> what looked like it should be the easier path (mod_fcgid).  As it turned 
> out, it wasn't.
> 
> The odd install locations are because I don't want to use the Fedora 
> repositories to get the Apache and PHP and other software.  I've been hit 
> before by a non-trivial change when the software gets updated and something 
> breaks.  So now I maintain my own and I always have a back-out position.  
> 
> The locations for the PHP scripts are because there are several named 
> virtual hosts on Apache and each one has its own subdirectory under /httpd.  
> For example, the test server, and the hacker trap on the first named host is 
> iliffe.ca with /httpd/iliffe  as the document root.  Both scripts and static 
> pages related to the virtual server are stored in the same place.
> 
> The really odd thing is that if the PHP ini file is incorrect (syntax error 
> in one line) then everything works as it should.  The problem that arises 
> is that every page served has a line right in the middle of the page that 
> says something like "syntax error in ini file on line #432"  or similar.  
> Certainly not acceptable for a production server!  Note that this occurs on 
> EVERY page served, indicating that a new PHP child process must have been 
> started on every script which is not what I would expect from the docs on 
> mod_fcgid.  (which should have started a pool I would have thought).
> 
> So, yes, you are correct, I may be barking up the wrong tree.  The problem 
> is, I'm lost in the forest!
> 
> Regards,
> 
> John
> =========================================
>> On Monday 01 May 2017 01:54:26 Nick Kew wrote:
>> On Sun, 2017-04-30 at 14:56 -0400, John Iliffe wrote:
>> 
>> I find your post confusing, so I may be barking up the
>> 
>> wrong tree.  But I see:
>>> Now Apache has started php-cgi, the parent process is one of the
>>> workers The response to the browser is "No input file specified"
>>> 
>>> There are no errors shown in the Apache error log, nor in the php.log,
>>> nor in the php-fpm.log.
>> 
>> It looks as if you're looking in the wrong place.
>> It's all working fine as far as Apache is concerned:
>> PHP has accepted a request and produced a response.
>> Your problem lies in something PHP is doing.
>> 
>> Questions to consider:
>> Why the idiosyncratic install locations of httpd and php
>> in your filesystem?
>> What's the HTTP response?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


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


Re: [users@httpd] Unstable PHP under Apache

Posted by John Iliffe <jo...@iliffe.ca>.
Thanks for the response Nick.

I originally suspected PHP too but using mod_php most of this works.  (It 
all does on the old server on Apache-2.4.10 using mod_php)  I'm using 
mod_fcgid on Apache so that is why I posted here.  I already tried the 
Apache download of PHP-FPM about a month back with mostly similar errors, 
even with a considerable amount of help by Daniel; so I gave up and went to 
what looked like it should be the easier path (mod_fcgid).  As it turned 
out, it wasn't.

The odd install locations are because I don't want to use the Fedora 
repositories to get the Apache and PHP and other software.  I've been hit 
before by a non-trivial change when the software gets updated and something 
breaks.  So now I maintain my own and I always have a back-out position.  

The locations for the PHP scripts are because there are several named 
virtual hosts on Apache and each one has its own subdirectory under /httpd.  
For example, the test server, and the hacker trap on the first named host is 
iliffe.ca with /httpd/iliffe  as the document root.  Both scripts and static 
pages related to the virtual server are stored in the same place.

The really odd thing is that if the PHP ini file is incorrect (syntax error 
in one line) then everything works as it should.  The problem that arises 
is that every page served has a line right in the middle of the page that 
says something like "syntax error in ini file on line #432"  or similar.  
Certainly not acceptable for a production server!  Note that this occurs on 
EVERY page served, indicating that a new PHP child process must have been 
started on every script which is not what I would expect from the docs on 
mod_fcgid.  (which should have started a pool I would have thought).

So, yes, you are correct, I may be barking up the wrong tree.  The problem 
is, I'm lost in the forest!

Regards,

John
=========================================
On Monday 01 May 2017 01:54:26 Nick Kew wrote:
> On Sun, 2017-04-30 at 14:56 -0400, John Iliffe wrote:
> 
> I find your post confusing, so I may be barking up the
> 
> wrong tree.  But I see:
> > Now Apache has started php-cgi, the parent process is one of the
> > workers The response to the browser is "No input file specified"
> > 
> > There are no errors shown in the Apache error log, nor in the php.log,
> > nor in the php-fpm.log.
> 
> It looks as if you're looking in the wrong place.
> It's all working fine as far as Apache is concerned:
> PHP has accepted a request and produced a response.
> Your problem lies in something PHP is doing.
> 
> Questions to consider:
> Why the idiosyncratic install locations of httpd and php
> in your filesystem?
> What's the HTTP response?

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


Re: [users@httpd] Unstable PHP under Apache

Posted by Nick Kew <ni...@apache.org>.
On Sun, 2017-04-30 at 14:56 -0400, John Iliffe wrote:

I find your post confusing, so I may be barking up the
wrong tree.  But I see:

> Now Apache has started php-cgi, the parent process is one of the workers  
> The response to the browser is "No input file specified"
> 
> There are no errors shown in the Apache error log, nor in the php.log, nor 
> in the php-fpm.log.  

It looks as if you're looking in the wrong place.
It's all working fine as far as Apache is concerned:
PHP has accepted a request and produced a response.
Your problem lies in something PHP is doing.

Questions to consider:
Why the idiosyncratic install locations of httpd and php
in your filesystem?
What's the HTTP response?

-- 
Nick Kew


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