On 10/09/2020, ExprmntAl <[email protected]> wrote:
> Tried your suggestion and still no go.  See below.
>
> *pi@raspberrypi:~ $ sudo apt-get install libapache2-mod-php*
> *Reading package lists... Done*
> *Building dependency tree*
> *Reading state information... Done*
> *libapache2-mod-php is already the newest version (2:7.3+69).*
> *The following packages were automatically installed and are no longer
> required:*
> *  libexiv2-14 libgfortran3 libgmime-2.6-0 libncurses5 libssl1.0.2
> rpi-eeprom-images*
> *Use 'sudo apt autoremove' to remove them.*
> *0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.*
> *pi@raspberrypi:~ $ sudo a2enmod php7.3*
> *Considering dependency mpm_prefork for php7.3:*
> *Considering conflict mpm_event for mpm_prefork:*
> *Considering conflict mpm_worker for mpm_prefork:*
> *Module mpm_prefork already enabled*
> *Considering conflict php5 for php7.3:*
> *Module php7.3 already enabled*
> *pi@raspberrypi:~ $ sudo systemctl restart apache2*
> *pi@raspberrypi:~ $                 *

Everything you have done above allows a php file to be executed by
your webserver and therefore the html content generated and displayed
in the browser that views it.

> This is how I am entering the address in Chromium on the RPi.
>
> file://www/html/weewx/weather34/index.php

That's never going to work.

When you use the file://  method of browser access you are accessing
the file via your filesystem. You are bypassing the php interpreter
that you installed on your webserver. The browser does not know what
to do with it, so it displays it (the php contents) Nothing gets
executed. Nothing has been converted to html.

You need to access that file via
http://your_web_server_with_php_enabled/weewx/weather34/index.php

> The address "file://www/html/weewx/index.html" seams to work fine for the
> seasons skin so I have been going off the assumption that a similar address

It's a html file, the browser knows what to do with html. It displays it.

> format to the php file should work as well but when I click enter, it just
> downloads the index.php file instead of opening it in the browser.

Yep, that's exactly what it will do - no interpreter is available. No
html is generated. Access it via your webserver and you will get the
html page it generates.

-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAAraAziEOyfWE3xByVhjgzA_xfw7ruxu1nvyAwd1OO1j06UokQ%40mail.gmail.com.

Reply via email to