PS we even have issues between webservers, only about 1 in 3 requests using /usr/bin/whois actually works (Im just reloading the page each time) the rest result in getting nothing from the whois query.
On Sun, Sep 1, 2013 at 8:18 PM, John <[email protected]> wrote: > Why are the variables different on different servers? this is just begging > to cause headaches. Can we please stop murdering poor kittens and ensure > things are uniform between the servers? See > http://commons.wikimedia.org/wiki/File:Server-kitty.jpg > > > On Sun, Sep 1, 2013 at 8:14 PM, Marc A. Pelletier <[email protected]>wrote: > >> On 09/01/2013 04:08 PM, John wrote: >> > result = popen(u'whois -h whois.cymru.com <http://whois.cymru.com> " -v >> > -f %s"' % IP).read() >> > should give the whois results however I am getting a zero size response >> > when run from the web, however when ran from term it works fine...... >> >> You are relying on the PATH variable for your executable which is, IIRC, >> set to only /bin by apache. Invoking /usr/bin/whois explicitly will >> remove that dependency and be considerably more secure to boot (there is >> no risk that a path be injected into your script and make it execute the >> wrong binary). >> >> -- Marc >> >> >> _______________________________________________ >> Labs-l mailing list >> [email protected] >> https://lists.wikimedia.org/mailman/listinfo/labs-l >> > >
_______________________________________________ Labs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/labs-l
