# Elasticsearch-php auth error

**URL:** <https://discuss.elastic.co/t/elasticsearch-php-auth-error/18101>\
**Category:** Elasticsearch\
**Created:** [June 13, 2014, 6:18pm UTC](https://discuss.elastic.co/t/elasticsearch-php-auth-error/18101 "2014-06-13T18:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Marx](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Patrick\_Marx](https://discuss.elastic.co/u/Patrick_Marx)\
**Post date:** [June 13, 2014, 6:18pm UTC](https://discuss.elastic.co/t/elasticsearch-php-auth-error/18101/1 "2014-06-13T18:18:28Z")

</div>

Hi,  
I've been using the php client successfully with a remote server, and I've  
set up a new server and run into auth problems using the PHP client  
library.

$clientParams['connectionParams']['auth'] = array(  
'user',  
'pw',  
'Basic'  
);

My issue is now I get back a 401 Authentication Required every time I try  
to hit the endpoints using the PHP client but I've gone on the chrome  
extension Postman to try sending some basic auth requests using the user/pw  
and the server responds correctly. Any ideas what might cause this or how  
to go about debugging?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8fc0743b-d3a9-4b4c-9484-deb647707afd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8fc0743b-d3a9-4b4c-9484-deb647707afd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:22am UTC](https://discuss.elastic.co/t/elasticsearch-php-auth-error/18101/2 "2017-07-06T01:22:38Z")

</div>

Closed on July 6, 2017, 1:22am UTC


