httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Iliffe <john.ili...@iliffe.ca>
Subject Re: [users@httpd] Unstable PHP under Apache
Date Tue, 02 May 2017 17:31:46 GMT
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 <john.iliffe@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


Mime
View raw message