|
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.
|
|
|
|
(no translation yet)
|
|
|
|
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.
|
|
|
|
(no translation yet)
|
|
|
|
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>
<command>sudo apt install php libapache2-mod-php</command>
</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: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>
<command>sudo apt install php-cli</command>
</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>
<command>sudo apt install php-cgi</command>
</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>
<command>sudo apt install php-mysql</command>
</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>
<command>sudo apt install php-pgsql</command>
</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: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.
|
|
|
|
(no translation yet)
|
|
|
|
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>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:785(para)
|