|
110.
|
|
|
This section assumes you have installed and configured Apache2 Web Server and MySQL Database Server. You can refer to the Apache2 and MySQL sections in this document to install and configure Apache2 and MySQL respectively.
|
|
|
|
Cette section présuppose que vous ayez installé et configuré le serveur Web Apache2 ainsi que la base de données MySQL. Vous pouvez vous référer aux sections Apache2 et MySQL de ce document pour installer et configurer ceux-ci.
|
|
Translated and reviewed by
Nicolas Delvaux
|
|
|
|
Located in
serverguide/C/web-servers.xml:704(para)
|
|
111.
|
|
|
PHP is available in Ubuntu Linux. Unlike python and perl, which are installed in the base system, PHP must be added.
|
|
|
|
PHP est disponible pour Ubuntu Linux. Contrairement à Python et Perl, qui sont installés avec le système de base, PHP doit être ajouté.
|
|
Translated and reviewed by
Nicolas Delvaux
|
|
|
|
Located in
serverguide/C/web-servers.xml:711(para)
|
|
112.
|
|
|
To install PHP and the Apache PHP module you can enter the following command at a terminal prompt: <screen> ![](/@@/translation-newline)
<command>sudo apt install php libapache2-mod-php</command> ![](/@@/translation-newline)
</screen>
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
Pour installer PHP et le module Apache PHP, vous pouvez saisir la commande suivante à l'invite d'un terminal [nbsp] : <screen> ![](/@@/translation-newline)
<command>sudo apt install php libapache2-mod-php</command> ![](/@@/translation-newline)
</screen>
|
|
Translated by
Pascal Baudry
|
|
Reviewed by
Nicolas Delvaux
|
|
|
|
Located in
serverguide/C/web-servers.xml:715(para)
|
|
113.
|
|
|
You can run PHP scripts at a terminal prompt. To run PHP scripts at a terminal prompt you should install the <application>php-cli</application> package. To install <application>php-cli</application> you can enter the following command at a terminal prompt: <screen> ![](/@@/translation-newline)
<command>sudo apt install php-cli</command> ![](/@@/translation-newline)
</screen>
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:724(para)
|
|
114.
|
|
|
You can also execute PHP scripts without installing the Apache PHP module. To accomplish this, you should install the <application>php-cgi</application> package. You can run the following command at a terminal prompt to install the <application>php-cgi</application> package: <screen> ![](/@@/translation-newline)
<command>sudo apt install php-cgi</command> ![](/@@/translation-newline)
</screen>
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:733(para)
|
|
115.
|
|
|
To use <application>MySQL</application> with PHP you should install the <application>php-mysql</application> package. To install <application>php-mysql</application> you can enter the following command at a terminal prompt: <screen> ![](/@@/translation-newline)
<command>sudo apt install php-mysql</command> ![](/@@/translation-newline)
</screen>
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:743(para)
|
|
116.
|
|
|
Similarly, to use <application>PostgreSQL</application> with PHP you should install the <application>php-pgsql</application> package. To install <application>php-pgsql</application> you can enter the following command at a terminal prompt: <screen> ![](/@@/translation-newline)
<command>sudo apt install php-pgsql</command> ![](/@@/translation-newline)
</screen>
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
De la même manière, pour utiliser <application>PostgreSQL</application> avec PHP, vous devez installer le paquet <application>php-pgsql</application>. Pour ce faire, vous pouvez saisir la commande suivante à l'invite d'un terminal [nbsp] : <screen> ![](/@@/translation-newline)
<command>sudo apt install php-pgsql</command> ![](/@@/translation-newline)
</screen>
|
|
Translated and reviewed by
Nicolas Delvaux
|
|
|
|
Located in
serverguide/C/web-servers.xml:751(para)
|
|
117.
|
|
|
If you have installed the <application>libapache2-mod-php</application> or <application>php-cgi</application> packages, you can run PHP scripts from your web browser. If you have installed the <application>php-cli</application> package, you can run PHP scripts at a terminal prompt.
|
|
|
|
Si vous avez installé les paquets <application>libapache2-mod-php</application> ou <application>php-cgi</application>, vous pouvez lancer des scripts PHP depuis votre navigateur internet. Si vous avez installé le paquet <application>php-cli</application>, vous pouvez lancer des scripts PHP à l'invite d'un terminal.
|
|
Translated by
Pascal Maugendre
|
|
Reviewed by
Nicolas Delvaux
|
|
|
|
Located in
serverguide/C/web-servers.xml:764(para)
|
|
118.
|
|
|
By default, when <application>libapache2-mod-php</application> is installed, the Apache 2 Web server is configured to run PHP scripts. In other words, the PHP module is enabled in the Apache Web server when you install the module. Please verify if the files <filename>/etc/apache2/mods-enabled/php7.0.conf</filename> and <filename>/etc/apache2/mods-enabled/php7.0.load</filename> exist. If they do not exist, you can enable the module using the <command>a2enmod</command> command.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:773(para)
|
|
119.
|
|
|
Once you have installed the PHP related packages and enabled the Apache PHP module, you should restart the Apache2 Web server to run PHP scripts. You can run the following command at a terminal prompt to restart your web server: <screen><command>sudo systemctl restart apache2.service</command> </screen>
|
|
|
|
Une fois les paquets concernant PHP installés et le module Apache PHP activé, vous devez redémarrer le serveur web Apache2 pour lancer des scripts PHP. Vous pouvez saisir la commande suivante à l'invite d'un terminal pour redémarrer votre serveur web [nbsp] : <screen> ![](/@@/translation-newline)
<command>sudo systemctl restart apache2.service</command> ![](/@@/translation-newline)
</screen>
|
|
Translated by
Pascal Baudry
|
|
Reviewed by
Jean-Marc
|
|
|
|
Located in
serverguide/C/web-servers.xml:785(para)
|