Php5
PHP5 (PHP: Hypertext Preprocessor) is a server-side programming language. It can also be used for general programming, though.
Sisällysluettelo
Installation
Debian / Ubuntu
Install PHP5 to Apache:
aptitude install php5
Install PHP5 Nginx:
apt-get install php5-fpm
Red Hat / CentOS / Fedora
Install PHP CentOS
yum install php
Restart apache2
/etc/init.d/httpd restart
More instructions for CentOS https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
Configuration
PHP5 configuration file is under the path (Apache):
/etc/php5/php.ini
PHP5 configuration file is under the path (Nginx):
nano /etc/php5/fpm/php.ini
You can test the functionality of fphp5 by creating the /var/www/index.php file and putting the following snippet of code in it:
<?php echo "PHP5 works" ?>
After this connect to the server and go to the address server_ip-address/index.php (for example, 10.10.10.10/index.php). If you see the text "PHP5 works" then everything works as they're meant to.
Lisätietoa PHP ohjelmoinnista php.net ja tutoriaaleja w3schools.com