### Download Datadog Installer Source: https://github.com/datadog/dd-trace-php/blob/master/appsec/README.md Download the Datadog setup script to begin the installation process. ```bash wget https://github.com/DataDog/dd-trace-php/releases/latest/download/datadog-setup.php -O datadog-setup.php ``` -------------------------------- ### Copy Example Sites Configuration Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_8_9/core/INSTALL.txt Copy the example sites configuration file to enable multisite functionality. This is a necessary first step for setting up multiple Drupal sites from a single installation. ```bash $ cp sites/example.sites.php sites/sites.php ``` -------------------------------- ### Start Vagrant Environment Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Starts the Vagrant virtual machine for development. ```bash vagrant up ``` -------------------------------- ### User Model Example Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/general/models.html Demonstrates a User model class, highlighting the naming convention where the class name starts with a capital letter and the file name is all lowercase. ```php class User_model extends CI_Model { function __construct() { parent::__construct(); } } ``` -------------------------------- ### Install Tracer and Profiling in Docker Source: https://github.com/datadog/dd-trace-php/blob/master/tests/randomized/README.md Download and install the dd-trace-php tracer and enable profiling within a Docker container. This setup is necessary before analyzing core dumps or running tests. ```bash curl -L -o /tmp/datadog-setup.php https://557109-119990860-gh.circle-artifacts.com/0/datadog-setup.php curl -L -o /tmp/ddtrace-test.tar.gz https://557109-119990860-gh.circle-artifacts.com/0/dd-library-php-1.0.0-nightly-aarch64-linux-gnu.tar.gz php /tmp/datadog-setup.php --php-bin all --file /tmp/ddtrace-test.tar.gz --enable-profiling ``` -------------------------------- ### Copy Example Sites Configuration File Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/core/INSTALL.txt Before setting up multisite configurations, copy the example sites configuration file to enable it. ```bash cp sites/example.sites.php sites/sites.php ``` -------------------------------- ### Online Installation with AppSec Enabled Source: https://github.com/datadog/dd-trace-php/blob/master/appsec/README.md Install both the Datadog Tracer and AppSec extensions using the online installer. Requires an active internet connection. ```bash php datadog-setup.php --php-bin all --enable-appsec ``` -------------------------------- ### Build and Start Docker Compose Environment Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Builds the Docker image and starts the containers defined in docker-compose.yml. ```bash docker-compose up -d --build ``` -------------------------------- ### Start Docker Container Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Yii/Version_2_0_49/README.md Command to start the application's Docker containers. ```bash docker-compose up -d ``` -------------------------------- ### Start Docker Development Environment Source: https://github.com/datadog/dd-trace-php/blob/master/CONTRIBUTING.md Start a Docker container for a specific PHP version to set up the development environment. ```bash # For 7.0 $ docker compose run --rm 7.0-bookworm bash # For 7.1 $ docker compose run --rm 7.1-bookworm bash # For 7.2 $ docker compose run --rm 7.2-bookworm bash # For 7.3 $ docker compose run --rm 7.3-bookworm bash # For 7.4 $ docker compose run --rm 7.4-bookworm bash # For 8.0 $ docker compose run --rm 8.0-bookworm bash # For 8.1 $ docker compose run --rm 8.1-bookworm bash # For 8.2 $ docker compose run --rm 8.2-bookworm bash # For 8.3 $ docker compose run --rm 8.3-bookworm bash # For 8.4 $ docker compose run --rm 8.4-bookworm bash ``` -------------------------------- ### Start Development Server Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Start PHP's built-in web server for development, binding it to all network interfaces on port 8080. ```bash cd path/to/install php -S 0.0.0.0:8080 -t public ``` ```bash composer serve ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/core/assets/vendor/tabbable/README.txt Run this command in the root directory of the tabbable library to install necessary dependencies. ```bash yarn install ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/ApiTools/Latest/README.md Clone the project repository using Git and then use Composer to install its dependencies. ```bash $ cd path/to/install $ composer install ``` -------------------------------- ### Install Psalm and Laminas Test Components Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Installs the necessary development dependencies for running Psalm static analysis and testing with Laminas. ```bash composer require --dev vimeo/psalm psalm/plugin-phpunit laminas/laminas-test ``` -------------------------------- ### Drupal Quick-Start Help Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/core/INSTALL.txt Run this command to see available options for configuring the quick-start installation. ```bash php core/scripts/drupal quick-start --help ``` -------------------------------- ### Drupal Quick-Start Installation Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/core/INSTALL.txt Use this command for a quick installation of Drupal. It utilizes PHP's built-in web server and is not intended for production environments. ```bash curl -sS https://ftp.drupal.org/files/projects/drupal-x.y.z.zip --output drupal-x.y.z.zip unzip drupal-x.y.z.zip cd /path/to/drupal-x.y.z php core/scripts/drupal quick-start ``` -------------------------------- ### Add Composer Scripts for Magento Setup Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Magento/README.md Add these scripts to your composer.json to automate setup tasks after package updates, including permission adjustments and Magento installation. ```json "scripts": { "post-update-cmd": [ "find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +\n", "find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +\n", "chmod u+x bin/magento", "chmod u+x install-magento", "sudo ./install-magento" ] } ``` -------------------------------- ### Create Project with Composer Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/ApiTools/Latest/README.md Use Composer's create-project command to set up the skeleton application. Ensure Composer is installed first. ```bash $ curl -s https://getcomposer.org/installer | php -- --filename=composer $ composer create-project -sdev laminas-api-tools/api-tools-skeleton path/to/install ``` -------------------------------- ### Enable PostgreSQL Extension in Dockerfile Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Example of uncommenting lines in a Dockerfile to install pdo-pgsql support. ```dockerfile # RUN apt-get install --yes libpq-dev \ # && docker-php-ext-install pdo_pgsql ``` -------------------------------- ### Magento Installation Script Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Magento/README.md This bash script automates the Magento setup:install command with pre-defined configurations for database, locale, and admin user. Note that Elasticsearch configurations are only required for Magento 2.4+. ```sh #!/usr/bin/env bash php -d memory_limit=1G ./bin/magento setup:install \ --base-url=http://localhost/ \ --backend-frontname=admin \ --language=en_US \ --timezone=America/Los_Angeles \ --currency=USD \ --db-host=mysql-integration \ --db-name=test \ --db-user=test \ --db-password=test \ --use-secure=0 \ --base-url-secure=0 \ --use-secure-admin=0 \ --admin-firstname=Admin \ --admin-lastname=Admin \ --admin-email=admin@admin.com \ --admin-user=admin \ --admin-password=Magento2 \ --elasticsearch-host=elasticsearch7-integration \ --search-engine=elasticsearch7 \ --cleanup-database ``` -------------------------------- ### Start Vagrant Machine Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/ApiTools/Latest/README.md Use this command to bring up the Vagrant virtual machine for development. ```bash $ vagrant up ``` -------------------------------- ### Nginx Server Block Configuration Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Example Nginx server block configuration for a Laminas application, including FastCGI setup for PHP. ```nginx server { listen 80; server_name laminasapp.localhost; root /path/to/laminasapp/public; location / { index index.php; try_files $uri $uri/ @php; } location @php { # Pass the PHP requests to FastCGI server (php-fpm) on 127.0.0.1:9000 fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /path/to/laminasapp/public/index.php; include fastcgi_params; } } ``` -------------------------------- ### Usage Example: Compress, Save, and Download Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/libraries/zip.html Demonstrates compressing a file, saving it to the server, and then downloading it to the desktop. ```php $name = 'mydata1.txt'; $data = 'A Data String!'; $this->zip->add_data($name, $data); $this->zip->archive('/path/to/directory/my_backup.zip'); $this->zip->download('my_backup.zip'); ``` -------------------------------- ### Configure Cleanup for Composer Installers Packages Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/composer/Plugin/VendorHardening/README.txt For packages installed outside the main vendor directory using composer/installers, specify cleanup paths relative to the package's base directory. This example shows cleaning 'tests' and 'src/Tests' from a Drupal module. ```json "extra": { "drupal-core-vendor-hardening": { "drupal/module_name": ["tests", "src/Tests"] } } ``` -------------------------------- ### Basic Pagination Example Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/libraries/pagination.html This snippet shows the fundamental setup for creating pagination links in a CodeIgniter controller. It requires loading the pagination library and initializing it with essential configuration parameters. ```php $this->load->library('pagination'); $config['base_url'] = 'http://example.com/index.php/test/page/'; $config['total_rows'] = 200; $config['per_page'] = 20; $this->pagination->initialize($config); echo $this->pagination->create_links(); ``` -------------------------------- ### Run Slim Application in Development (Composer) Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Slim/Latest/README.md Navigate to your application directory and run this command to start the development server. ```bash cd [my-app-name] composer start ``` -------------------------------- ### Interactive Program Startup Notice (GPL) Source: https://github.com/datadog/dd-trace-php/blob/master/dockerfiles/testing-environment/Wordpress5/app/wp-includes/js/plupload/license.txt For interactive programs, display a short notice upon startup. This notice should include version, copyright, warranty information, and details on redistribution under the GPL. ```text Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ``` -------------------------------- ### Rust Helper Log Messages Source: https://github.com/datadog/dd-trace-php/blob/master/appsec/helper-rust/CLAUDE.md Example log messages from the Rust AppSec helper. These logs use an ISO8601 timestamp format and contain messages like "AppSec helper starting". ```log 2026-01-15T19:41:20.269325053Z [INFO] AppSec helper starting 2026-01-15T19:41:20.269907428Z [INFO] Configuration: Config { socket_path: ... 2026-01-15T19:41:20.277712636Z [INFO] AppSec helper started successfully 2026-01-15T19:41:20.277760178Z [INFO] Starting server on socket: ... 2026-01-15T19:41:20.277871261Z [INFO] Listening for connections ``` -------------------------------- ### Launch Local Environment for a Specific Scenario Source: https://github.com/datadog/dd-trace-php/blob/master/tests/randomized/README.md Use 'make -C .tmp.scenarios shell.scenario.' to launch a shell within a specific scenario's Docker environment. The prepare.sh script can then be used to start servers and install the tracer. ```bash $ make -C .tmp.scenarios shell.scenario.randomized-661543622-centos7-7.4 Inside the container you can optionally start the web servers and install the tracer automatically using the script provided in `/scripts/prepare.sh`. > bash /scripts/prepare.sh Once the bootstrap phase is completed, a nginx server will be listening on port 80, while an apache server will be listening on port 81. From within the container you can now run: > curl -v localhost:80 # nginx > curl -v localhost:81 # apache > curl -v localhost:80?seed=123456 # optionally, provide a seed to exactly recreate the same execution path on multiple requests. ``` -------------------------------- ### Build Tabbable for Production Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/core/assets/vendor/tabbable/README.txt Execute this command to create production-ready build files, including the index.umd.min.js file. ```bash yarn build ``` -------------------------------- ### Set Calendar Display Preferences in CodeIgniter Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/libraries/calendar.html Customize calendar appearance by passing an array of preferences to the Calendar library loader. This example sets the start day to Saturday, uses long month names, and short day abbreviations. ```php $prefs = array ( 'start_day' => 'saturday', 'month_type' => 'long', 'day_type' => 'short' ); $this->load->library('calendar', $prefs); echo $this->calendar->generate(); ``` -------------------------------- ### Use OpenTracing API with GlobalTracer Source: https://context7.com/datadog/dd-trace-php/llms.txt Leverage the `GlobalTracer` singleton to interact with the Datadog tracer using the OpenTracing API. This allows applications to adhere to the OpenTracing standard. The example shows starting root and child spans, setting tags, handling errors, and closing spans, including flushing the tracer. ```php startRootSpan('web.request', [ 'tags' => [ Tag::HTTP_METHOD => $_SERVER['REQUEST_METHOD'], Tag::HTTP_URL => $_SERVER['REQUEST_URI'], Tag::SERVICE_NAME => 'my-php-app', ], ]); // Start a child span inside a service call $childScope = $tracer->startActiveSpan('db.query', [ 'tags' => [ Tag::DB_TYPE => 'mysql', Tag::DB_STATEMENT => 'SELECT * FROM products WHERE id = ?', Tag::RESOURCE_NAME => 'product.find', ], ]); try { $result = $db->query('SELECT * FROM products WHERE id = ?', [$id]); $childScope->getSpan()->setTag(Tag::DB_ROW_COUNT, count($result)); } catch (\Throwable $e) { $childScope->getSpan()->setError($e); throw $e; } finally { $childScope->close(); // closes child span } $rootScope->getSpan()->setTag(Tag::HTTP_STATUS_CODE, http_response_code()); $rootScope->close(); // closes root span and flushes $tracer->flush(); ``` -------------------------------- ### Install zai_assert header file Source: https://github.com/datadog/dd-trace-php/blob/master/zend_abstract_interface/zai_assert/CMakeLists.txt Installs the zai_assert.h header file to the 'include/zai_assert' directory within the installation prefix when the 'install' command is invoked. ```cmake install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/zai_assert.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zai_assert/) ``` -------------------------------- ### Install Slim Framework Skeleton Application Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Slim/Version_3_12/README.md Use this command to create a new Slim Framework 3 skeleton application. Replace `[my-app-name]` with your desired directory name. ```bash php composer.phar create-project slim/slim-skeleton [my-app-name] ``` -------------------------------- ### Start Yii Web Server Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Yii/Latest/README.md Launch the built-in Yii web server for testing purposes. ```bash tests/bin/yii serve ``` -------------------------------- ### Install Headers Source: https://github.com/datadog/dd-trace-php/blob/master/zend_abstract_interface/headers/CMakeLists.txt Installs the 'headers.h' file to the include directory when the 'install' target is run. ```cmake install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/headers.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/headers/) ``` -------------------------------- ### Client Initialization and Cleanup Source: https://github.com/datadog/dd-trace-php/blob/master/src/dogstatsd/README.md Demonstrates how to create a DogStatsD client instance with custom tags and how to properly clean it up. ```APIDOC ## Client Initialization and Cleanup ### Description Create a client with `dogstatsd_client_ctor`. The `const_tags` parameter will be attached to all metrics automatically. This example uses localhost and the default port. ### API ```c char buf[DOGSTATSD_CLIENT_RECOMMENDED_MAX_MESSAGE_SIZE]; size_t len = DOGSTATSD_CLIENT_RECOMMENDED_MAX_MESSAGE_SIZE; int error; struct addrinfo *addrs = NULL; if ((error = dogstatsd_client_getaddrinfo(&addrs, "localhost", "8125"))) { fprintf( stderr, "Failed looking up localhost:8125: %s\n", (error == EAI_SYSTEM) ? strerror(errno) : gai_strerror(error) ); } else { /* the client will always be usable, but if * dogstatsd_client_is_default_client(client) is true then it will always * return E_NO_CLIENT instead of performing the operation. * * Note that the client will take responsibility for calling freeaddrinfo. */ dogstatsd_client client = dogstatsd_client_ctor(addrs, buf, len, "lang:php"); // do client operations, then dogstatsd_client_dtor(&client); } ``` Use the `dogstatsd_client_dtor` function to clean up the client and the addrinfo. It will not free the buffer or constant tags. The dtor should always be called on the client. ``` -------------------------------- ### Include GNU Install Directories Source: https://github.com/datadog/dd-trace-php/blob/master/components/CMakeLists.txt Includes standard GNU installation directory definitions, which are used for determining installation paths. ```cmake include(GNUInstallDirs) ``` -------------------------------- ### Install Drupal Composer Dependencies Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Drupal/Version_10_1/core/INSTALL.txt Run this command after downloading Drupal to install its Composer dependencies. Ensure Composer is installed globally first. ```bash composer install ``` -------------------------------- ### Create DogStatsD Client Instance Source: https://github.com/datadog/dd-trace-php/blob/master/src/dogstatsd/README.md Instantiate a DogStatsD client. This example shows how to resolve the address for localhost and the default port, create the client with constant tags, and handle potential address lookup errors. The client takes responsibility for freeing the addrinfo. ```c char buf[DOGSTATSD_CLIENT_RECOMMENDED_MAX_MESSAGE_SIZE]; size_t len = DOGSTATSD_CLIENT_RECOMMENDED_MAX_MESSAGE_SIZE; int error; struct addrinfo *addrs = NULL; if ((error = dogstatsd_client_getaddrinfo(&addrs, "localhost", "8125"))) { fprintf( stderr, "Failed looking up localhost:8125: %s\n", (error == EAI_SYSTEM) ? strerror(errno) : gai_strerror(error) ); } else { /* the client will always be usable, but if * dogstatsd_client_is_default_client(client) is true then it will always * return E_NO_CLIENT instead of performing the operation. * * Note that the client will take responsibility for calling freeaddrinfo. */ dogstatsd_client client = dogstatsd_client_ctor(addrs, buf, len, "lang:php"); // do client operations, then dogstatsd_client_dtor(&client); } ``` -------------------------------- ### Install URI Normalization Header File Source: https://github.com/datadog/dd-trace-php/blob/master/zend_abstract_interface/uri_normalization/CMakeLists.txt Copies the 'uri_normalization.h' header file to the installation's include directory for the 'uri_normalization' subfolder during the 'install' command. ```cmake install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/uri_normalization.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/uri_normalization/) ``` -------------------------------- ### Install zai_uri_normalization Target Source: https://github.com/datadog/dd-trace-php/blob/master/zend_abstract_interface/uri_normalization/CMakeLists.txt Installs the 'zai_uri_normalization' target and exports it under the 'ZendAbstractInterfaceTargets' configuration. ```cmake install (TARGETS zai_uri_normalization EXPORT ZendAbstractInterfaceTargets) ``` -------------------------------- ### Install zai_headers Target Source: https://github.com/datadog/dd-trace-php/blob/master/zend_abstract_interface/headers/CMakeLists.txt Installs the 'zai_headers' target and exports it under the 'ZendAbstractInterfaceTargets' configuration. ```cmake install(TARGETS zai_headers EXPORT ZendAbstractInterfaceTargets) ``` -------------------------------- ### Enable Development Mode Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/ApiTools/Latest/README.md After initial installation, enable development mode using Composer. ```bash $ cd path/to/install $ composer development-enable ``` -------------------------------- ### Run Slim Framework Application in Development Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Slim/Version_3_12/README.md Navigate to your application directory and use this command to start the Slim Framework application for development. ```bash cd [my-app-name] php composer.phar start ``` -------------------------------- ### Install Python Module Source: https://github.com/datadog/dd-trace-php/blob/master/appsec/third_party/libxml2/src/CMakeLists.txt Installs the compiled Python module 'LibXml2Mod' to the specified Python installation directory. It handles different configurations for archives, libraries, and runtime components, including PDB files for MSVC. ```cmake install( TARGETS LibXml2Mod ARCHIVE DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT development LIBRARY DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime NAMELINK_COMPONENT development RUNTIME DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime ) if(MSVC AND BUILD_SHARED_LIBS) install(FILES $ DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug) endif() install(FILES python/drv_libxml2.py DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime) ``` -------------------------------- ### Force Download Existing File Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/helpers/download_helper.html This example demonstrates how to download an existing file from your server. The file's content is read into a string before being passed to `force_download()`. ```php $data = file_get_contents("/path/to/photo.jpg"); // Read the file's contents $name = 'myphoto.jpg'; force_download($name, $data); ``` -------------------------------- ### Fetch GET Data with CodeIgniter Input Class Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/libraries/input.html Similar to post(), the input->get() method retrieves GET data. It checks for existence, returns FALSE if not set, and can optionally apply XSS filtering. ```php $this->input->get('some_data', TRUE); ``` ```php $this->input->get(); ``` ```php $this->input->get(NULL, TRUE); ``` -------------------------------- ### Download Tracer for Testing Source: https://github.com/datadog/dd-trace-php/blob/master/tests/randomized/README.md Use 'make library.local' to use a local .tar.gz build or 'make library.download' to fetch from a URL. Ensure this is not run inside a Docker container. ```bash # Use the .tar.gz from /build/packages built locally make library.local # Download from a url make library.download LIBRARY_TEST_URL= ``` -------------------------------- ### Launch Selenium Server Standalone Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Yii/Latest/README.md Start the Selenium Server standalone JAR. Ensure you have downloaded the appropriate version. ```bash java -jar ~/selenium-server-standalone-x.xx.x.jar ``` -------------------------------- ### Install PHP CodeSniffer and Laminas Test Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/Laminas/Mvc/Latest/README.md Installs PHP_CodeSniffer and laminas-test for quality assurance tooling. ```bash composer require --dev squizlabs/php_codesniffer laminas/laminas-test ``` -------------------------------- ### Setting Upload Preferences Source: https://github.com/datadog/dd-trace-php/blob/master/tests/Frameworks/CodeIgniter/Version_2_2/user_guide/libraries/file_uploading.html Shows how to configure upload preferences using an array and passing it to the Upload library constructor or the initialize function. ```php $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $this->load->library('upload', $config); // Alternately you can set preferences by calling the initialize function. Useful if you auto-load the class: $this->upload->initialize($config); ```