# All PHP builds are failing since a few days

**URL:** <https://travis-ci.community/t/all-php-builds-are-failing-since-a-few-days/4516>\
**Category:** PHP\
**Created:** [August 2, 2019, 6:45pm UTC](https://travis-ci.community/t/all-php-builds-are-failing-since-a-few-days/4516 "2019-08-02T18:45:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dregad](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dregad/32/2412_2.png) [@dregad](https://travis-ci.community/u/dregad)\
**Post date:** [August 2, 2019, 6:45pm UTC](https://travis-ci.community/t/all-php-builds-are-failing-since-a-few-days/4516/1 "2019-08-02T18:45:27Z")

</div>

For about 8 days (since build #6060), all of our builds are failing.

[https://travis-ci.org/mantisbt/mantisbt/builds](https://travis-ci.org/mantisbt/mantisbt/builds)  
[https://travis-ci.org/mantisbt/mantisbt/pull\_requests](https://travis-ci.org/mantisbt/mantisbt/pull_requests)

Errors are as follows :

- mysql

```auto
216 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
217 The command "./scripts/travis_before_script.sh" failed and exited with 1 during .

```

- pgsql

```auto
224 psql: could not connect to server: No such file or directory
225 Is the server running locally and accepting
226 connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
227 The command "./scripts/travis_before_script.sh" failed and exited with 2 during .

```

We have not modified anything in our build process, so maybe some recent change in the CI infrastructure is causing this.

Any help in troubleshooting and fixing this issue would be greatly appreciated !

Thanks in advance

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [August 2, 2019, 6:53pm UTC](https://travis-ci.community/t/all-php-builds-are-failing-since-a-few-days/4516/2 "2019-08-02T18:53:23Z")

</div>

Your repo has been migrated to Xenial, where databases are not started by default. Please read

> **[The Travis CI Blog: Ubuntu Xenial 16.04 as the default Travis CI build...](https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment)**
>
> Xenial as the default Travis CI build environment is coming up next week, starting incrementally on Tuesday April 23rd, 2019.
> 
> Since Ubuntu 14.04 reaches End of Life on April 30th, 2019, we’ll be g...

and either:

1. Explicitly stay with Trusty with `dist: trusty`, or
2. Start DB accordingly.

---

<div class="post-metadata">

**Author:** ![dregad](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dregad/32/2412_2.png) [@dregad](https://travis-ci.community/u/dregad)\
**Post date:** [August 3, 2019, 11:51am UTC](https://travis-ci.community/t/all-php-builds-are-failing-since-a-few-days/4516/3 "2019-08-03T11:51:54Z")

</div>

@BanzaiMan thanks for the fast reply !

Indeed this is it. What threw me off is that the build for the same branch, was working properly on my fork :

- [https://travis-ci.org/mantisbt/mantisbt/builds/567069608](https://travis-ci.org/mantisbt/mantisbt/builds/567069608) **fail**
- [https://travis-ci.org/dregad/mantisbt/builds/567069384](https://travis-ci.org/dregad/mantisbt/builds/567069384) **pass**

Turns out I am still running on Trusty, for some reason my fork was not yet migrated.

I’ll adapt our travis.yml file accordingly.

Many thanks for your help !  
Damien
