PHP

移動先: 案内, 検索
このページは現在翻訳中です。どなたか原文と比較し、加筆、修正をお願いします。

PHP
php-logo.gif
Server Side scripting language
開発元: PHP Group
パッケージ情報 (pin)

Download for openSUSE:

ライセンス: PHP License
Web サイト: http://www.php.net/

PHPは、デンマークのRasmus Lerdorfのグリーンランド人によって1995年に開発されたハイパーテキスト・サーバー・サイド・プログラミング言語です。PHPグループは現在、形式的な基準がなく、PHPソフトウェアの信頼された開発者とディストリビュータであると考えられています。[1] openSUSEシステムのPHPインストールの方法は主に2つあります:PHPパッケージだけをインストールします。 または、Apache, MySQL, Perl, PythonはLAMPパッケージにあります。両方の方法は以下で説明されています。PHPの歴史に関する詳しい情報とスクリプト言語における更なるサポートに関しては、以下のリンクを見て下さい。

リソース、例えばオンラインバージョンとPHPマニュアルのダウンロード可能な版は、PHPグループウェブサイトで見つかることもできます。PHPマニュアルの詳細については、このページの下部で見つかるPHPマニュアルセクションを参照してください。


インストール


イントロダクションセクションで説明されているように、PHPをインストールする2つの主要な方法は単独インストールとLAMPパッケージのインストールがあります。PHPの単独インストールは少量のスペースを必要とします。あなたが公共または個人的なサーバに変えるのであれば、LAMPのパターンは最良の方法になるでしょう。それは、個人の好みで選択できます。したがって、両方の方法は下記で説明しています。


PHPの単独インストール

中心的なPHPパッケージをインストールするために、最初に、我々はPHPリポジトリをYaST/Zypperに加える必要があります。これを行うためには、Yastを開きあなたのrootパスワードを入力してください。数秒のローディング後に、新しいウィンドウが現れます。左のカラムからソフトウェアをクリックし、右カラムに表示されたソフトウェアリポジトリをクリックして下さい。リポジトリが更新されるのを待って下さい。そうすると、現在利用しているリポジトリが表示されます。ウィンドウの下部にある追加をクリックし、URLの指定を選択し、下記にあるURLの中であなたのopenSUSEバージョンと一致するURLとリポジトリ(リポジトリ名の種別は必須ではなく、リポジトリ自体を区別できるようにするものです)を入力し、それを加えた後に、リポジトリ一覧はリフレッシュされます。次に、ソフトウェアリポジトリを閉じることができます。

Version:
11.0
http://download.opensuse.org/repositories/server:/php/server_apache_openSUSE_11.0/
Version:
10.3
http://download.opensuse.org/repositories/server:/php/server_apache_openSUSE_10.3/


一度リポジトリが加えられたら、YaSTパッケージ・マネージャ(それはソフトウェア管理の下のソフトウェアで見つけられます)を開いてください。一旦リポジトリが更新され、パッケージ管理がロードすれば、サーチフィールドphp5に入ります(php5が現在の安定したリリースバージョンです。安定したバージョンリストはイントロダクション・セクションの中で上にリンクしたPHPグループ・ウェブサイトの左上に見つけることが出来ます)。より新しい安定したリリースが利用可能な場合は、そのバージョンを使用してください。サーチした用語を含むパッケージのリストが表示されます。次のパッケージを選択して、インストールボタンをクリックして下さい。

  • php5

This package is the core package for version 5 of PHP. You can also the extension packages for php5. These are denoted with a dash and the name of the extension (php5-*). While there are many of these packages, they can be useful. Weather you choose to install them is completely up to you. Once you have finished selecting packages for installation, press the Apply to install the packages. The time for this process many vary on how many packages have been selected for installation.


Together with LAMP

For those who are unfamiliar with web-based servers, LAMP is an acronym for Linux Apache MySQL and PHP (Perl and Python are commonly included as well). This is one of the most popular setups for public web-based or web-hosting servers. Because PHP is included in this, it is a viable method, and with all the other components of a web server included, a suggested way of installing a usable version of PHP. To install Lamp on your OpenSUSE system (based on an 11.0 installation, so lower versions may require adjustments to the process), simply follow the steps below:

  • Open YaST Package Manager and enter root password
  • Wait for repositories to refresh
  • Click the dropdown menu labeled Groups
  • Select Patterns instead
  • Scroll down in the left column to the heading: Server Functions
  • Select the pattern: Web and LAMP Server
  • Press the button: Install All
  • Press the Apply button to install the packages

This will install all the required files and packages to run a Web and LAMP server, including PHP. For more information on how to configure Apache and the LAMP server as a whole, please visit the pages linked below. This will make the process of configuring and running a LAMP server much easier and smoother.

For the most current packages, add the following repositories...

OpenSUSE 11.0 Repositories

Version:
Apache
http://download.opensuse.org/repositories/Apache/openSUSE_11.0
Version:
Database
http://download.opensuse.org/repositories/server:/database/openSUSE_11.0
Version:
PHP
http://download.opensuse.org/repositories/server:/php/server_database_apache_openSUSE_11.0


OpenSUSE 10.3 Repositories

Version:
Apache
http://download.opensuse.org/repositories/Apache/openSUSE_10.3
Version:
Database
http://download.opensuse.org/repositories/server:/database/openSUSE_10.3
Version:
PHP
http://download.opensuse.org/repositories/server:/php/server_database_apache_openSUSE_10.3


While installing the LAMP server packages without the repositories above will provide a recent version of the server, if the server is being used to host a website, weather private or public, it is a good idea to have the most recent version of the packages. Adding these repositories will also make updating the server much easier.


PHP Manaual


A great tool provided by the PHP Group is the PHP Manual. This manual provides useful information on the syntaxes, functions, commands and many more important PHP topics. There is an online version of the Manual found on the PHP website (link found below), but the CHM file can be more intuitive. This CHM file allows you to search for individual syntaxes and PHP commands, rather than searching through the table of contents to find what you are looking for. This CHM file requires a CHM reader to view. There are two CHM programs that can be used: KchmViewer (KDE) and Chmsee (Gnome). Do to the indexing function of KchmViewer, it can prove to be a better searcher for syntaxes. Both 1-click installers can be found below:

KchmViewer:

Version:
11.0
http://software.opensuse.org/ymp/openSUSE:11.0/standard/kchmviewer.ymp
Version:
10.3
http://software.opensuse.org/ymp/openSUSE:10.3/standard/kchmviewer.ymp


Chmsee:

Version:
11.0
http://software.opensuse.org/ymp/openSUSE:11.0/standard/chmsee.ymp
Version:
10.3
http://software.opensuse.org/ymp/openSUSE:10.3/standard/chmsee.ymp


Once you have installed one of the CHM viewers, download the the CHM file for PHP Manual (link provided below: select a mirror from the list provided). Due to the fact that KchmViewer is more intuitive, the following steps are explained using this KDE program. When you open KchmViewer, it will prompt you to select a CHM file: open the location of where you saved the PHP Manual CHM file to, and select the file. Select the Index tab on the top left of the KchmViewer window. Now you can search individual syntaxes and functions of PHP. This can be invaluable when learning PHP or working with both simple and complex PHP scripts.


References