Mainos / Advertisement:

Ero sivun ”Php5/en” versioiden välillä

Kohteesta Taisto
Siirry navigaatioon Siirry hakuun
(Ak: Uusi sivu: PHP5 (PHP: Hypertext Preprocessor) is a server-side programming language. It can also be used for general programming, though.)
(Ak: Uusi sivu: More information on PHP programming [http://php.net/ php.net] and tutorials [http://www.w3schools.com/php/default.aspm w3schools.com])
 
(12 välissä olevaa versiota samalta käyttäjältä ei näytetä)
Rivi 3: Rivi 3:
 
PHP5 (PHP: Hypertext Preprocessor) is a server-side programming language. It can also be used for general programming, though.  
 
PHP5 (PHP: Hypertext Preprocessor) is a server-side programming language. It can also be used for general programming, though.  
  
== Asennus ==
+
== Installation ==
  
 
=== Debian / Ubuntu ===
 
=== Debian / Ubuntu ===
  
Asenna PHP5 Apacheen:
+
Install PHP5 to Apache:
  
 
   [[aptitude]] install php5
 
   [[aptitude]] install php5
  
Asenna PHP5 Nginx:
+
Install PHP5 Nginx:
  
 
   [[apt-get]] install php5-fpm
 
   [[apt-get]] install php5-fpm
Rivi 17: Rivi 17:
 
=== Red Hat / CentOS / Fedora ===
 
=== Red Hat / CentOS / Fedora ===
  
Asenna PHP CentOS
+
Install PHP CentOS
  
 
  yum install php
 
  yum install php
  
Käynnistä Apache2 uudelleen
+
Restart apache2
  
 
   /etc/init.d/httpd restart
 
   /etc/init.d/httpd restart
Rivi 27: Rivi 27:
  
  
Lisäohjeita CentOS: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
+
More instructions for CentOS https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
  
== Konfigurointi ==
+
== Configuration ==
  
PHP5 konfigurointitiedosto on polussa (Apache):
+
PHP5 configuration file is under the path (Apache):
  
 
   /etc/php5/php.ini
 
   /etc/php5/php.ini
  
PHP5 konfigurointitiedosto on polussa (Nginx):
+
PHP5 configuration file is under the path (Nginx):
  
 
   nano /etc/php5/fpm/php.ini
 
   nano /etc/php5/fpm/php.ini
  
  
PHP5 toimivuus voi testata luomalla /var/www/index.php tiedosto ja laittamalla sinne seuraava koodipätkä:
+
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
 
   <?php
   echo "PHP5 toimii"
+
   echo "PHP5 works"
 
   ?>
 
   ?>
  
Tämän jälkeen muodosta yhteys palvelimeen ja mene osoitteeseen palvelimen_ip-osoite/index.php (esim. 10.10.10.10/index.php). Jos teksti "PHP5 toimii" näkyy, sivusto toimii.
+
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 [http://php.net/ php.net] ja tutoriaaleja [http://www.w3schools.com/php/default.aspm w3schools.com]
+
More information on PHP programming [http://php.net/ php.net] and tutorials [http://www.w3schools.com/php/default.aspm w3schools.com]

Nykyinen versio 17. elokuuta 2015 kello 08.45

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: