You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/php-on-gcp/_index.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,15 @@
1
1
---
2
-
title: Deploy PHP on Google Cloud C4A (Arm-based Axion VMs)
2
+
title: Deploy PHP on Google Cloud C4A Arm-based Axion VMs
3
3
4
-
draft: true
5
-
cascade:
6
-
draft: true
7
-
4
+
8
5
minutes_to_complete: 30
9
6
10
-
who_is_this_for: This is an introductory topic for software developers migrating PHP workloads from x86_64 to Arm-based servers, specifically on Google Cloud C4A virtual machines built on Axion processors.
11
-
7
+
who_is_this_for: This is an introductory topic for developers migrating Hypertext Preprocesso (PHP) workloads from x86_64 to Arm-based servers, specifically on Google Cloud C4A virtual machines (VM) built on Axion processors.
12
8
13
9
learning_objectives:
14
-
- Provision a SUSE SLES virtual machine on Google Cloud C4A (Arm-based Axion VM)
15
-
- Install PHP on a SUSE Arm64 (C4A) instance
16
-
- Validate PHP functionality with baseline HTTP server tests
10
+
- Provision a SUSE Linux Enterprise Server (SLES) virtual machine on a Google Cloud C4A Arm-based Axion virtual machine
11
+
- Install PHP on a SUSE Arm64 C4A instance
12
+
- Validate PHP functionality by running baseline HTTP server tests
17
13
- Benchmark PHP performance using PHPBench on Arm64 architecture
title: Get started with PHP on Google Axion C4A (Arm Neoverse V2)
2
+
title: Get started with PHP on Google Cloud Axion C4A Arm VMs
3
3
4
4
weight: 2
5
5
6
6
layout: "learningpathall"
7
7
---
8
8
9
-
## Google Axion C4A Arm instances in Google Cloud
9
+
## PHP
10
10
11
-
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
11
+
PHP (Hypertext Preprocessor) is an open-source, server-side scripting language designed for web development. You can embed PHP directly into HTML, making it easy to generate content dynamically on the server before sending it to the browser. 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).
12
12
13
-
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
14
13
15
-
To learn more about Google Axion, refer to the [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) blog.
14
+
## Google Axion C4A
16
15
17
-
## PHP
16
+
Google Axion C4A is a family of Arm-based virtual machines powered by Google's Axion CPU, built with Arm Neoverse V2 cores. They deliver high performance and energy efficiency for cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications. The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
18
17
19
-
PHP (Hypertext Preprocessor) is an open-source, server-side scripting language designed for web development.
18
+
For more information on Google Axion, see the Google blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
20
19
21
-
It allows developers to create dynamic web pages, interact with databases, handle forms, and build web applications. PHP can be embedded directly into HTML, making it easy to generate content dynamically on the server before sending it to the browser.
20
+
## What's next?
22
21
23
-
PHP is widely used for websites, web applications, content management systems (CMS), and APIs. Learn more from the [PHP official website](https://www.php.net/)and its [official documentation](https://www.php.net/docs.php).
22
+
You’re now ready to begin deploying PHP workloads on Arm-based Google Cloud Axion C4A VMs. This Learning Path shows you how to optimize PHP for Arm servers, benchmark performance, and migrate from x86 to Arm with confidence.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/php-on-gcp/baseline.md
+36-34Lines changed: 36 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,34 @@
1
1
---
2
-
title: PHP baseline testing on Google Axion C4A Arm Virtual Machine
2
+
title: Validate PHP baseline on Google Cloud Axion C4A Arm VM
3
3
weight: 5
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
9
10
-
## 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.
10
+
## Configure PHP-FPM baseline
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 and verify the FastCGI configuration. Next, you’ll connect PHP-FPM to Apache. These steps confirm that your Arm server is ready for dynamic PHP workloads.
12
12
13
-
### Configure the PHP-FPM Pool
13
+
##Set up the PHP-FPM pool
14
14
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. You’ll notice better performance, stronger security, and improved fault isolation when you use multi-core Arm-based processors like Google Cloud Axion C4A VMs.
17
16
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.
19
18
20
-
###Copy the Default Configuration (if missing)
19
+
## Copy the default configuration
21
20
22
21
If your PHP-FPM configuration files don't exist yet (for example, after a minimal installation in this Learning Path), copy the defaults into place using the commands below:
| listen = /run/php-fpm/[www.sock](http://www.sock)| Configures PHP-FPM to communicate with Apache using a local Unix socket instead of a TCP port (`127.0.0.1:9000`). This reduces network overhead and improves performance. |
@@ -60,7 +59,7 @@ Explanation of each directive:
60
59
| listen.mode = 0660 | Defines file permissions so that both the owner (`wwwrun`) and group (`www`) can read and write to the socket. This enables smooth communication between Apache and PHP-FPM. |
61
60
62
61
63
-
###Start and Enable PHP-FPM
62
+
## Start and enable PHP-FPM service
64
63
65
64
After updating the configuration, restart the PHP-FPM service so it picks up the new settings:
66
65
@@ -91,11 +90,11 @@ You should see output similar to:
91
90
Oct 16 13:56:44 pareena-php-test systemd[1]: Starting The PHP FastCGI Process Manager...
92
91
Oct 16 13:56:44 pareena-php-test systemd[1]: Started The PHP FastCGI Process Manager.
93
92
```
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 using 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.
96
95
97
96
## 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:
99
98
100
99
```console
101
100
sudo zypper install apache2-mod_php8
@@ -105,28 +104,26 @@ Once the module is installed, restart Apache to load the new configuration:
105
104
```console
106
105
sudo systemctl restart apache2
107
106
```
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.
109
108
110
-
## Test PHP
111
-
Now that PHP and Apache are installed, you can verify that everything is working correctly.
109
+
## Test PHP functionality
110
+
Now that PHP and Apache are installed, you can verify that everything is working correctly on your Arm-based VM.
112
111
113
-
###Create a Test Page
112
+
## Create a PHP test page
114
113
Create a simple PHP file that displays detailed information about your PHP installation:
115
114
116
115
```console
117
116
echo "<?php phpinfo(); ?>" | sudo tee /srv/www/htdocs/info.php
118
117
```
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 Apache’s web root directory (`/srv/www/htdocs/`). When you open this file in a browser, it displays the PHP configuration page.
120
119
121
-
### Test from Inside the VM
120
+
##Verify PHP from inside the VM
122
121
You can verify that PHP and Apache are communicating correctly by testing the web server locally using curl:
123
122
124
123
```console
125
124
curl http://localhost/info.php
126
125
```
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.
129
-
- This confirms that Apache successfully passed the request to the PHP interpreter and returned the generated HTML response.
126
+
When you run the `curl` command, it fetches the PHP test page from the local Apache server. If PHP is configured correctly, you'll see a large block of HTML code in the output, which is the result of the `phpinfo()` function. This confirms that Apache is successfully passing requests to the PHP interpreter and returning the generated HTML response.
This long HTML output represents the PHP configuration page content.
148
+
This long HTML output represents the PHP configuration page content.
152
149
153
-
### Test from Your Browser
154
-
Now, let's verify that your PHP setup works correctly from outside the VM.
150
+
##Verify PHP from your browser
151
+
Now, verify that your PHP setup works correctly from outside the VM.
155
152
Open a web browser on your local machine (such as Chrome, Firefox, or Edge) and enter the following URL in the address bar:
156
153
157
154
```console
158
155
http://<YOUR_VM_PUBLIC_IP>/info.php
159
156
```
160
-
-Replace `<YOUR_VM_PUBLIC_IP>` with the public IP of your Google Cloud Axion VM.
157
+
Replace `<YOUR_VM_PUBLIC_IP>` with the public IP of your Google Cloud Axion C4A Arm VM.
161
158
162
-
If everything is set up correctly, you will see a PHP Info page in your browser. It looks like this:
159
+
If your configuration is correct, your browser displays the PHP Info page. This page shows detailed information about your PHP environment, including version, build options, and loaded modules, as shown below:

165
162
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.
163
+
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.
164
+
165
+
## What's next?
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.
168
+
169
+
Next, you’ll learn how to measure PHP performance on Google Cloud Axion C4A Arm VMs. You’ll use benchmarking tools to evaluate throughput, latency, and resource utilization. This helps you optimize your PHP environment for production workloads and identify areas for improvement.
0 commit comments