Re: [users@httpd] Apache 2.4 and php
On Thu, Jul 7, 2022 at 1:06 PM Stormy-SDLU wrote: > > On 2022-07-06 21:34, Frank Gingras wrote: > > Paul, > > > > httpd does not call php includes, period. This is processed by php alone. > > Frank, thanks, perhaps my poor choice of words. I had this in mind: > > paul@sandbox:/etc/apache2/mods-enabled$ cat php7.4.load > # Conflicts: php5 > # Depends: mpm_prefork > LoadModule php7_module /usr/lib/apache2/modules/libphp7.4.so Don't you need something additional like SetHandler or SetOutputFilter/AddOutputFilterByType to tell this module to do anything against certain URLs? - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 and php
Does it work if you rename index.html to index.php ? On 2022-07-07 13:05, Stormy-SDLU wrote: > On 2022-07-06 21:34, Frank Gingras wrote: >> Paul, >> >> httpd does not call php includes, period. This is processed by php >> alone. > > Frank, thanks, perhaps my poor choice of words. I had this in mind: > > paul@sandbox:/etc/apache2/mods-enabled$ cat php7.4.load > # Conflicts: php5 > # Depends: mpm_prefork > LoadModule php7_module /usr/lib/apache2/modules/libphp7.4.so > > and see this as the "start" of processing the included text files: > > paul@sandbox:/www/testsolr$ cat index.html > > Test Solr > > // > > So, apologies for "call", but do you or others have a suggestion as to > why this works on one box, and not on a mirror image? > > Many thanks -- Paul -- David Copeland JSI Data Systems Limited 613-727-9353 www.jsidata.ca - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 and php
On 2022-07-06 21:34, Frank Gingras wrote: Paul, httpd does not call php includes, period. This is processed by php alone. Frank, thanks, perhaps my poor choice of words. I had this in mind: paul@sandbox:/etc/apache2/mods-enabled$ cat php7.4.load # Conflicts: php5 # Depends: mpm_prefork LoadModule php7_module /usr/lib/apache2/modules/libphp7.4.so and see this as the "start" of processing the included text files: paul@sandbox:/www/testsolr$ cat index.html Test Solr // So, apologies for "call", but do you or others have a suggestion as to why this works on one box, and not on a mirror image? Many thanks -- Paul On Wed, 6 Jul 2022 at 18:31, Paul wrote: On 2022-07-06 08:27, Frank Gingras wrote: First off, I would suggest not using prefork and mod_php, unless traffic is minimal and performance is not a concern. Nowadays, the scalable solution is to use php-fpm, and use a threaded mpm like event. Many thanks. Point well taken, on my "to do" list for a long time. My only excuse: the production server is very stable, rarely even approaches 10^6 hits a day, and whispers along quite nicely on 32 (64t) cores - uptime currently at 326 days. What I need to do is to use the sandbox (subject of this thread) to delve into Apache Solr. I am just astounded that a mirror copy is failing abjectly. Secondly, for your issue, you will need to look into the php logs as php is generating the response. There is absolutely nothing in the php logs -- I get the impression that the Apache back end is just not calling the php includes. The site itself was rsynced from production, everything else looks "forensically" identical. Maybe I'll just rebuild it again from scratch, as I may have made some sort of mistake somewhere, the order of installing the various elements, whatever... Again thanks -- Paul On Tue, 5 Jul 2022 at 16:24, Paul wrote: I'm going nowhere for what must be a small glitch. Ubuntu server 20.04LTS, Apache/2.4.41 (Ubuntu) using mpm_prefork behind Nginx proxy server. We use php 7.4 for many thousands of static pages that use e.g. giving us " , css, js, etc" sent to clients. Always reliable, production and backup machines delivering perfectly for many years. Just built a sandbox (to start looking at Apache Solr) as an exact replica of our production servers (but without letsencrypt), exact down to every file, version, release, permission, owner, dot and comma as far as I can see after hours of searching around. The sandbox is delivering "raw text" , not the content of the included file. Log files give no clue -- apache just "200" responses for the text and images, but obviously not the css, js, layout -- syslog, auth, nginx and php exactly the same as on the production servers. Suggestions, pointers, ideas would be warmly welcomed -- and save what's left of my sanity ;=} Many thanks, Paul - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 and php
Paul, You should respond to the list, so that other folks can benefit from the answers. Now, you embedded php code in .html files, which is a very bad idea, as you now have to use the php module to parse every single html file. I recommend that you not do that. On Wed, 6 Jul 2022 at 21:34, Frank Gingras wrote: > Paul, > > httpd does not call php includes, period. This is processed by php alone. > > On Wed, 6 Jul 2022 at 18:31, Paul wrote: > >> On 2022-07-06 08:27, Frank Gingras wrote: >> > First off, I would suggest not using prefork and mod_php, unless >> traffic is >> > minimal and performance is not a concern. Nowadays, the scalable >> solution >> > is to use php-fpm, and use a threaded mpm like event. >> >> Many thanks. Point well taken, on my "to do" list for a long time. My >> only excuse: the production server is very stable, rarely even >> approaches 10^6 hits a day, and whispers along quite nicely on 32 (64t) >> cores - uptime currently at 326 days. What I need to do is to use the >> sandbox (subject of this thread) to delve into Apache Solr. I am just >> astounded that a mirror copy is failing abjectly. >> > >> > Secondly, for your issue, you will need to look into the php logs as >> php is >> > generating the response. >> >> There is absolutely nothing in the php logs -- I get the impression that >> the Apache back end is just not calling the php includes. The site >> itself was rsynced from production, everything else looks "forensically" >> identical. Maybe I'll just rebuild it again from scratch, as I may have >> made some sort of mistake somewhere, the order of installing the various >> elements, whatever... >> >> Again thanks -- Paul >> > >> > On Tue, 5 Jul 2022 at 16:24, Paul wrote: >> > >> >> >> >> I'm going nowhere for what must be a small glitch. Ubuntu server >> >> 20.04LTS, Apache/2.4.41 (Ubuntu) using mpm_prefork behind Nginx proxy >> >> server. >> >> >> >> We use php 7.4 for many thousands of static pages that use e.g. > >> include 'inc/tophead.html';?> giving us " > >> lang="en"> , css, js, etc" sent to clients. Always reliable, >> >> production and backup machines delivering perfectly for many years. >> >> >> >> Just built a sandbox (to start looking at Apache Solr) as an exact >> >> replica of our production servers (but without letsencrypt), exact down >> >> to every file, version, release, permission, owner, dot and comma as >> far >> >> as I can see after hours of searching around. >> >> >> >> The sandbox is delivering "raw text" , >> >> not the content of the included file. Log files give no clue -- apache >> >> just "200" responses for the text and images, but obviously not >> >> the css, js, layout -- syslog, auth, nginx and php exactly the same as >> >> on the production servers. >> >> >> >> Suggestions, pointers, ideas would be warmly welcomed -- and save >> what's >> >> left of my sanity ;=} >> >> >> >> Many thanks, >> >> Paul >> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >> >> For additional commands, e-mail: users-h...@httpd.apache.org >> >> >> >> >> > >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >> For additional commands, e-mail: users-h...@httpd.apache.org >> >>
Re: [users@httpd] Apache 2.4 and php
Paul, httpd does not call php includes, period. This is processed by php alone. On Wed, 6 Jul 2022 at 18:31, Paul wrote: > On 2022-07-06 08:27, Frank Gingras wrote: > > First off, I would suggest not using prefork and mod_php, unless traffic > is > > minimal and performance is not a concern. Nowadays, the scalable solution > > is to use php-fpm, and use a threaded mpm like event. > > Many thanks. Point well taken, on my "to do" list for a long time. My > only excuse: the production server is very stable, rarely even > approaches 10^6 hits a day, and whispers along quite nicely on 32 (64t) > cores - uptime currently at 326 days. What I need to do is to use the > sandbox (subject of this thread) to delve into Apache Solr. I am just > astounded that a mirror copy is failing abjectly. > > > > Secondly, for your issue, you will need to look into the php logs as php > is > > generating the response. > > There is absolutely nothing in the php logs -- I get the impression that > the Apache back end is just not calling the php includes. The site > itself was rsynced from production, everything else looks "forensically" > identical. Maybe I'll just rebuild it again from scratch, as I may have > made some sort of mistake somewhere, the order of installing the various > elements, whatever... > > Again thanks -- Paul > > > > On Tue, 5 Jul 2022 at 16:24, Paul wrote: > > > >> > >> I'm going nowhere for what must be a small glitch. Ubuntu server > >> 20.04LTS, Apache/2.4.41 (Ubuntu) using mpm_prefork behind Nginx proxy > >> server. > >> > >> We use php 7.4 for many thousands of static pages that use e.g. >> include 'inc/tophead.html';?> giving us " >> lang="en"> , css, js, etc" sent to clients. Always reliable, > >> production and backup machines delivering perfectly for many years. > >> > >> Just built a sandbox (to start looking at Apache Solr) as an exact > >> replica of our production servers (but without letsencrypt), exact down > >> to every file, version, release, permission, owner, dot and comma as far > >> as I can see after hours of searching around. > >> > >> The sandbox is delivering "raw text" , > >> not the content of the included file. Log files give no clue -- apache > >> just "200" responses for the text and images, but obviously not > >> the css, js, layout -- syslog, auth, nginx and php exactly the same as > >> on the production servers. > >> > >> Suggestions, pointers, ideas would be warmly welcomed -- and save what's > >> left of my sanity ;=} > >> > >> Many thanks, > >> Paul > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > >> For additional commands, e-mail: users-h...@httpd.apache.org > >> > >> > > > > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >
Re: [users@httpd] Apache 2.4 and php
On 2022-07-06 08:27, Frank Gingras wrote: First off, I would suggest not using prefork and mod_php, unless traffic is minimal and performance is not a concern. Nowadays, the scalable solution is to use php-fpm, and use a threaded mpm like event. Many thanks. Point well taken, on my "to do" list for a long time. My only excuse: the production server is very stable, rarely even approaches 10^6 hits a day, and whispers along quite nicely on 32 (64t) cores - uptime currently at 326 days. What I need to do is to use the sandbox (subject of this thread) to delve into Apache Solr. I am just astounded that a mirror copy is failing abjectly. Secondly, for your issue, you will need to look into the php logs as php is generating the response. There is absolutely nothing in the php logs -- I get the impression that the Apache back end is just not calling the php includes. The site itself was rsynced from production, everything else looks "forensically" identical. Maybe I'll just rebuild it again from scratch, as I may have made some sort of mistake somewhere, the order of installing the various elements, whatever... Again thanks -- Paul On Tue, 5 Jul 2022 at 16:24, Paul wrote: I'm going nowhere for what must be a small glitch. Ubuntu server 20.04LTS, Apache/2.4.41 (Ubuntu) using mpm_prefork behind Nginx proxy server. We use php 7.4 for many thousands of static pages that use e.g. giving us " , css, js, etc" sent to clients. Always reliable, production and backup machines delivering perfectly for many years. Just built a sandbox (to start looking at Apache Solr) as an exact replica of our production servers (but without letsencrypt), exact down to every file, version, release, permission, owner, dot and comma as far as I can see after hours of searching around. The sandbox is delivering "raw text" , not the content of the included file. Log files give no clue -- apache just "200" responses for the text and images, but obviously not the css, js, layout -- syslog, auth, nginx and php exactly the same as on the production servers. Suggestions, pointers, ideas would be warmly welcomed -- and save what's left of my sanity ;=} Many thanks, Paul - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 and php
First off, I would suggest not using prefork and mod_php, unless traffic is minimal and performance is not a concern. Nowadays, the scalable solution is to use php-fpm, and use a threaded mpm like event. Secondly, for your issue, you will need to look into the php logs as php is generating the response. On Tue, 5 Jul 2022 at 16:24, Paul wrote: > > I'm going nowhere for what must be a small glitch. Ubuntu server > 20.04LTS, Apache/2.4.41 (Ubuntu) using mpm_prefork behind Nginx proxy > server. > > We use php 7.4 for many thousands of static pages that use e.g. include 'inc/tophead.html';?> giving us " lang="en"> , css, js, etc" sent to clients. Always reliable, > production and backup machines delivering perfectly for many years. > > Just built a sandbox (to start looking at Apache Solr) as an exact > replica of our production servers (but without letsencrypt), exact down > to every file, version, release, permission, owner, dot and comma as far > as I can see after hours of searching around. > > The sandbox is delivering "raw text" , > not the content of the included file. Log files give no clue -- apache > just "200" responses for the text and images, but obviously not > the css, js, layout -- syslog, auth, nginx and php exactly the same as > on the production servers. > > Suggestions, pointers, ideas would be warmly welcomed -- and save what's > left of my sanity ;=} > > Many thanks, > Paul > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >
[users@httpd] Apache 2.4 and php
I'm going nowhere for what must be a small glitch. Ubuntu server 20.04LTS, Apache/2.4.41 (Ubuntu) using mpm_prefork behind Nginx proxy server. We use php 7.4 for many thousands of static pages that use e.g. include 'inc/tophead.html';?> giving us " lang="en"> , css, js, etc" sent to clients. Always reliable, production and backup machines delivering perfectly for many years. Just built a sandbox (to start looking at Apache Solr) as an exact replica of our production servers (but without letsencrypt), exact down to every file, version, release, permission, owner, dot and comma as far as I can see after hours of searching around. The sandbox is delivering "raw text" , not the content of the included file. Log files give no clue -- apache just "200" responses for the text and images, but obviously not the css, js, layout -- syslog, auth, nginx and php exactly the same as on the production servers. Suggestions, pointers, ideas would be warmly welcomed -- and save what's left of my sanity ;=} Many thanks, Paul - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] apache 2.4 and php on Freebsd
Is anyone running Apache 2.4 and mod_php (either 5.6 or 7.0)? Despite many times building out of ports or manually, I cannot get apache to launch successfully with php enabled. Is there something else I can do to get php working? I can get apache to load with mod_php56, but loading php pages results in filter_var errors despite filter being definitely installed. # php -m | grep filter filter -- Apple broke AppleScripting signatures in Mail.app, so no random signatures. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 with PHP-FPM
If you can distinguish which url's need to use rewrite, and which do not, then extend the rewrite to only change the right ones. But I suspect that this is not possible, so you need some other way to identify which use each rule. Sent from my android device so quoting is crap ... need to kill these painful email clients!
Re: [users@httpd] Apache 2.4 with PHP-FPM
I said two websites for sake of simplicity. There are more than 30 websites and there is only one template for creating virtual host. So, i can't use two methods. it has to be one that works for both situations. I don't have any problem with compiling the source or even editing the source code, as long as it gets the job done. On 8/29/16 17:20, les...@lsces.co.uk wrote: You will need to create two virtual hosts. Otherwise apache does not know whi h rules to apply. vh1/... with direct access and vh2/... with the redirect. Then your sites are just prefixed by vh1 or 2 Sent from my android device so quoting is crap ... need to kill these painful email clients! -Original Message- From: khodadadeh <khodada...@hotmail.com> To: users@httpd.apache.org Sent: Mon, 29 Aug 2016 13:18 Subject: [users@httpd] Apache 2.4 with PHP-FPM I have installed PHP-FPM 5.6 and Apache 2.4 with mod_proxy and mod_proxy_fcgi. I have two web sites on my server. One Magento and the other one that is written using Laravel framework. Magento has URLs like: http://domain.com/index.php/ACP/ index.php exists in document root. Laravel has URLs like: http://example.com/help.php help.php does NOT exist in document root. It will be rewritten to index.php (using mod_rewrite). Currently I have this directive to connect to my PHP installation: ProxyPassMatch "^/(.*.php(/.*)?)$" "unix:/var/run/php-fpm/php5-username.sock|fcgi://localhost/home/username/public_html" This works fine for Magento but when I browse Laravel URL(a non-existing URL with .php in it), it shows me "File not found" message. If I switch to mod_rewrite instead of mod_proxy_fcgi, I'll have laravel URl working but not Magento: RewriteCond %{REQUEST_URI} "^/(.*.php(/.*)?)$" RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -f RewriteRule ^(.*)$ "unix:/var/run/php-fpm/php5-username.sock|fcgi://localhost/home/username/public_html/$1" [P] Is there any solution that I can use that ensures rewrite rules will be working and PATH_INFO is set? - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 with PHP-FPM
You will need to create two virtual hosts. Otherwise apache does not know whi h rules to apply. vh1/... with direct access and vh2/... with the redirect. Then your sites are just prefixed by vh1 or 2 Sent from my android device so quoting is crap ... need to kill these painful email clients! -Original Message- From: khodadadeh <khodada...@hotmail.com> To: users@httpd.apache.org Sent: Mon, 29 Aug 2016 13:18 Subject: [users@httpd] Apache 2.4 with PHP-FPM I have installed PHP-FPM 5.6 and Apache 2.4 with mod_proxy and mod_proxy_fcgi. I have two web sites on my server. One Magento and the other one that is written using Laravel framework. Magento has URLs like: http://domain.com/index.php/ACP/ index.php exists in document root. Laravel has URLs like: http://example.com/help.php help.php does NOT exist in document root. It will be rewritten to index.php (using mod_rewrite). Currently I have this directive to connect to my PHP installation: ProxyPassMatch "^/(.*.php(/.*)?)$" "unix:/var/run/php-fpm/php5-username.sock|fcgi://localhost/home/username/public_html" This works fine for Magento but when I browse Laravel URL(a non-existing URL with .php in it), it shows me "File not found" message. If I switch to mod_rewrite instead of mod_proxy_fcgi, I'll have laravel URl working but not Magento: RewriteCond %{REQUEST_URI} "^/(.*.php(/.*)?)$" RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -f RewriteRule ^(.*)$ "unix:/var/run/php-fpm/php5-username.sock|fcgi://localhost/home/username/public_html/$1" [P] Is there any solution that I can use that ensures rewrite rules will be working and PATH_INFO is set? - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Apache 2.4 with PHP-FPM
I have installed PHP-FPM 5.6 and Apache 2.4 with mod_proxy and mod_proxy_fcgi. I have two web sites on my server. One Magento and the other one that is written using Laravel framework. Magento has URLs like: http://domain.com/index.php/ACP/ index.php exists in document root. Laravel has URLs like: http://example.com/help.php help.php does NOT exist in document root. It will be rewritten to index.php (using mod_rewrite). Currently I have this directive to connect to my PHP installation: ProxyPassMatch "^/(.*.php(/.*)?)$" "unix:/var/run/php-fpm/php5-username.sock|fcgi://localhost/home/username/public_html" This works fine for Magento but when I browse Laravel URL(a non-existing URL with .php in it), it shows me "File not found" message. If I switch to mod_rewrite instead of mod_proxy_fcgi, I'll have laravel URl working but not Magento: RewriteCond %{REQUEST_URI} "^/(.*.php(/.*)?)$" RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -f RewriteRule ^(.*)$ "unix:/var/run/php-fpm/php5-username.sock|fcgi://localhost/home/username/public_html/$1" [P] Is there any solution that I can use that ensures rewrite rules will be working and PATH_INFO is set? - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org