---
title: "Working with PHP"
date: "2024-10-26T12:09:19+00:00"
summary: "Configure PHP versions, settings, and extensions in Cloud IDE. Step-by-step guide for developers to optimize their PHP environment."
image:
type: "page"
url: "/acquia-cloud-platform/add-ons/cloud-ide/working-php"
id: "408369b4-1aa0-438a-9848-346cdd6370b3"
---

The default PHP version for Cloud IDE is PHP 8.3. With Cloud IDE, you can configure the PHP version and [Xdebug](/acquia-cloud-platform/add-ons/ide/tooling#ide-configure-xdebug).

Configuring the PHP version
---------------------------

To configure the PHP version:

1.  In your IDE admin menu, go to **Terminal** > **New Terminal**.
2.  Run the following command in the terminal:
    
        acli ide:php-version 8.2
    
    Note
    
    *   In this command, version 8.2 is used as an example.
    
    *   You can configure the PHP versions 7.4, 8.2, 8.3 and 8.4 depending on your requirement.
    

Table of contents will be added

You can use the following command to check the current PHP version:

    ide:~/project$ php -v
    PHP 8.2.7 (cli) (built: Jul  6 2023 13:01:51) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.2.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies

Configuring PHP settings
------------------------

To override the default PHP settings for Cloud IDE, you must change the following file:

    /home/ide/configs/php/custom.ini

The PHP settings that you can change include, but are not limited to the following:

*   `memory_limit`
*   `max_upload_file_size`
*   `post_max_size`
*   `max_execution_time`

The following is an example of changes made to PHP settings:

    max_upload_file_size = 100M 
    post_max_size = 50M
    max_execution_time = 240
    memory_limit = 1G

To restart PHP-FPM to apply the changes you made, run the following command:

    acli ide:service-restart php

Enabling PHP intl extension
---------------------------

To enable the `intl` extension in IDE:

1.  Edit the `/home/ide/configs/php/custom.ini` file and add the following line:

    extension=intl

2.  Restart PHP and Apache:

    acli ide:service-restart php
    acli ide:service-restart apache

To confirm if the `intl` extension is enabled, run the following:

    php -i | grep intl

If you encounter any errors, [contact Acquia Support](/service-offerings/support#contact-acquia-support).

Checking logs
-------------

Apache logs are present in the Apache log directory:

`/var/log/apache2/`

PHP logs are present in the PHP log directory:

`/var/log/php/`

To access any of the two directories from your IDE environment,

1.  Open a terminal window.
2.  Switch to the required directory. For example:
    
        cd /var/log/apache2/
    
    or
    
        cd /var/log/php
    

To make changes to the IDE, change Apache configuration. When your code runs on Cloud Platform, it uses the Apache configuration supported by Acquia as part of the managed service. Acquia restricts the changes that you can make to the Apache configuration in order to maintain application security and reliability. For more information, visit [Security and Compliance](/acquia-cloud-platform/security-and-compliance "Security and compliance").