RE: Unstable PHP under Apache

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

 



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@xxxxxxxxx] 
Sent: Tuesday, May 02, 2017 7:25 AM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  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@xxxxxxxxx]
> Sent: Monday, May 01, 2017 7:53 PM
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re:  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@xxxxxxxxx>
> > > > 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@xxxxxxxxxxxxxxxx
> > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

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


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




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux