5,838
edits
m (→Miscellaneous) |
|||
== Install PHP Hypertext Pre-processor ==
PHP is not the only script language available, but it is quite comprehensive being able to be used either in a fairly simple way or in an object-oriented way for those trying to achieve more complex scripts. The instruction to install it is <tt>sudo apt install php -y</tt>, which version you get depends on your Pi and its operating system. To check which modules have been installed type <tt>php -m</tt>. For PhpMyAdmin your php modules loaded (they are also listed in the .ini file, where unwanted ones can be commented out), must include at least mysqli and mbstring, I will say how to find the .ini files later.
Alternatively, you can install <tt>sudo apt install</tt> particular php
You may wish to create a index.php web page at /var/www/html which is the web server root for browsing, or of course you may wish to copy or FTP here all your existing web pages. To view a php web page, go into a browser and type in a url with the same IPv4 address as you use for the admin interface, omit the port (:8998) and instead type in your web page name (e.g. http://192.168.1.'''xy'''/index.php, where you need to determine digits that replace '''xy''').
The main php.ini is found at /etc/php/7.n/apache2/php.ini (where 'n' depends on your Raspberry OS version and therefore what PHP version gets installed). Your own .ini file gets stored at /usr/lib/php/7.n/php-production.ini. For PhpMyAdmin your php modules loaded in the .ini file need to include at least mysqli and mbstring.▼
To test that php is installed, type <tt>php -v</tt> into terminal, and you will see the exact version that has been installed, a confirmation that it offers command line interface (cli), and a copyright notice.
▲The main '''php.ini''' is found at ''/etc/php/7.n/apache2/php.ini'' (where 'n' depends on your Raspberry OS version and therefore
To run a php script in batch, type <tt>php - f <file_name></tt>. You can redirect the output by adding a greater than symbol and the destination file (i.e. > log_file) on the same terminal line.
== Install Maria database ==
|
edits