# Issue: PHP SNMP extension

**URL:** <https://travis-ci.community/t/issue-php-snmp-extension/1286>\
**Category:** PHP\
**Tags:** issues-migrated\
**Created:** [December 7, 2018, 5:15am UTC](https://travis-ci.community/t/issue-php-snmp-extension/1286 "2018-12-07T05:15:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kris](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kris/32/13_2.png) [@kris](https://travis-ci.community/u/kris)\
**Post date:** [December 7, 2018, 5:15am UTC](https://travis-ci.community/t/issue-php-snmp-extension/1286/1 "2018-12-07T05:15:06Z")

</div>

> <https://github.com/travis-ci/travis-ci/issues/9381>

---

<div class="post-metadata">

**Author:** ![peter279k](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/peter279k/32/1707_2.png) [@peter279k](https://travis-ci.community/u/peter279k)\
**Post date:** [April 29, 2019, 8:53am UTC](https://travis-ci.community/t/issue-php-snmp-extension/1286/2 "2019-04-29T08:53:59Z")

</div>

After researching about the PHP in Travis CI build for the while, it looks like the `phpenv` doesn’t include the `snmp` extension by default.

I give up using the `phpenv` and let `sudo` be required to try installing the `php-7.1` version and `snmp` on Ubuntu 16.04.

It seems that this can be worked successfully.

Here is my `.travis.yml` setting.

```auto
language: php

sudo: required

php:
  - 7.1

before_install:
  - sudo apt-get update
  - sudo apt-get install -y python-software-properties
  - LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ondrej/php
  - sudo apt-get update
  - sudo apt-get install -y apt-transport-https apt-utils curl php7.1-cli php7.1-mysql php7.1-curl php7.1-snmp

script:
  - sudo php -m | grep snmp

```

The related repository is available [here](https://github.com/peter279k/php-travis-snmp).

Here is the [Travis CI build log](https://travis-ci.org/peter279k/php-travis-snmp/builds/525869381).
