Big Sur Webserver PHP not exxecuting

87
April 25, 2021, at 06:00 AM

I have a mini Mac and have just updated to Big Sur (is that pronounced Big Sewer?)

The local webserver works

sudo apachectl -t gives Syntax OK

Path to httpd.conf is /usr/local/etc/apache2/2.4

I changed DocumentRoot successfully here. (There is another httpd.confg but it doesn't change the DocumentRoot.)

Php7 is installed php -v gives PHP 7.3.24 Zend Engine v3.3.24

Command line PHP works and displays data from MySQL database correctly.

I have a home.php page. The HTML part displays correctly. The php section is ignored. If I check the Source Code in my browser it includes the PHP section.

When I first started to get this working, my browser wanted to download home.php so I'm part way there.

I tried to follow : https://wpbeaches.com/install-apache-mysql-php-on-macos-11-big-sur-and-earlier-macos/

Things I have changed:

/usr/local/etc/apache2/2.4/httpd.conf

    Changed path in 
    DocumentRoot "/Users/Alison/Sites"
    <Directory "/Users/Alison/Sites">
    Removed # from
    Include /usr/local/etc/apache2/2.4/extra/httpd-userdir.conf
    LoadModule php7_module /usr/libexec/apache2/libphp7.so has no #
    <IfModule php7>
    Include /private/etc/apache2/other/php7.conf
    </IfModule>

/private/etc/apache2/apache2.conf

     Added 
     <IfModule php7>
     Include /private/etc/apache2/other/php7.conf
     </IfModule>

     <FilesMatch \.phph$>
     SetHandler application/x-httpd-php
     </FilesMatch>
 
 

Things I can't do

        sudo service apache2 restart
            Sudo: service: command not found
            
        sudo a2dismod mpm_event 
            Sudo: a2dismod: command not found
            
        sudo a2enmod mpm_event  
            Sudo: a2enmod: command not found

because Big Sur dosen't have a2dismod, a2enmod or service.

READ ALSO
Como implementar los m&#233;todos de ordenaci&#243;n y b&#250;squeda (Quicksort, Radixsort etc) en una base de datos mysql [closed]

Como implementar los métodos de ordenación y búsqueda (Quicksort, Radixsort etc) en una base de datos mysql [closed]

Want to improve this question? Add details and clarify the problem by editing this post

110
Show uploading file name and size for every dynamically created input field. jQuery

Show uploading file name and size for every dynamically created input field. jQuery

Uploading file inputs are created dynamicallyWhen I upload a file, information about a file (file name and size ) show only for the first uploading input field

85
Adjust space between chevron and slide using slickR

Adjust space between chevron and slide using slickR

I am using Rmarkdown and slickR to create a carousel of imagesHow do I adjust the space between the left chevron and the left edge of the slide?

100