Skip to content

Commit 5843e93

Browse files
Updates
1 parent c5fd889 commit 5843e93

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

content/learning-paths/servers-and-cloud-computing/php-on-gcp/background.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Deploy PHP on Google Cloud Axion C4A Arm VMs
2+
title: Get started with PHP on Google Axion C4A on Arm Neoverse V2
33

44
weight: 2
55

@@ -16,6 +16,14 @@ For more information on Google Axion, see [Introducing Google Axion Processors,
1616

1717
## PHP
1818

19-
PHP (Hypertext Preprocessor) is an open-source, server-side scripting language designed for web development. It allows you to create dynamic web pages, interact with databases, handle forms, and build web applications. You can embed PHP directly into HTML, making it easy to generate content dynamically on the server before sending it to the browser.
19+
PHP (Hypertext Preprocessor) is an open-source, server-side scripting language designed for web development. You use PHP to:
20+
- Create dynamic web pages
21+
- Interact with databases
22+
- Handle forms
23+
- Build web applications and APIs
24+
25+
You can embed PHP directly into HTML, making it easy to generate content dynamically on the server before sending it to the browser.
2026

2127
PHP is widely used for websites, web applications, content management systems (CMS), and APIs. For more information, see the [PHP website](https://www.php.net/) and the [PHP documentation](https://www.php.net/docs.php).
28+
29+
You’re ready to begin deploying PHP workloads on Arm-based Google Cloud Axion C4A VMs. This Learning Path helps you optimize PHP for Arm servers, benchmark performance, and migrate from x86 to Arm with confidence.

content/learning-paths/servers-and-cloud-computing/php-on-gcp/baseline.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: PHP baseline testing on Google Axion C4A Arm Virtual Machine
2+
title: Validate PHP baseline on Google Cloud Axion C4A Arm VM
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
@@ -8,14 +8,13 @@ layout: learningpathall
88

99

1010
## Baseline Setup for PHP-FPM
11-
This section guides you through configuring PHP-FPM (FastCGI Process Manager) on a SUSE Arm-based Google Cloud C4A virtual machine. You will prepare the PHP-FPM pool configuration, verify PHP's FastCGI setup, and later connect it to Apache to confirm end-to-end functionality.
11+
In this section, you’ll configure PHP-FPM (FastCGI Process Manager) on a SUSE Linux Arm-based Google Cloud Axion C4A virtual machine. You’ll set up the PHP-FPM pool, verify FastCGI configuration, connect PHP-FPM to Apache, and confirm that your Arm server is ready for dynamic PHP workloads.
1212

1313
### Configure the PHP-FPM Pool
1414

15-
PHP-FPM (FastCGI Process Manager) runs PHP scripts in dedicated worker processes that are independent of the web server.
16-
This design improves performance, security, and fault isolation — especially useful on multi-core Arm-based processors like Google Cloud’s Axion C4A VMs.
15+
PHP-FPM (FastCGI Process Manager) runs PHP scripts in dedicated worker processes, independent of the web server. This design improves performance, security, and fault isolation—especially on multi-core Arm-based processors like Google Cloud Axion C4A VMs.
1716

18-
A pool defines a group of PHP worker processes, each serving incoming FastCGI requests. Different applications or virtual hosts can use separate pools for better resource control.
17+
A pool is a group of PHP worker processes that serve FastCGI requests. You can use separate pools for different applications or virtual hosts to control resources more effectively.
1918

2019
### Copy the Default Configuration (if missing)
2120

@@ -26,8 +25,8 @@ sudo cp /etc/php8/fpm/php-fpm.d/www.conf.default /etc/php8/fpm/php-fpm.d/www.con
2625
sudo cp /etc/php8/fpm/php-fpm.conf.default /etc/php8/fpm/php-fpm.conf
2726
```
2827
These commands:
29-
Create a default pool configuration (www.conf) that controls how PHP-FPM spawns and manages worker processes.
30-
Restore the main FPM service configuration (php-fpm.conf) if it's missing.
28+
- Create a default pool configuration (`www.conf`) to control how PHP-FPM spawns and manages worker processes.
29+
- Restore the main FPM service configuration (`php-fpm.conf`) if its missing.
3130

3231
### Edit the Configuration
3332

@@ -91,11 +90,11 @@ You should see output similar to:
9190
Oct 16 13:56:44 pareena-php-test systemd[1]: Starting The PHP FastCGI Process Manager...
9291
Oct 16 13:56:44 pareena-php-test systemd[1]: Started The PHP FastCGI Process Manager.
9392
```
94-
PHP-FPM is now active and ready to process requests via its Unix socket (/run/php-fpm/www.sock).
95-
Next, you will configure Apache to communicate with PHP-FPM, allowing your server to process and serve dynamic PHP pages.
93+
PHP-FPM is now active and ready to process requests via its Unix socket (`/run/php-fpm/www.sock`).
94+
Next, you’ll configure Apache to communicate with PHP-FPM, allowing your Arm server to process and serve dynamic PHP pages.
9695

9796
## Install the Apache PHP8 module
98-
If you prefer to have Apache handle PHP execution directly (instead of using PHP-FPM), you can install the Apache PHP 8 module, which integrates PHP into Apache using the `mod_php` interface:
97+
If you want Apache to handle PHP execution directly (instead of using PHP-FPM), install the Apache PHP 8 module, which integrates PHP into Apache using the `mod_php` interface:
9998

10099
```console
101100
sudo zypper install apache2-mod_php8
@@ -105,27 +104,27 @@ Once the module is installed, restart Apache to load the new configuration:
105104
```console
106105
sudo systemctl restart apache2
107106
```
108-
Next, you will test PHP execution by creating a simple PHP page and verifying that Apache can correctly render dynamic content.
107+
Next, you’ll test PHP execution by creating a simple PHP page and verifying that Apache can correctly render dynamic content.
109108

110109
## Test PHP
111-
Now that PHP and Apache are installed, you can verify that everything is working correctly.
110+
Now that PHP and Apache are installed, you can verify that everything is working correctly on your Arm-based VM.
112111

113112
### Create a Test Page
114113
Create a simple PHP file that displays detailed information about your PHP installation:
115114

116115
```console
117116
echo "<?php phpinfo(); ?>" | sudo tee /srv/www/htdocs/info.php
118117
```
119-
This creates a file named `info.php` inside Apache's web root directory `(/srv/www/htdocs/)`. When you open this file in a browser, it will display the PHP configuration page.
118+
This creates a file named `info.php` inside Apaches web root directory (`/srv/www/htdocs/`). When you open this file in a browser, it displays the PHP configuration page.
120119

121120
### Test from Inside the VM
122121
You can verify that PHP and Apache are communicating correctly by testing the web server locally using curl:
123122

124123
```console
125124
curl http://localhost/info.php
126125
```
127-
- `curl` fetches the page from the local Apache server.
128-
- If PHP is working, you will see a large block of HTML code as output. This is the rendered output of the phpinfo() function.
126+
- `curl` fetches the page from the local Apache server.
127+
- If PHP is working, you’ll see a large block of HTML code as output. This is the rendered output of the `phpinfo()` function.
129128
- This confirms that Apache successfully passed the request to the PHP interpreter and returned the generated HTML response.
130129

131130
You should see output similar to:
@@ -148,20 +147,21 @@ h1 {font-size: 150%;}
148147
h2 {font-size: 125%;}
149148
h2 a:link, h2 a:visited{color: inherit; background: inherit;}
150149
```
151-
This long HTML output represents the PHP configuration page content.
150+
This long HTML output represents the PHP configuration page content.
152151

153152
### Test from Your Browser
154-
Now, let's verify that your PHP setup works correctly from outside the VM.
153+
Now, verify that your PHP setup works correctly from outside the VM.
155154
Open a web browser on your local machine (such as Chrome, Firefox, or Edge) and enter the following URL in the address bar:
156155

157156
```console
158157
http://<YOUR_VM_PUBLIC_IP>/info.php
159158
```
160-
- Replace `<YOUR_VM_PUBLIC_IP>` with the public IP of your Google Cloud Axion VM.
159+
- Replace `<YOUR_VM_PUBLIC_IP>` with the public IP of your Google Cloud Axion C4A Arm VM.
161160

162-
If everything is set up correctly, you will see a PHP Info page in your browser. It looks like this:
161+
If everything is set up correctly, you’ll see a PHP Info page in your browser. It looks like this:
163162

164163
![PHP-info page alt-text#center](images/php-web.png "Figure 1: PHP info")
165164

166-
Successfully loading the PHP Info page in your browser confirms that your PHP and Apache environment on Google Cloud C4A is configured and functioning properly.
167-
You are now ready to proceed to the benchmarking and performance testing phase.
165+
Successfully loading the PHP Info page in your browser confirms that your PHP and Apache environment on Google Cloud Axion C4A Arm is configured and functioning properly.
166+
167+
You’ve validated your PHP baseline setup on an Arm-based Google Cloud VM. You’re ready to move on to benchmarking and performance testing for your PHP workloads on Arm.

0 commit comments

Comments
 (0)