PHP fatal error:call to undefined function ssh2_connect () Related issues!

Source: Internet
Author: User
PHP fatal error:call to undefined function ssh2_connect () Proble m!!!
In the Win7 under the mysql+apache+php environment, now want to use PHP via SSH to execute commands on the remote server, refer to the online tutorial in php.ini to add Extension=php_ssh2.dll, and Php_ Ssh2.dll put Ext,extension_dir configuration no problem, but error: Fatal error:call to undefined function ssh2_connect () in D:\phpweb\ssh2\ Ssh.php on line 2 look at you expert pointing twos.

PHP.ini in the Extensions section:
; Extension=php_bz2.dll
Extension=php_curl.dll
Extension=php_dba.dll
Extension=php_dbase.dll
; Extension=php_exif.dll
; Extension=php_fdf.dll
Extension=php_gd2.dll
; Extension=php_gettext.dll
; Extension=php_gmp.dll
; Extension=php_ifx.dll
; Extension=php_imap.dll
; Extension=php_interbase.dll
Extension=php_ldap.dll
; Extension=php_mbstring.dll
; Extension=php_mcrypt.dll
Extension=php_mhash.dll
Extension=php_mime_magic.dll
Extension=php_ming.dll
Extension=php_msql.dll
Extension=php_mssql.dll
Extension=php_mysql.dll
Extension=php_mysqli.dll
; Extension=php_oci8.dll
Extension=php_openssl.dll
; Extension=php_pdo.dll
; Extension=php_pdo_firebird.dll
Extension=php_pdo_mssql.dll
Extension=php_pdo_mysql.dll
; Extension=php_pdo_oci.dll
; Extension=php_pdo_oci8.dll
; Extension=php_pdo_odbc.dll
; Extension=php_pdo_pgsql.dll
; Extension=php_pdo_sqlite.dll
Extension=php_pgsql.dll
; Extension=php_pspell.dll
Extension=php_shmop.dll
; Extension=php_snmp.dll
; Extension=php_soap.dll
Extension=php_sockets.dll
; Extension=php_sqlite.dll
; Extension=php_sybase_ct.dll
Extension=php_tidy.dll
Extension=php_xmlrpc.dll
Extension=php_xsl.dll
; Extension=php_zip.dll
Extension=php_ssh2.dll

The PHP code is as follows:
PHP Code
  <!--?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username','password');
¥stream=ssh2_exec($connection, 'usr/local/bin/php -i');
?-->

 


------Solution--------------------
Is your host configured to shell.example.com this domain name
------Solution--------------------
discuss

Is your host configured to shell.example.com this domain name

Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.