Re: ssh2_connection for Web service

From: Date: Wed, 24 Mar 2010 21:16:19 +0000
Subject: Re: ssh2_connection for Web service
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-303381@lists.php.net to get a copy of this message
It may be a permission problem. When you try "php index.php", then its 'your-username' is trying to SSH. But when you run the script through webserver, the user 'apache' is trying to SSH. Can you just check this once. Thanks, Vikash Kumar -- http://vika.sh On Thu, Mar 25, 2010 at 2:28 AM, Le-shin Wu <leshin@gmail.com> wrote: > I can successfully create a ssh connection within a index.php file by using > ssh2_connect(). But when I try to create a web service by using the same > code, I got "Unable to connect to a.b.c.d (IP address) on port 22" error. > In > other words, if I run the command "php index.php" under shell prompt, it > works perfectly; but if I request the same file through my Web browser ( > http://mydomain/index.php), I got an unable to connect error. > Is there > someone having any idea about that. Thanks a lot for your help. (REHL 5 > with > PHP 5.1.6) >

« previous php.general (#303381) next »