MX on Linux: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
→‎Install PHP Hypertext Pre-processor: added location of batch php.ini
m (→‎Install PHP Hypertext Pre-processor: added location of batch php.ini)
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 which PHP version was installed, that was found out in last paragraph). YourYou ownmay .inineed to edit this file getsfor example to specify where your include files are stored at(if ''/usrnot in same folder as script with require/lib/php/7include).n/ Replace "apache2" by "cli" in the path for the batch php-production.ini''. file that you may also need to edit.
 
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.
5,838

edits

Navigation menu