You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "@lbutlr" <kr...@kreme.com> on 2018/09/28 22:12:03 UTC
[users@httpd] Updating to php 7.0 and having apache still work?
Once again I have tried, and failed, to move from php 5.6 to php 7.0 (using postmaster under FreeBSD 11.3-RELEASE). The results are largely the same, php pages don’t load either "Primary script unknown” or complaints about filter(0 (which is built in to both php56 and php70).
I’m sure this is all my doing.
So… is there a decent document or how-to or step-by-step on how to updated the php under apache without everything in apache breaking?
(php itself works fine, it’s the integration with apache 2.24 that I keep managing to FUBAR. Currently on apache 2.4.35)
--
Otto: Apes don't read philosophy.
Wanda: Yes, they do Otto, they just don't understand it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by Filipe Cifali <ci...@gmail.com>.
Then you ARE using the current mod_proxy_fcgi and not the old one, it's
important to not confuse each when using / consulting docs, I suggest you
reading this:
https://wiki.apache.org/httpd/PHP-FPM
If you are truly using mod_proxy_fcgi then it's only PHP-FPM fault, not
httpd, you should not even touch httpd config for this change depending on
how your socked/daemon is configured. I recommend you to double check what
php-fpm is creating on start (what socket names / paths / ports) and double
check / compare running 5.6 and 7.0.
In fact, you can run both versions at the same time using different sockets
/ ports.
On Mon, Oct 1, 2018 at 5:07 PM @lbutlr <kr...@kreme.com> wrote:
> On 01 Oct 2018, at 13:49, Filipe Cifali <ci...@gmail.com> wrote:
> > This seems to be a problem inside mod_fcgi and not httpd, proxies in
> general don't care about what's the language behind it, as long as the
> protocol is being respected.
>
> Yes, that was my understanding as well, but even when I recompiled
> apache24 (which includes PROXY_FCGI) it still failed.
>
> > Are you sure you are not getting into trouble just because you are not
> using mod_proxy_fcgi instead?
>
> I am using
>
> LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
>
> > Anyway, I would recommend you to check what you are installing, maybe
> the binaries changed names or they are being installed with a suffix like
> php7-fpm, php7-bin, etc and the httpd config needs to be changed to reflect
> that accordingly.
>
> Php-fpm doesn’t have any version identification in the file name, unlike
> many php modules.
>
> --
> The very existence of flame-throwers proves that some time, somewhere,
> someone said to themselves, You know, I want to set those people over
> there on fire, but I'm just not close enough to get the job done.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
[ ]'s
Filipe Cifali Stangler
[users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by "@lbutlr" <kr...@kreme.com>.
On 01 Oct 2018, at 13:49, Filipe Cifali <ci...@gmail.com> wrote:
> This seems to be a problem inside mod_fcgi and not httpd, proxies in general don't care about what's the language behind it, as long as the protocol is being respected.
Yes, that was my understanding as well, but even when I recompiled apache24 (which includes PROXY_FCGI) it still failed.
> Are you sure you are not getting into trouble just because you are not using mod_proxy_fcgi instead?
I am using
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
> Anyway, I would recommend you to check what you are installing, maybe the binaries changed names or they are being installed with a suffix like php7-fpm, php7-bin, etc and the httpd config needs to be changed to reflect that accordingly.
Php-fpm doesn’t have any version identification in the file name, unlike many php modules.
--
The very existence of flame-throwers proves that some time, somewhere,
someone said to themselves, You know, I want to set those people over
there on fire, but I'm just not close enough to get the job done.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by Filipe Cifali <ci...@gmail.com>.
Hi Lewis,
This seems to be a problem inside mod_fcgi and not httpd, proxies in
general don't care about what's the language behind it, as long as the
protocol is being respected. Are you sure you are not getting into trouble
just because you are not using mod_proxy_fcgi instead?
Apache 2.4 docs on mod_fcgi point to www.fastcgi.com, which seems to be
offline ( http://www.isitdownrightnow.com/fastcgi.com.html ) and if I
recall properly, is a old module from php5.3?
Anyway, I would recommend you to check what you are installing, maybe the
binaries changed names or they are being installed with a suffix like
php7-fpm, php7-bin, etc and the httpd config needs to be changed to reflect
that accordingly.
On Mon, Oct 1, 2018 at 4:18 PM @lbutlr <kr...@kreme.com> wrote:
> On 30 Sep 2018, at 12:11, Jonathon Koyle <li...@gmail.com> wrote:
> > Simply to avoid assumptions, did you update php-fpm to 7 as well?
>
> php-fpm is built as part of the core php, it is not a separate package.
>
> # pkg info php56
> php56-5.6.38
> Name : php56
> Version : 5.6.38
> Installed on : Fri Sep 28 09:33:08 2018 MDT
> Origin : lang/php56
> Architecture : FreeBSD:11:i386
> Prefix : /usr/local
> Categories : devel lang www
> Licenses : PHP301
> Maintainer : ale@FreeBSD.org
> WWW : http://www.php.net/
> Comment : PHP Scripting Language
> Options :
> CGI : on
> CLI : on
> DEBUG : off
> DTRACE : off
> EMBED : on
> FPM : on
> IPV6 : on
> LINKTHR : on
> MAILHEAD : on
> PHPDBG : off
> ZTS : off
>
>
> --
> The new Death raised his cowl. There was no face there. There was not
> even a skull. Smoke curled formlessly between the robe and a golden
> crown. Bill Door raised himself on his elbows. A CROWN? His voice
> shook with rage. I NEVER WORE A CROWN! You never wanted to rule.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
[ ]'s
Filipe Cifali Stangler
[users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by "@lbutlr" <kr...@kreme.com>.
On 30 Sep 2018, at 12:11, Jonathon Koyle <li...@gmail.com> wrote:
> Simply to avoid assumptions, did you update php-fpm to 7 as well?
php-fpm is built as part of the core php, it is not a separate package.
# pkg info php56
php56-5.6.38
Name : php56
Version : 5.6.38
Installed on : Fri Sep 28 09:33:08 2018 MDT
Origin : lang/php56
Architecture : FreeBSD:11:i386
Prefix : /usr/local
Categories : devel lang www
Licenses : PHP301
Maintainer : ale@FreeBSD.org
WWW : http://www.php.net/
Comment : PHP Scripting Language
Options :
CGI : on
CLI : on
DEBUG : off
DTRACE : off
EMBED : on
FPM : on
IPV6 : on
LINKTHR : on
MAILHEAD : on
PHPDBG : off
ZTS : off
--
The new Death raised his cowl. There was no face there. There was not
even a skull. Smoke curled formlessly between the robe and a golden
crown. Bill Door raised himself on his elbows. A CROWN? His voice
shook with rage. I NEVER WORE A CROWN! You never wanted to rule.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by Jonathon Koyle <li...@gmail.com>.
Simply to avoid assumptions, did you update php-fpm to 7 as well?
On Sun, Sep 30, 2018, 11:01 @lbutlr <kr...@kreme.com> wrote:
> On 29 Sep 2018, at 21:02, Frank Gingras <th...@apache.org> wrote:
> > As for the "filter_var" error, you're missing a php extension/module.
>
> No, I'm not. filter is built in to php and is properly listed in php -m
>
>
> On 30 Sep 2018, at 03:43, Carmel NY <ca...@outlook.com> wrote:
> > Add the following to the "/etc/make.conf" file:
> >
> > DEFAULT_VERSIONS+=php=7.0
>
> Ah, I did not do that.
>
> > Seriously though, why not install 7.2 and be done with it.
>
> I don't really know the status of 7.2 and don't know it anything else will
> break. I did test my php stuff against 7.0 and all is fine.
>
> > Now install php 7.0 and "lang/php70-extensions". Be sure to configure it
> to
> > install the extensions you need. Install any ones from your list that
> are not
> > included in the package by hand. You will have to install the "mod_php70"
> > manually also.
> >
> > Now, restart apache24, or better yet, just do a reboot of your machine to
> > insure it all works correctly.
>
> I gave up on mod_php a couple of years ago when I went to apache 2.4.
> Apache 2.4 really seems to prefer fcgi with php-fpm. the initial
> configuration changes were a pain, but now it is all fine and php apps
> (like roundcube) are noticeably faster and the load not eh machine is ...
> well, nonexistent.
>
> I will give it another go and see where I get.
>
> Thanks all for the comments and suggestions.
>
> --
> Experience is something you don't get until just after you need it.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
[users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by "@lbutlr" <kr...@kreme.com>.
On 29 Sep 2018, at 21:02, Frank Gingras <th...@apache.org> wrote:
> As for the "filter_var" error, you're missing a php extension/module.
No, I'm not. filter is built in to php and is properly listed in php -m
On 30 Sep 2018, at 03:43, Carmel NY <ca...@outlook.com> wrote:
> Add the following to the "/etc/make.conf" file:
>
> DEFAULT_VERSIONS+=php=7.0
Ah, I did not do that.
> Seriously though, why not install 7.2 and be done with it.
I don't really know the status of 7.2 and don't know it anything else will break. I did test my php stuff against 7.0 and all is fine.
> Now install php 7.0 and "lang/php70-extensions". Be sure to configure it to
> install the extensions you need. Install any ones from your list that are not
> included in the package by hand. You will have to install the "mod_php70"
> manually also.
>
> Now, restart apache24, or better yet, just do a reboot of your machine to
> insure it all works correctly.
I gave up on mod_php a couple of years ago when I went to apache 2.4. Apache 2.4 really seems to prefer fcgi with php-fpm. the initial configuration changes were a pain, but now it is all fine and php apps (like roundcube) are noticeably faster and the load not eh machine is ... well, nonexistent.
I will give it another go and see where I get.
Thanks all for the comments and suggestions.
--
Experience is something you don't get until just after you need it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by Frank Gingras <th...@apache.org>.
As for the "filter_var" error, you're missing a php extension/module.
On Sat, Sep 29, 2018 at 10:57 PM Frank Gingras <th...@apache.org> wrote:
> "Primary Script Unknown" means that you're mapping to a non-existent
> resource on the fpm backend - remember that when using ProxyPassMatch, the
> request uri path is appended to the last path provided.
>
> On Sat, Sep 29, 2018 at 5:06 PM @lbutlr <kr...@kreme.com> wrote:
>
>> On 29 Sep 2018, at 05:59, Frank Gingras <th...@apache.org> wrote:
>> > "Everything breaks" isn't really a useful statement. Be more specific
>> if you want more precise feedback.
>>
>> I mentioned a couple of the issues in the original post, which are either
>> fcgi cannot find the scripts to run, or there is an error with filter.
>>
>> [proxy_fcgi:error] … AH01071: Got error 'Primary script unknown\n'
>> [proxy_fcgi:error] … AH01071: Got error 'PHP message: PHP Fatal error:
>> Call to undefined function filter_var()
>>
>> Though these are the most common issues in trying to upgrade, they are by
>> no means the only ones.
>>
>> But my post wasn’t about the specific errors, but more a request to see
>> if there was a “this is how you upgrade from php 5.6 to php 7.0” which
>> seems like it should just be a simple upgrade, but doesn’t seem to be, at
>> least interns of getting it to work with apache 2.4.
>>
>> 1. Upgrade php to 7.0
>> 2. restart php-fpm
>> 3. Stop and start apache
>>
>> Seems simple enough, but after step 3 php works fine, but apache doesn’t.
>>
>> Even if I go ahead and reinstall/upgreade apache 2.4, things are still
>> broken.
>>
>> Repeating the steps with php56 and everything is back to normal
>>
>>
>> --
>> Passion is the pill you can swallow forever Taking them one by one One
>> by One --Agents of Good Roots "Come On”
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
Re: [users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by Frank Gingras <th...@apache.org>.
"Primary Script Unknown" means that you're mapping to a non-existent
resource on the fpm backend - remember that when using ProxyPassMatch, the
request uri path is appended to the last path provided.
On Sat, Sep 29, 2018 at 5:06 PM @lbutlr <kr...@kreme.com> wrote:
> On 29 Sep 2018, at 05:59, Frank Gingras <th...@apache.org> wrote:
> > "Everything breaks" isn't really a useful statement. Be more specific if
> you want more precise feedback.
>
> I mentioned a couple of the issues in the original post, which are either
> fcgi cannot find the scripts to run, or there is an error with filter.
>
> [proxy_fcgi:error] … AH01071: Got error 'Primary script unknown\n'
> [proxy_fcgi:error] … AH01071: Got error 'PHP message: PHP Fatal error:
> Call to undefined function filter_var()
>
> Though these are the most common issues in trying to upgrade, they are by
> no means the only ones.
>
> But my post wasn’t about the specific errors, but more a request to see if
> there was a “this is how you upgrade from php 5.6 to php 7.0” which seems
> like it should just be a simple upgrade, but doesn’t seem to be, at least
> interns of getting it to work with apache 2.4.
>
> 1. Upgrade php to 7.0
> 2. restart php-fpm
> 3. Stop and start apache
>
> Seems simple enough, but after step 3 php works fine, but apache doesn’t.
>
> Even if I go ahead and reinstall/upgreade apache 2.4, things are still
> broken.
>
> Repeating the steps with php56 and everything is back to normal
>
>
> --
> Passion is the pill you can swallow forever Taking them one by one One
> by One --Agents of Good Roots "Come On”
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
[users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by "@lbutlr" <kr...@kreme.com>.
On 29 Sep 2018, at 05:59, Frank Gingras <th...@apache.org> wrote:
> "Everything breaks" isn't really a useful statement. Be more specific if you want more precise feedback.
I mentioned a couple of the issues in the original post, which are either fcgi cannot find the scripts to run, or there is an error with filter.
[proxy_fcgi:error] … AH01071: Got error 'Primary script unknown\n'
[proxy_fcgi:error] … AH01071: Got error 'PHP message: PHP Fatal error: Call to undefined function filter_var()
Though these are the most common issues in trying to upgrade, they are by no means the only ones.
But my post wasn’t about the specific errors, but more a request to see if there was a “this is how you upgrade from php 5.6 to php 7.0” which seems like it should just be a simple upgrade, but doesn’t seem to be, at least interns of getting it to work with apache 2.4.
1. Upgrade php to 7.0
2. restart php-fpm
3. Stop and start apache
Seems simple enough, but after step 3 php works fine, but apache doesn’t.
Even if I go ahead and reinstall/upgreade apache 2.4, things are still broken.
Repeating the steps with php56 and everything is back to normal
--
Passion is the pill you can swallow forever Taking them one by one One
by One --Agents of Good Roots "Come On”
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by Frank Gingras <th...@apache.org>.
"Everything breaks" isn't really a useful statement. Be more specific if
you want more precise feedback.
On Sat, Sep 29, 2018 at 7:37 AM @lbutlr <kr...@kreme.com> wrote:
> On 28 Sep 2018, at 16:15, Frank Gingras <th...@apache.org> wrote:
> > Consider the wiki article:
> >
> > http://wiki.apache.org/httpd/php
>
> That's not helpful.
>
> I already have proxy_fcgi working with php56. The issue is that everything
> breaks whenever I try to update to php70
>
>
> --
> The "H" in Jesus H Christ comes from "Harold be Thy name" in the Lord's
> Prayer.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
[users@httpd] Re: Updating to php 7.0 and having apache still work?
Posted by "@lbutlr" <kr...@kreme.com>.
On 28 Sep 2018, at 16:15, Frank Gingras <th...@apache.org> wrote:
> Consider the wiki article:
>
> http://wiki.apache.org/httpd/php
That's not helpful.
I already have proxy_fcgi working with php56. The issue is that everything breaks whenever I try to update to php70
--
The "H" in Jesus H Christ comes from "Harold be Thy name" in the Lord's
Prayer.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Updating to php 7.0 and having apache still work?
Posted by Frank Gingras <th...@apache.org>.
Consider the wiki article:
http://wiki.apache.org/httpd/php
On Fri, Sep 28, 2018 at 6:12 PM @lbutlr <kr...@kreme.com> wrote:
> Once again I have tried, and failed, to move from php 5.6 to php 7.0
> (using postmaster under FreeBSD 11.3-RELEASE). The results are largely the
> same, php pages don’t load either "Primary script unknown” or complaints
> about filter(0 (which is built in to both php56 and php70).
>
> I’m sure this is all my doing.
>
> So… is there a decent document or how-to or step-by-step on how to updated
> the php under apache without everything in apache breaking?
>
> (php itself works fine, it’s the integration with apache 2.24 that I keep
> managing to FUBAR. Currently on apache 2.4.35)
>
>
> --
> Otto: Apes don't read philosophy.
> Wanda: Yes, they do Otto, they just don't understand it.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Updating to php 7.0 and having apache still work?
Posted by Ruben Safir <mr...@panix.com>.
On 9/30/18 5:43 AM, Carmel NY wrote:
> I am running FreeBSD 11.2 p4 / amd64 with php72 install. I upgrade from php56
> as follows.
>
> First I got a list of all the php56 modules installed
>
> pkg info -r php56 > php56-modules.txt
You can't be sure that scripts that work on PHP65 will work on PHP7, but
this is a PHP problem, and while you might find some help here, you will
be better off talking the NYPHP or a PHP forum/usenet
Ruben
--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com
Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Updating to php 7.0 and having apache still work?
Posted by Carmel NY <ca...@outlook.com>.
On Fri, 28 Sep 2018 16:12:03 -0600, @lbutlr stated:
>Once again I have tried, and failed, to move from php 5.6 to php 7.0 (using
>postmaster under FreeBSD 11.3-RELEASE). The results are largely the same,
>php pages don’t load either "Primary script unknown” or complaints about
>filter(0 (which is built in to both php56 and php70).
>
>I’m sure this is all my doing.
>
>So… is there a decent document or how-to or step-by-step on how to updated
>the php under apache without everything in apache breaking?
>
>(php itself works fine, it’s the integration with apache 2.24 that I keep
>managing to FUBAR. Currently on apache 2.4.35)
I am running FreeBSD 11.2 p4 / amd64 with php72 install. I upgrade from php56
as follows.
First I got a list of all the php56 modules installed
pkg info -r php56 > php56-modules.txt
That probably will not list the "/www/mod_php56" module though.
Anyway, shut down anything using php if possible and then delete all of the
the php pots listed INCLUDING php itself.
Add the following to the "/etc/make.conf" file:
DEFAULT_VERSIONS+=php=7.0
Seriously though, why not install 7.2 and be done with it.
Now install php 7.0 and "lang/php70-extensions". Be sure to configure it to
install the extensions you need. Install any ones from your list that are not
included in the package by hand. You will have to install the "mod_php70"
manually also.
Now, restart apache24, or better yet, just do a reboot of your machine to
insure it all works correctly.
That worked for me and I updated to php72. Oh, I used poudriere to update,
although synth would probably work also. I never had any luck with
portmaster. You might be better off doing the update entirely manually.
HTH
--
Carmel