Why don't work my AGI?

I can’t put the value on my database

this is my php agi script

#!/usr/bin/php –q

<?php function agent_call($id,$agente){ include("db/conn.php"); $sql = "insert into calls(id,agente)values($id,'$agente')"; $conn->Execute($sql); } agent_call($argv[1],$argv[2]); exit(0); ?>

and this is my macro that call my agi

[macro-mymacro]
exten => s,1,NoOp(-------------------- MY AGENT IS : ${MEMBERINTERFACE} ${MEMBERNAME} -------------------)
exten => s,n,AGI(test/tt.php,${CALLERID(num)},${MEMBERINTERFACE})

If execute my php by console work fine

helpme please!!

Thank’s!!!

All my php files with chmod 755

SELinux might be your problem, especially under CentOS 6.

Check /var/log/audit/audit.log for error messages.