为php提供ssh2的支持
原贴:http://www.haw-haw.org/node/150
用来在php程序里方便的连到远程主机
执行程序
并取回结果
首先,系统需要已经装有openssl和openssl-devel包
rpm -qa | grep openssl
然后,安装libssh2
当下来源代码后
./configure && make all install
再然后,安装PECL/ssh2
可以用命令pear install ssh2
(眼前可能只能用pear install ssh2-beta
)
或者是去PECL/ssh2
当下来源代码
然后
phpize && ./configure –with-ssh2 && make
再然后把生成的ssh2.so
文件拷贝到php.ini
中申明的extension_dir
目录下(这里是/usr/lib/php4)
cp modules/ssh2.so /usr/lib/php4/
再在/etc/php.d目录下新建一个文件ssh2.ini
echo "extension=ssh2.so" > /etc/php.d/ssh2.ini
再重起web server,让其重读php.ini
搞定
原创文章,转载请注明:
转载自嘻嘻哈哈的部落格(blog)
本文链接地址:
为php提供ssh2的支持
相关文档:
If you want to put some big table in the pdf file, you may got the layout messy. One way to solve the problem is to change the paper size. In "includes/cpdf_adapter.cls.php", Change the size you used in the array to whatever you want.
One tip: Replace Url into Clickable link.
$tex ......
<?php
$conn = "what's the fucking";
?>
<mce:script type="text/javascript"><!--
var innn = "<?php echo $conn ?>";
document.write(innn);
// --></mce:script>
php和JavaScript的变量不能通用,但当我们需要在一个页面使用同一个变量时,可以 ......
环境:在linux 系统下安装好PHP+mysql +apache环境发现PHP没有支持pdo_mysql扩展于是决定重新编译PHP,其中mysql采用rpm方式安装
尝试:./configure --with-apxs2=/usr/local/apache/bin/apxs --with-iconv --with-oci8=instantclient,/usr /lib/oracle/10.2.0.1/client/lib --with-mysql=/usr/local/mys ......