# Chapter 6: Error Run php sendPushes.php

**URL:** <https://forums.kodeco.com/t/chapter-6-error-run-php-sendpushes-php/158966>\
**Category:** Push Notifications by Tutorials\
**Created:** [November 30, 2021, 10:20am UTC](https://forums.kodeco.com/t/chapter-6-error-run-php-sendpushes-php/158966 "2021-11-30T10:20:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon40008881](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@anon40008881](https://forums.kodeco.com/u/anon40008881)\
**Post date:** [November 30, 2021, 10:20am UTC](https://forums.kodeco.com/t/chapter-6-error-run-php-sendpushes-php/158966/1 "2021-11-30T10:20:50Z")

</div>

I’m stuck at this for hours and searched in forums, couldn’t find the answer.

After successfully tested notifications using `HTTPie`, I got some errors when `Run php sendPushes.php` in terminal, it says:

> Fatal error: Uncaught PDOException: SQLSTATE[08006] [7] connection to server at “localhost” (::1), port 5432 failed: FATAL: password authentication failed for user “apns” in /Users/abc/Desktop/sendPushes.php:17
> 
> Stack trace:
> 
> #0 /Users/abc/Desktop/sendPushes.php(17): PDO-\>\_\_construct(‘pgsql:host=loca…’)
> 
> #1 {main}
> 
> thrown in /Users/abc/Desktop/sendPushes.php on line 17

and in Docker it shows this:

> webservice-db-1 | 2021-11-30 10:09:37.148 UTC [118] FATAL: password authentication failed for user “apns”  
> webservice-db-1 | 2021-11-30 10:09:37.148 UTC [118] DETAIL: Role “apns” does not exist.

It seems like it’s something wrong with `user` and `password` in `$db = new PDO('pgsql:host=localhost;dbname=apns;user=apns;password=password');` ? But I followed the book several times and can’t find somewhere say these parameters need to be specified.

The` AUTH_KEY_PATH` , `AUTH_KEY_ID`, `TEAM_ID` and `BUNDLE_ID` have all been set correctly.

---

<div class="post-metadata">

**Author:** ![gargoyle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gargoyle/32/107285_2.png) [@gargoyle](https://forums.kodeco.com/u/gargoyle)\
**Post date:** [December 6, 2021, 10:10pm UTC](https://forums.kodeco.com/t/chapter-6-error-run-php-sendpushes-php/158966/2 "2021-12-06T22:10:17Z")

</div>

@anon40008881 First off, let me apologize for the late reply. I injured my back and have been out on medical leave. As to your issue, the problem is that the docker-compose.yml file has incorrect database connection details. If you edit that file you’ll see variables like so:

```auto
  DATABASE_HOST: db
  DATABASE_NAME: vapor_database
  DATABASE_USERNAME: vapor_username
  DATABASE_PASSWORD: vapor_password

```

You need to modify those to have the correct values. Note that the name, username and password are set twice in the file.

I’m going to be working on an update for this book around February, and I’ll make sure to fix these missing instructions in the updated version!

---

<div class="post-metadata">

**Author:** ![anon40008881](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@anon40008881](https://forums.kodeco.com/u/anon40008881)\
**Post date:** [December 8, 2021, 7:36am UTC](https://forums.kodeco.com/t/chapter-6-error-run-php-sendpushes-php/158966/3 "2021-12-08T07:36:15Z")

</div>

@gargoyle Thanks for reply, now I could send notifications!

---

<div class="post-metadata">

**Author:** ![erikuecke](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/erikuecke/32/105896_2.png) [@erikuecke](https://forums.kodeco.com/u/erikuecke)\
**Post date:** [November 14, 2022, 9:02pm UTC](https://forums.kodeco.com/t/chapter-6-error-run-php-sendpushes-php/158966/4 "2022-11-14T21:02:28Z")

</div>

Unfortunately even after updating the .yml file I am still receiving the same error regarding the line 18 of the .php file. `$db = new PDO('pgsql:host=localhost;dbname=apns;user=apns;password=password');`

Is there an update to the book coming soon with missing steps noted?
