# PHPAGI errors

**URL:** <https://community.asterisk.org/t/phpagi-errors/35174>\
**Category:** Asterisk Support\
**Created:** [May 9, 2011, 4:23pm UTC](https://community.asterisk.org/t/phpagi-errors/35174 "2011-05-09T16:23:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![miraTech](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miraTech](https://community.asterisk.org/u/miraTech)\
**Post date:** [May 9, 2011, 4:23pm UTC](https://community.asterisk.org/t/phpagi-errors/35174/1 "2011-05-09T16:23:20Z")

</div>

Hi every body,

I tried to use PHPAGI in order to use php script interacting with my Asterisk 1.4.41. In addition, I copied phpagi.php, phpagi-asmanager.php, phpagi-fastagi.php et mkdocs.php in /var/lib/asterisk/agi-bin.  
I wanted to try some examples on the internet but I had some troubles, Here are Asterisk errors:  
error[22764]:utils.c :968 ast\_carefulwrite : write() returned error : Broken pipe (this message is shown many times)  
AGI script test.php completed, returning 0  
Auto fallthrough channel ‘SIP/\*\*\*\*\*’ status is ‘UNKNOWN’

Can anyone help me?

Thanks

---

<div class="post-metadata">

**Author:** ![Samael28](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@Samael28](https://community.asterisk.org/u/Samael28)\
**Post date:** [May 9, 2011, 6:03pm UTC](https://community.asterisk.org/t/phpagi-errors/35174/2 "2011-05-09T18:03:48Z")

</div>

Different permissions? Asterisk runs as root?

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [May 9, 2011, 8:02pm UTC](https://community.asterisk.org/t/phpagi-errors/35174/3 "2011-05-09T20:02:08Z")

</div>

The script closed its standard input prematurely, and possibly failed even to start.

---

<div class="post-metadata">

**Author:** ![miraTech](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miraTech](https://community.asterisk.org/u/miraTech)\
**Post date:** [May 10, 2011, 6:46am UTC](https://community.asterisk.org/t/phpagi-errors/35174/4 "2011-05-10T06:46:06Z")

</div>

Thanks for your replies.  
Yes Asterisk is run as root, I wonder if there is something missing?  
am here for any information that may help you to understand what is the matter.  
Thanks a lot

Have a nice day 😄

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [May 10, 2011, 8:04am UTC](https://community.asterisk.org/t/phpagi-errors/35174/5 "2011-05-10T08:04:42Z")

</div>

Try running the script outside of Asterisk. That will pick up obvious missing components and syntax errors, but not incorrect PATHs or run time checked syntax.

---

<div class="post-metadata">

**Author:** ![miraTech](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miraTech](https://community.asterisk.org/u/miraTech)\
**Post date:** [May 10, 2011, 4:10pm UTC](https://community.asterisk.org/t/phpagi-errors/35174/6 "2011-05-10T16:10:27Z")

</div>

That is exactly what I did and it works fine 😄 . But there is a thing that I am not so sure, in my script, I add extensions dynamically, and I have a message on asterisk CLI that extensions are added sucessfully, when I execute dialplan show I found them too, but not in extensions.conf, are they stocked some where?  
Thanks a lot for you time.
