<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Installing &#8220;Secure Shell2 (SSH2)&#8221; PHP Extension</title>
	<atom:link href="http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/feed" rel="self" type="application/rss+xml" />
	<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension</link>
	<description>omgz cubicles</description>
	<lastBuildDate>Thu, 01 Dec 2011 13:35:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Shiv</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-8465</link>
		<dc:creator>Shiv</dc:creator>
		<pubDate>Thu, 01 Dec 2011 13:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-8465</guid>
		<description>antonioc, I am facing the same issue. Was you able to resolve it? If yes, please help :/</description>
		<content:encoded><![CDATA[<p>antonioc, I am facing the same issue. Was you able to resolve it? If yes, please help :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Romulous</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-5220</link>
		<dc:creator>Romulous</dc:creator>
		<pubDate>Tue, 01 Mar 2011 03:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-5220</guid>
		<description>Even after patching I get:

 make
/bin/sh /root/sources/ssh2-0.10/libtool --mode=compile cc  -I. -I/root/sources/ssh2-0.10 -DPHP_ATOM_INC -I/root/sources/ssh2-0.10/include -I/root/sources/ssh2-0.10/main -I/root/sources/ssh2-0.10 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /root/sources/ssh2-0.10/ssh2.c -o ssh2.lo
mkdir .libs
 cc -I. -I/root/sources/ssh2-0.10 -DPHP_ATOM_INC -I/root/sources/ssh2-0.10/include -I/root/sources/ssh2-0.10/main -I/root/sources/ssh2-0.10 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/sources/ssh2-0.10/ssh2.c  -fPIC -DPIC -o .libs/ssh2.o
/root/sources/ssh2-0.10/ssh2.c:49: error: duplicate &#039;static&#039;
/root/sources/ssh2-0.10/ssh2.c: In function &#039;zif_ssh2_methods_negotiated&#039;:
/root/sources/ssh2-0.10/ssh2.c:483: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:484: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:485: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:486: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:487: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:488: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:489: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:490: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:491: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:492: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c: In function &#039;zif_ssh2_fingerprint&#039;:
/root/sources/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c: In function &#039;zif_ssh2_poll&#039;:
/root/sources/ssh2-0.10/ssh2.c:885: error: &#039;zval&#039; has no member named &#039;is_ref&#039;
/root/sources/ssh2-0.10/ssh2.c:885: error: &#039;zval&#039; has no member named &#039;refcount&#039;
/root/sources/ssh2-0.10/ssh2.c:895: error: &#039;zval&#039; has no member named &#039;is_ref&#039;
/root/sources/ssh2-0.10/ssh2.c:896: error: &#039;zval&#039; has no member named &#039;refcount&#039;
/root/sources/ssh2-0.10/ssh2.c: In function &#039;zif_ssh2_publickey_add&#039;:
/root/sources/ssh2-0.10/ssh2.c:1005: error: &#039;zval&#039; has no member named &#039;is_ref&#039;
/root/sources/ssh2-0.10/ssh2.c:1006: error: &#039;zval&#039; has no member named &#039;refcount&#039;
/root/sources/ssh2-0.10/ssh2.c:1038: warning: passing argument 1 of &#039;_efree&#039; discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c: In function &#039;zif_ssh2_publickey_list&#039;:
/root/sources/ssh2-0.10/ssh2.c:1097: warning: passing argument 4 of &#039;add_assoc_stringl_ex&#039; discards qualifiers from pointer target type
/root/sources/ssh2-0.10/ssh2.c:1098: warning: passing argument 4 of &#039;add_assoc_stringl_ex&#039; discards qualifiers from pointer target type
make: *** [ssh2.lo] Error 1</description>
		<content:encoded><![CDATA[<p>Even after patching I get:</p>
<p> make<br />
/bin/sh /root/sources/ssh2-0.10/libtool &#8211;mode=compile cc  -I. -I/root/sources/ssh2-0.10 -DPHP_ATOM_INC -I/root/sources/ssh2-0.10/include -I/root/sources/ssh2-0.10/main -I/root/sources/ssh2-0.10 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /root/sources/ssh2-0.10/ssh2.c -o ssh2.lo<br />
mkdir .libs<br />
 cc -I. -I/root/sources/ssh2-0.10 -DPHP_ATOM_INC -I/root/sources/ssh2-0.10/include -I/root/sources/ssh2-0.10/main -I/root/sources/ssh2-0.10 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/sources/ssh2-0.10/ssh2.c  -fPIC -DPIC -o .libs/ssh2.o<br />
/root/sources/ssh2-0.10/ssh2.c:49: error: duplicate &#8216;static&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c: In function &#8216;zif_ssh2_methods_negotiated&#8217;:<br />
/root/sources/ssh2-0.10/ssh2.c:483: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:484: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:485: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:486: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:487: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:488: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:489: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:490: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:491: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:492: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c: In function &#8216;zif_ssh2_fingerprint&#8217;:<br />
/root/sources/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c: In function &#8216;zif_ssh2_poll&#8217;:<br />
/root/sources/ssh2-0.10/ssh2.c:885: error: &#8216;zval&#8217; has no member named &#8216;is_ref&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c:885: error: &#8216;zval&#8217; has no member named &#8216;refcount&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c:895: error: &#8216;zval&#8217; has no member named &#8216;is_ref&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c:896: error: &#8216;zval&#8217; has no member named &#8216;refcount&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c: In function &#8216;zif_ssh2_publickey_add&#8217;:<br />
/root/sources/ssh2-0.10/ssh2.c:1005: error: &#8216;zval&#8217; has no member named &#8216;is_ref&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c:1006: error: &#8216;zval&#8217; has no member named &#8216;refcount&#8217;<br />
/root/sources/ssh2-0.10/ssh2.c:1038: warning: passing argument 1 of &#8216;_efree&#8217; discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c: In function &#8216;zif_ssh2_publickey_list&#8217;:<br />
/root/sources/ssh2-0.10/ssh2.c:1097: warning: passing argument 4 of &#8216;add_assoc_stringl_ex&#8217; discards qualifiers from pointer target type<br />
/root/sources/ssh2-0.10/ssh2.c:1098: warning: passing argument 4 of &#8216;add_assoc_stringl_ex&#8217; discards qualifiers from pointer target type<br />
make: *** [ssh2.lo] Error 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuri Hodges</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-4208</link>
		<dc:creator>Nuri Hodges</dc:creator>
		<pubDate>Tue, 16 Nov 2010 06:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-4208</guid>
		<description>Are you still having this issue, and are you saying it works through CLI but not when accessed from a browser?</description>
		<content:encoded><![CDATA[<p>Are you still having this issue, and are you saying it works through CLI but not when accessed from a browser?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antonioc</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-4158</link>
		<dc:creator>antonioc</dc:creator>
		<pubDate>Thu, 04 Nov 2010 19:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-4158</guid>
		<description>I&#039;m using version libssh2-1.2.7 but am having to run the script error
by apache. PHP works fine.

Error menssage:

-------------------------------------------

[Thu Nov 04 15:03:43 2010] [error] [client 9.18.218.31] PHP Warning:  ssh2_connect() [&lt;a href=&#039;function.ssh2-connect&#039; rel=&quot;nofollow&quot;&gt;function.ssh2-connect&lt;/a&gt;]: Unable to connect to 9.18.218.20 on port 22 in /var/www/html/teste_ssh01.php on line 11

[Thu Nov 04 15:03:43 2010] [error] [client 9.18.218.31] PHP Warning:  ssh2_connect() [&lt;a href=&#039;function.ssh2-connect&#039; rel=&quot;nofollow&quot;&gt;function.ssh2-connect&lt;/a&gt;]: Unable to connect to 9.18.218.20 in /var/www/html/teste_ssh01.php on line 11

-------------------------------------------

Script:

&lt;?php

//Tecmaster
$server = &#039;9.18.218.10&#039;;
$user = &#039;root&#039;;
$pass = &#039;pass&#039;;


if (!function_exists(&quot;ssh2_connect&quot;)) die(&quot;function ssh2_connect doesn&#039;t exist&quot;);

if(!($con = ssh2_connect($server, 22))){
    echo &quot;fail: unable to establish connection\n&quot;;
}
else {

    if(!ssh2_auth_password($con, $user, $pass)) {
        echo &quot;fail: unable to authenticate\n&quot;;
    } else {
        // allright, we&#039;re in!
        echo &quot;okay: logged in...\n&quot;;

        // execute a command
        if (!($stream = ssh2_exec($con, &quot;df -h&quot; ))) {
            echo &quot;fail: unable to execute command\n&quot;;
        } else {
            // collect returning data from command
            stream_set_blocking($stream, true);
            $data = &quot;&quot;;
            while ($buf = fread($stream,4096)) {

                $data .= $buf.&quot;&quot;;
                echo $buf.&quot;&quot;;
            }

            fclose($stream);
        }
    }
}


?&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;m using version libssh2-1.2.7 but am having to run the script error<br />
by apache. PHP works fine.</p>
<p>Error menssage:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>[Thu Nov 04 15:03:43 2010] [error] [client 9.18.218.31] PHP Warning:  ssh2_connect() [<a href='function.ssh2-connect' rel="nofollow">function.ssh2-connect</a>]: Unable to connect to 9.18.218.20 on port 22 in /var/www/html/teste_ssh01.php on line 11</p>
<p>[Thu Nov 04 15:03:43 2010] [error] [client 9.18.218.31] PHP Warning:  ssh2_connect() [<a href='function.ssh2-connect' rel="nofollow">function.ssh2-connect</a>]: Unable to connect to 9.18.218.20 in /var/www/html/teste_ssh01.php on line 11</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Script:</p>
<p>&lt;?php</p>
<p>//Tecmaster<br />
$server = &#039;9.18.218.10&#039;;<br />
$user = &#039;root&#039;;<br />
$pass = &#039;pass&#039;;</p>
<p>if (!function_exists(&quot;ssh2_connect&quot;)) die(&quot;function ssh2_connect doesn&#039;t exist&quot;);</p>
<p>if(!($con = ssh2_connect($server, 22))){<br />
    echo &quot;fail: unable to establish connection\n&quot;;<br />
}<br />
else {</p>
<p>    if(!ssh2_auth_password($con, $user, $pass)) {<br />
        echo &quot;fail: unable to authenticate\n&quot;;<br />
    } else {<br />
        // allright, we&#039;re in!<br />
        echo &quot;okay: logged in&#8230;\n&quot;;</p>
<p>        // execute a command<br />
        if (!($stream = ssh2_exec($con, &quot;df -h&quot; ))) {<br />
            echo &quot;fail: unable to execute command\n&quot;;<br />
        } else {<br />
            // collect returning data from command<br />
            stream_set_blocking($stream, true);<br />
            $data = &quot;&quot;;<br />
            while ($buf = fread($stream,4096)) {</p>
<p>                $data .= $buf.&quot;&#8221;;<br />
                echo $buf.&#8221;";<br />
            }</p>
<p>            fclose($stream);<br />
        }<br />
    }<br />
}</p>
<p>?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuri Hodges</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-3826</link>
		<dc:creator>Nuri Hodges</dc:creator>
		<pubDate>Mon, 26 Jul 2010 20:11:02 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-3826</guid>
		<description>Is this with ssh2_exec that is failing?</description>
		<content:encoded><![CDATA[<p>Is this with ssh2_exec that is failing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: israel</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-3645</link>
		<dc:creator>israel</dc:creator>
		<pubDate>Tue, 30 Mar 2010 00:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-3645</guid>
		<description>My friends
Error:
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect 
Bug resolved with libssh2 1.2.4 ultimate version download from http://www.libssh2.org/</description>
		<content:encoded><![CDATA[<p>My friends<br />
Error:<br />
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect<br />
Bug resolved with libssh2 1.2.4 ultimate version download from <a href="http://www.libssh2.org/" rel="nofollow">http://www.libssh2.org/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tallandy</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-3632</link>
		<dc:creator>tallandy</dc:creator>
		<pubDate>Fri, 19 Mar 2010 14:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-3632</guid>
		<description>Worked great for me on a Centos 5.4 x64 server. However the ssh2 functions only seem to work for php cli not php through apache :&#124; annoying as scripts through apache don&#039;t error either they just dont run the commands. any ideas?</description>
		<content:encoded><![CDATA[<p>Worked great for me on a Centos 5.4 x64 server. However the ssh2 functions only seem to work for php cli not php through apache <img src='http://cubiclegeneration.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' />  annoying as scripts through apache don&#8217;t error either they just dont run the commands. any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: inurinternet</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-3470</link>
		<dc:creator>inurinternet</dc:creator>
		<pubDate>Wed, 06 Jan 2010 02:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-3470</guid>
		<description>Interesting, seems like that could have saved me a lot of headaches, I will probably use that library in the future with other projects.

Thanks!</description>
		<content:encoded><![CDATA[<p>Interesting, seems like that could have saved me a lot of headaches, I will probably use that library in the future with other projects.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: baseddoes</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-3441</link>
		<dc:creator>baseddoes</dc:creator>
		<pubDate>Sun, 20 Dec 2009 06:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-3441</guid>
		<description>I spent days trying to get libssh2 installed and when I succeeded I found that it doesn&#039;t even work half the time, anyway.  ssh2_exec() returns prematurely very frequently and not even calling socket_set_blocking() helps.  I then turned to phpSecLib and it works like a charm:

http://phpseclib.sourceforge.net/

Maybe it&#039;ll help you as well.</description>
		<content:encoded><![CDATA[<p>I spent days trying to get libssh2 installed and when I succeeded I found that it doesn&#8217;t even work half the time, anyway.  ssh2_exec() returns prematurely very frequently and not even calling socket_set_blocking() helps.  I then turned to phpSecLib and it works like a charm:</p>
<p><a href="http://phpseclib.sourceforge.net/" rel="nofollow">http://phpseclib.sourceforge.net/</a></p>
<p>Maybe it&#8217;ll help you as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balan.Mahadevan</title>
		<link>http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension/comment-page-1#comment-1857</link>
		<dc:creator>Balan.Mahadevan</dc:creator>
		<pubDate>Mon, 06 Jul 2009 21:13:56 +0000</pubDate>
		<guid isPermaLink="false">http://cubiclegeneration.com/?p=10#comment-1857</guid>
		<description>Life saver...spent a lot of time to fix this issue.
Thanks.</description>
		<content:encoded><![CDATA[<p>Life saver&#8230;spent a lot of time to fix this issue.<br />
Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

