Mainos / Advertisement:

Php5

Kohteesta Taisto
Versio hetkellä 17. elokuuta 2015 kello 08.45 – tehnyt Frans (keskustelu | muokkaukset) (Ak: Uusi sivu: More information on PHP programming [http://php.net/ php.net] and tutorials [http://www.w3schools.com/php/default.aspm w3schools.com])
(ero) ← Vanhempi versio | Nykyinen versio (ero) | Uudempi versio → (ero)
Siirry navigaatioon Siirry hakuun
Muut kielet:
English • ‎suomi

PHP5 (PHP: Hypertext Preprocessor) is a server-side programming language. It can also be used for general programming, though.

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.

More information on PHP programming php.net and tutorials w3schools.com

Mainos / Advertisement: