When i try to execute a program from php5 on my debian, the webpage freeze and the program do nothing. This script works when i call it from the command line. Safe mode is disabled. Echo stdout doesnt work (because of the freeze). I read some answers in google which tells of www permissions but if someone here have a quick and simple response...
Bu hata ayıklama nasıl?
The php call
exec("expect scripts/sshtest.exp $module");
The script code (which i found here http://bash.cyberciti.biz/security/expect-ssh-login-script/)
#!/usr/bin/expect -f
# set Variables
set module [lrange $argv 0 0]
set timeout -1
# rsync
spawn rsync -aCb --progress --delete --backup-dir=/var/www/blabla.com/rsyncBackups/BackupedFilesFromServer23_on_ /var/www/blabla/$module -e ssh root@10.10.10.10:/root/$module
match_max 1000000
# Look for passwod prompt
expect "*?assword:*"
# Send password
send -- "THEPASSWORD\r"
# send blank line (\r) to make sure we get back to gui
send -- "\r"
expect eof