Answer to your problem is in your pop Apache module configuration. I would suggest to look how different your cli php.ini file is in comparison to your Apache php module php.ini file Also I would not follow the suggestion of adding Apache user to sudoers. It's quite high risk move in security-wise Arthur Moczulski On 28 Jul 2011 19:16, "Bulent Malik" <bmalik@xxxxxxxxxxxx> wrote: > > > > > >> did you try it in shell? or just You tried it in PHP? > > Yeah, I tried it on shell and it works on it. Also if I execute it as > command line, it works ; > > php test.php > > But when I try it on www ( internet explorer, firefox, chrome ..) it > doesn't work. > >