Skip to content

Commit 67833c6

Browse files
authored
Merge pull request #190553 from Shiny11A/SP-tutorial-php-mysql-app
SP-tutorial-php-mysql-app
2 parents 86f0e7d + ce7f2fa commit 67833c6

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

articles/app-service/tutorial-php-mysql-app.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: Learn how to get a PHP app working in Azure, with connection to a M
55
ms.assetid: 14feb4f3-5095-496e-9a40-690e1414bd73
66
ms.devlang: php
77
ms.topic: tutorial
8-
ms.date: 06/15/2020
9-
ms.custom: mvc, cli-validate, seodec18, devx-track-azurecli
8+
ms.date: 03/04/2022
9+
ms.custom: mvc, cli-validate, seodec18, devx-track-azurecli, devdivchpfy22
1010
zone_pivot_groups: app-service-platform-windows-linux
1111
---
1212

@@ -36,7 +36,7 @@ In this tutorial, you learn how to:
3636
> * Stream diagnostic logs from Azure
3737
> * Manage the app in the Azure portal
3838
39-
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
39+
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]s
4040

4141
## Prerequisites
4242

@@ -63,7 +63,7 @@ mysql -u root -p
6363

6464
If you're prompted for a password, enter the password for the `root` account. If you don't remember your root account password, see [MySQL: How to Reset the Root Password](https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html).
6565

66-
If your command runs successfully, then your MySQL server is running. If not, make sure that your local MySQL server is started by following the [MySQL post-installation steps](https://dev.mysql.com/doc/refman/5.7/en/postinstallation.html).
66+
If your command runs successfully, then your MySQL server is running. If not, ensure that your local MySQL server is started by following the [MySQL post-installation steps](https://dev.mysql.com/doc/refman/5.7/en/postinstallation.html).
6767

6868
### Create a database locally
6969

@@ -95,14 +95,14 @@ In the terminal window, `cd` to a working directory.
9595
cd laravel-tasks
9696
```
9797

98-
1. Make sure the default branch is `main`.
98+
1. Ensure the default branch is `main`.
9999

100100
```bash
101101
git branch -m main
102102
```
103103

104104
> [!TIP]
105-
> The branch name change isn't required by App Service. However, since many repositories are changing their default branch to `main`, this tutorial also shows you how to deploy a repository from `main`. For more information, see [Change deployment branch](deploy-local-git.md#change-deployment-branch).
105+
> The branch name change isn't required by App Service. But, since many repositories are changing their default branch to `main`, this tutorial also shows you how to deploy a repository from `main`. For more information, see [Change deployment branch](deploy-local-git.md#change-deployment-branch).
106106
107107
1. Install the required packages.
108108
@@ -148,15 +148,15 @@ For information on how Laravel uses the _.env_ file, see [Laravel Environment Co
148148
php artisan serve
149149
```
150150

151-
1. Navigate to `http://localhost:8000` in a browser. Add a few tasks in the page.
151+
1. Go to `http://localhost:8000` in a browser. Add a few tasks in the page.
152152

153153
![PHP connects successfully to MySQL](./media/tutorial-php-mysql-app/mysql-connect-success.png)
154154

155-
1. To stop PHP, type `Ctrl + C` in the terminal.
155+
1. To stop PHP, enter `Ctrl + C` in the terminal.
156156

157157
## Create MySQL in Azure
158158

159-
In this step, you create a MySQL database in [Azure Database for MySQL](../mysql/index.yml). Later, you configure the PHP application to connect to this database.
159+
In this step, you create a MySQL database in [Azure Database for MySQL](../mysql/index.yml). Later, you set up the PHP application to connect to this database.
160160

161161
### Create a resource group
162162

@@ -227,7 +227,7 @@ When the MySQL server is created, the Azure CLI shows information similar to the
227227
GRANT ALL PRIVILEGES ON sampledb.* TO 'phpappuser';
228228
```
229229

230-
1. Exit the server connection by typing `quit`.
230+
1. Exit the server connection by entering `quit`.
231231

232232
```sql
233233
quit
@@ -259,7 +259,7 @@ MYSQL_SSL=true
259259
Save the changes.
260260
261261
> [!TIP]
262-
> To secure your MySQL connection information, this file is already excluded from the Git repository (See _.gitignore_ in the repository root). Later, you learn how to configure environment variables in App Service to connect to your database in Azure Database for MySQL. With environment variables, you don't need the *.env* file in App Service.
262+
> To secure your MySQL connection information, this file is already excluded from the Git repository (See _.gitignore_ in the repository root). Later, you learn how to set up the environment variables in App Service to connect to your database in Azure Database for MySQL. With environment variables, you don't need the *.env* file in App Service.
263263
>
264264
265265
### Configure TLS/SSL certificate
@@ -318,13 +318,13 @@ The certificate `BaltimoreCyberTrustRoot.crt.pem` is provided in the repository
318318
php artisan serve --env=production
319319
```
320320
321-
1. Navigate to `http://localhost:8000`. If the page loads without errors, the PHP application is connecting to the MySQL database in Azure.
321+
1. Go to `http://localhost:8000`. If the page loads without errors, the PHP application is connecting to the MySQL database in Azure.
322322
323323
1. Add a few tasks in the page.
324324
325325
![PHP connects successfully to Azure Database for MySQL](./media/tutorial-php-mysql-app/mysql-connect-success.png)
326326
327-
1. To stop PHP, type `Ctrl + C` in the terminal.
327+
1. To stop PHP, enter `Ctrl + C` in the terminal.
328328
329329
### Commit your changes
330330
@@ -433,7 +433,7 @@ By default, Azure App Service points the root virtual application path (_/_) to
433433

434434
::: zone pivot="platform-linux"
435435

436-
[Laravel application lifecycle](https://laravel.com/docs/5.4/lifecycle) begins in the _public_ directory instead of the application's root directory. The default PHP Docker image for App Service uses Apache, and it doesn't let you customize the `DocumentRoot` for Laravel. However, you can use `.htaccess` to rewrite all requests to point to _/public_ instead of the root directory. In the repository root, an `.htaccess` is added already for this purpose. With it, your Laravel application is ready to be deployed.
436+
[Laravel application lifecycle](https://laravel.com/docs/5.4/lifecycle) begins in the _public_ directory instead of the application's root directory. The default PHP Docker image for App Service uses Apache, and it doesn't let you customize the `DocumentRoot` for Laravel. But you can use `.htaccess` to rewrite all requests to point to _/public_ instead of the root directory. In the repository root, an `.htaccess` is added already for this purpose. With it, your Laravel application is ready to be deployed.
437437

438438
For more information, see [Change site root](configure-language-php.md#change-site-root).
439439

@@ -505,11 +505,11 @@ Congratulations, you're running a data-driven PHP app in Azure App Service.
505505
506506
In this step, you make a simple change to the `task` data model and the webapp, and then publish the update to Azure.
507507
508-
For the tasks scenario, you modify the application so that you can mark a task as complete.
508+
For the tasks scenario, you change the application so that you can mark a task as complete.
509509
510510
### Add a column
511511
512-
1. In the local terminal window, navigate to the root of the Git repository.
512+
1. In the local terminal window, go to the root of the Git repository.
513513
514514
1. Generate a new database migration for the `tasks` table:
515515
@@ -615,11 +615,11 @@ For the tasks scenario, you modify the application so that you can mark a task a
615615
php artisan serve
616616
```
617617
618-
1. To see the task status change, navigate to `http://localhost:8000` and select the checkbox.
618+
1. To see the task status change, go to `http://localhost:8000` and select the checkbox.
619619
620620
![Added check box to task](./media/tutorial-php-mysql-app/complete-checkbox.png)
621621
622-
1. To stop PHP, type `Ctrl + C` in the terminal.
622+
1. To stop PHP, enter `Ctrl + C` in the terminal.
623623
624624
### Publish changes to Azure
625625
@@ -637,11 +637,11 @@ For the tasks scenario, you modify the application so that you can mark a task a
637637
git push azure main
638638
```
639639
640-
1. Once the `git push` is complete, navigate to the Azure app and test the new functionality.
640+
1. Once the `git push` is complete, go to the Azure app and test the new functionality.
641641
642642
![Model and database changes published to Azure](media/tutorial-php-mysql-app/complete-checkbox-published.png)
643643
644-
If you added any tasks, they are retained in the database. Updates to the data schema leave existing data intact.
644+
If you add any task, they're retained in the database. Updates to the data schema leave existing data intact.
645645
646646
## Stream diagnostic logs
647647
@@ -657,7 +657,7 @@ az webapp log tail --name <app_name> --resource-group myResourceGroup
657657
658658
Once log streaming has started, refresh the Azure app in the browser to get some web traffic. You can now see console logs piped to the terminal. If you don't see console logs immediately, check again in 30 seconds.
659659
660-
To stop log streaming at any time, type `Ctrl`+`C`.
660+
To stop log streaming at any time, enter `Ctrl`+`C`.
661661
662662
::: zone-end
663663
@@ -678,11 +678,11 @@ To stop log streaming at any time, type `Ctrl`+`C`.
678678
679679
1. Go to the [Azure portal](https://portal.azure.com) to manage the app you created.
680680
681-
1. From the left menu, click **App Services**, and then click the name of your Azure app.
681+
1. From the left menu, select **App Services**, and then select the name of your Azure app.
682682
683683
![Portal navigation to Azure app](./media/tutorial-php-mysql-app/access-portal.png)
684684
685-
You see your app's Overview page. Here, you can perform basic management tasks like stop, start, restart, browse, and delete.
685+
You see your app's Overview page. In this page, you can do basic management tasks like stop, start, restart, browse, and delete.
686686
687687
The left menu provides pages for configuring your app.
688688

0 commit comments

Comments
 (0)