Skip to content

Explicitly list the PHP packages needed under System Requirements #247

Open

Description

@yorkshire-pudding

In a forum post a user reported that needed more PHP packages installed.

I think perhaps most hosts have these by default, but should we explicitly list them in:
https://docs.backdropcms.org/documentation/system-requirements

Activity

  1. schoenid commented on Jul 15, 2025

    @schoenid

    I think perhaps most hosts have these by default

    Right.
    But for test installations, if PHP is installed manually on a local system, it's not.

  2. schoenid commented on Jul 15, 2025

    @schoenid

    However, looking to the original post with the following extensions:

    php-mdb2
    php-pear
    php-xml
    php-mbstring
    php-gd
    php-mdb2-driver-mysql
    php-mysql
    php8.2-mysql

    There are some extensions, I cant find in my actual PHP (8.4.10).
    This leads me to the idea, that it depends from the PHP version, one is using.

    In my installation:

    • xml: is built in (does not need to be activated)
    • mbstring: has to be activated in php.ini
    • gd: has to be activated in php.ini

    There are additional extensions, which have to be activated in php.ini:

    • mysqli
    • openssl (like the documentation says)

    The following extensions do not exist:

    • mdb2
    • mdb2-driver-mysql
    • mysql
    • pear
  3. schoenid commented on Jul 21, 2025

    @schoenid

    Finally I've got the php.ini extension list, I've made to host backdrop locally on my windows machine.

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;
    
    ; If you wish to have an extension loaded automatically, use the following
    ; syntax:
    ;
    ;   extension=modulename
    ;
    ; For example:
    ;
    ;   extension=mysqli
    ;
    ; When the extension library to load is not located in the default extension
    ; directory, You may specify an absolute path to the library file:
    ;
    ;   extension=/path/to/extension/mysqli.so
    ;
    ; Note : The syntax used in previous PHP versions ('extension=<ext>.so' and
    ; 'extension='php_<ext>.dll') is supported for legacy reasons and may be
    ; deprecated in a future PHP major version. So, when it is possible, please
    ; move to the new ('extension=<ext>) syntax.
    ;
    ; Notes for Windows environments :
    ;
    ; - Many DLL files are located in the ext/
    ;   extension folders as well as the separate PECL DLL download.
    ;   Be sure to appropriately set the extension_dir directive.
    ;
        ;extension=bz2
    extension=curl
        ;extension=ffi
        ;extension=ftp
    extension=fileinfo
    extension=gd
    extension=gettext
        ;extension=gmp
    extension=intl
        ;extension=ldap
    extension=mbstring
        ;extension=exif      ; Must be after mbstring as it depends on it
    extension=mysqli
        ;extension=odbc
    extension=openssl
        ;extension=pdo_firebird
    extension=pdo_mysql
        ;extension=pdo_odbc
        ;extension=pdo_pgsql
        ;extension=pdo_sqlite
        ;extension=pgsql
        ;extension=shmop
    
    ; The MIBS data available in the PHP distribution must be installed.
    ; See https://www.php.net/manual/en/snmp.installation.php
        ;extension=snmp
    
        ;extension=soap
    extension=sockets
        ;extension=sodium
        ;extension=sqlite3
        ;extension=tidy
        ;extension=xsl
        ;extension=zip
    
        ;zend_extension=opcache
    

    (edited for better readability ...)

    It runs very fine with full features, except some minor issues, because the original site has been built on a linux server and contains some characters in path descriptions, which are not allowed on windows.

    Oh btw, I'm using the nginx server and MariaDB.

  4. yorkshire-pudding commented on Jul 24, 2025

    @yorkshire-pudding
    ContributorAuthor

    Should be a page under Advanced Installation with a link to this page from the basic install.
    @quicksketch to confirm the list.

  5. schoenid commented on Jul 25, 2025

    @schoenid

    Just to complete my installation settings for local hosting:
    (replace example.com with your domain):

    Web-Server

    https access in nginx.conf:

        # HTTPS server
        #
        server {
            listen       127.0.0.1:443 ssl;
            server_name  example.com;
            root   <your-path>\www\backdrop-folder;
            index  index.php;
    
            ssl_certificate      <your-path>\cert.pem;
            ssl_certificate_key  <your-path>\key.pem;
    
            # ssl_session_cache    shared:SSL:1m;
            # ssl_session_timeout  5m;
    
            ssl_ciphers  HIGH:!aNULL:!MD5;
            #ssl_prefer_server_ciphers  on;
    
            location / {
                try_files $uri /index.php$is_args$args;
            }
    
            location ~ \.php {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param SCRIPT_NAME $fastcgi_script_name;
                fastcgi_index index.php;
                fastcgi_pass 127.0.0.1:9123;
            }
        }
    

    Starting CGI-Server (part of your PHP installation) from command line (Windows):
    start php-cgi -b 127.0.0.1:9123 /MIN /B

    Starting Web-Server from command line (Windows):

    cd <your-path>\nginx
    nginx.exe
    

    The command window does not close and should be left open in the background, as long as nginx is running.

    Stopping Web-Server from command line (Windows):
    Open a new command line:

    cd <your-path>\nginx
    nginx -s stop
    

    To stop the CGI-Server just close its windows (if open) or terminate its task in Task-Manager.

    Backdrop settings.php as usual:

    $settings['trusted_host_patterns'] = array(
      '^www\.example\.com$',
      '^example\.com$',
    );
    

    Windows hosts file:

    Add to C:\Windows\System32\drivers\etc\hosts

    127.0.0.1 example.com # Test Sites
    127.0.0.1 www.example.com # Test Sites
    

    Site Certification:

    A possibility for self hosted certs is https://github.com/FiloSottile/mkcert
    You can download a windows binary from the realeases page.

    To install the local root CA just use mkcert -install.

    To create the cert files for your local backdrop installation, use:
    mkcert -key-file key.pem -cert-file cert.pem example.com *.example.com

  6. schoenid commented on Aug 11, 2025

    @schoenid

    In mean time I found that even the zip extension has to be activated in php.ini:
    extension=zip
    Otherwise updates will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions