הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   יש פקודה שמריצה פקודה ב ssh? (https://hosts.co.il/forums/showthread.php?t=13326)

psycho 19-01-06 21:53

ידוע לכם שצריך להתקין על השרת את ה LIB של זה , כן?
זה לא ב כ default בשרתים

*ממה שזכור לי

Ido`s 19-01-06 21:56

מאיפה משיגים את הספריה?
(שאני אתן לבעל השרת להתקין)

Ori The Man 19-01-06 22:23

עשיתי את מה שהייתי צריך וזה עושה לי
Call to undefined function: ssh2_connect()
זאת אומרת שהפונקציה לאמאושרת בשרת?
כאילו השרת לא מכיר את הפונקציה?

Sagi 19-01-06 22:24

תשתמש ב
system
רק צריך שהיה על האיחסון php safe mode כבוי

Ori The Man 19-01-06 22:29

לפי ה phpinfo
safe_mode Off Off

שקד 19-01-06 22:33

ציטוט:

נכתב במקור על ידי Ori The Man
לפי ה phpinfo
safe_mode Off Off

תיקרא פה לגבי זה. מה דרוש ומה צריך לעשות
http://il2.php.net/manual/en/ref.ssh2.php

Ori The Man 19-01-06 22:40

צריך להוריד את כל הדברים האלה ושבעל השרת יתקין??
סיפור
אי אפשר לעשות את זה איכשהו יותר פשוט?

Ori The Man 19-01-06 23:11

טוב עשיתי כל מה ששצריך עכשיו זה עושה לי כזה דבר

Warning: ssh2_connect() [function.ssh2-connect]: Error starting up SSH connection(-2): Timeout waiting for banner in D:\wamp\www\file.php on line 11

Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to 0.0.0.0 in D:\wamp\www\file.php on line 11

Warning: ssh2_auth_password() expects parameter 1 to be resource, boolean given in D:\wamp\www\file.php on line 12

Warning: ssh2_exec() expects parameter 1 to be resource, boolean given in D:\wamp\www\file.php on line 14

וזה הקוד
PHP קוד:

<?php

$connection
=ssh2_connect('ip'22);
$con=ssh2_auth_password($connection'user''pass');

ssh2_exec($connection'command');

?>


שקד 20-01-06 07:52

ציטוט:

נכתב במקור על ידי Ori The Man
טוב עשיתי כל מה ששצריך עכשיו זה עושה לי כזה דבר

Warning: ssh2_connect() [function.ssh2-connect]: Error starting up SSH connection(-2): Timeout waiting for banner in D:\wamp\www\file.php on line 11

Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to 0.0.0.0 in D:\wamp\www\file.php on line 11

Warning: ssh2_auth_password() expects parameter 1 to be resource, boolean given in D:\wamp\www\file.php on line 12

Warning: ssh2_exec() expects parameter 1 to be resource, boolean given in D:\wamp\www\file.php on line 14

וזה הקוד
PHP קוד:

<?php

$connection
=ssh2_connect('ip'22);
$con=ssh2_auth_password($connection'user''pass');

ssh2_exec($connection'command');

?>


נסה ככה:
PHP קוד:

$connection=ssh2_connect('ip'22);
ssh2_auth_password($connection'user''pass');


ssh2_exec($connection'command'); 


Ori The Man 20-01-06 12:53

אותו דבר


כל הזמנים הם GMT +2. הזמן כעת הוא 09:06.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ