Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Ajai Khattri
On Fri, 31 Jul 2009, CED wrote: > Play VERY carefully. Or just use FTP/SCP and dont mess with any security settings. -- Aj. ___ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/s

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread CED
Leam Hall wrote: CED wrote: Leam Hall wrote: http://forums.fedoraforum.org/showthread.php?t=159677 [r...@leam ~]# grep -i tty /etc/sudoers Defaultsrequiretty That might help. :) Leam Please DO NOT use Leam's example... "Defaults requiretty" is a global sudoers security default, c

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
Thank you. Michele > -Original Message- > From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of CED > Sent: Friday, July 31, 2009 8:39 PM > To: NYPHP Talk > Subject: Re: [nyphp-talk] SSH2_CONNECT > > > I'll take the bait... > > No, you most certainly s

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
CED wrote: Leam Hall wrote: http://forums.fedoraforum.org/showthread.php?t=159677 [r...@leam ~]# grep -i tty /etc/sudoers Defaultsrequiretty That might help. :) Leam Please DO NOT use Leam's example... "Defaults requiretty" is a global sudoers security default, change the default

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread CED
Leam Hall wrote: http://forums.fedoraforum.org/showthread.php?t=159677 [r...@leam ~]# grep -i tty /etc/sudoers Defaultsrequiretty That might help. :) Leam Michele Waldman wrote: Thank you. sudo: sorry, you must have a tty to run sudo I don't know how to resolve this. Michele

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread CED
I'll take the bait... No, you most certainly shouldn't do this at all. Adjusting the defaults to sudoers is a big no no. Whatever it is you are doing, the need to become root is far different than Ken's example of becoming Ken. The reason that you can't make this work properly has everythi

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
http://forums.fedoraforum.org/showthread.php?t=159677 [r...@leam ~]# grep -i tty /etc/sudoers Defaultsrequiretty That might help. :) Leam Michele Waldman wrote: Thank you. sudo: sorry, you must have a tty to run sudo I don't know how to resolve this. Michele -Original Message-

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
Thank you. sudo: sorry, you must have a tty to run sudo I don't know how to resolve this. Michele > -Original Message- > From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of Leam Hall > Sent: Friday, July 31, 2009 8:22 PM > To: NYPHP Talk > Subject: Re

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
Drat! That's my favorite reading. :) Couple more ideas, based on an OS perspective. If it's a PHPism, I'm not so good... If the copy_sites program is a script and not a binary, edit it early on to create a temporary file. For example, put in a like "echo guido > /tmp/woo-hoo". See if it wri

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
Also, maybe change "2> /dev/null" to 2>/tmp/error.log to see what it says. Leam Leam Hall wrote: Hey Michele. Can you edit /etc/sudoers? You might be able to give it the NOPASSWD option, to at least shorten it a bit. Can you read /var/log/messages and the web server log to see if they say

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
I didn't see anything in /var/log/messages. Michele > -Original Message- > From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] > On Behalf Of Leam Hall > Sent: Friday, July 31, 2009 7:58 PM > To: NYPHP Talk > Subject: Re: [nyphp-talk] SSH2_CONNECT > > Hey Michele. >

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Leam Hall
Hey Michele. Can you edit /etc/sudoers? You might be able to give it the NOPASSWD option, to at least shorten it a bit. Can you read /var/log/messages and the web server log to see if they say anything? Leam Michele Waldman wrote: So I rewrote the code in bash due to my client's concern a

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Michele Waldman
So I rewrote the code in bash due to my client's concern about bandwidth. Here's my new problem: $msg = exec("echo $password | sudo /home/user/site_util/copy_sites $id 2> /dev/null"); The script isn't running. Since it's running from http, I modified the user nobody to have /bin/bash in /etc/pas

Re: [nyphp-talk] Best Cell Phone for a PHP Programmer

2009-07-31 Thread Ajai Khattri
On Tue, 28 Jul 2009, Peter Sawczynec wrote: > So, as I see it -- natively Android will only sync with Outlook > Contacts. > > So can one get full Outlook Contacts/Email/Tasks sync to myTouch. > > Does one ad hoc this by first, setup a google Calendar. > Sync Outlook to Calendar. Calendar to myTou

Re: [nyphp-talk] table structure for "friend" relationships

2009-07-31 Thread Paul A Houle
Hans Zaunere wrote: In many modern web application, relational pedantic have been fading. Denormalization is often a good thing, and very large sites are in fact highly denormalized. This is due to the type of data they need to store (friend relationships is a classic one), and the level of thro

Re: [nyphp-talk] table structure for "friend" relationships

2009-07-31 Thread Hans Zaunere
All, > > I'm thinking the multi-table joins performed twice for each search > > will make more of a hit in performance (and maintenance) than > > writing two rows for each relationship and then always being able to > > search only once. > > I've used code like that successfully for 4 years. I'm n

Re: [nyphp-talk] About the site structure article

2009-07-31 Thread Ole Aass
yeah ofc the best way is to put it outside the root, but like the article sais, not all hosts provide with that, and not all can use *.inc either.. So from the little i know about php, checking if the constant is defined, then give/deny access would make it abit more secure.. ___

Re: [nyphp-talk] table structure for "friend" relationships

2009-07-31 Thread tedd
At 3:02 PM -0500 7/30/09, Allen Shaw wrote: Hi Gang, To support "friend" relationships in a contacts management database, I'm expecting to use a simple table like this one (plus a few columns for unique id, etc.): CREATE TABLE `tcontactrelationships` ( `contact1` int(11), `contact2` int(11

Re: [nyphp-talk] SSH2_CONNECT

2009-07-31 Thread Kenneth Dombrowski
On 09-07-30 17:05 -0400, Ajai Khattri wrote: > Most probably your PHP script will be running under the same username as > Apache (i.e. www or nobody) so sudo wouldn't work anyway. (And you > wouldn't want to give www or nobody sudo privilege anyway!). All this talk about sudo not working made me