For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > August 2004 > Help, i'm really desperated









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help, i'm really desperated
Mário gamito

2004-08-25, 8:58 am

Hi,

I need to run this command inside a PHP (web) script, in order to
produce an acl list (url_negados.txt) for squid:

/usr/bin/psql -t knet -c "SELECT url_negado from urls_negados" >
/tmp/urls_negados.txt

I'm using shell_exec to run it.

Well, so far, so good.
The problem is that i must run this command as user postgres, otherwise
it won't work and i can't find a way to do it in PHP :(

Any ideas would be appreciated.
I'm realy desperated.

Warm Regards,
Mário Gamito
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com