All Questions
15 questions
1
vote
4
answers
1k
views
Parallel execution of remote commands
The setup:
I have a PHP script (currently written for PHP5.5, but the server it runs from has 7.4) that processes files that contain lists of linux servers, then runs a bash or perl script via ssh on ...
0
votes
2
answers
898
views
Issue update PHP 7 on CentOS 7
I would like to update PHP 7.0.2.6 to the latest 7.2 version on my CentOS 7 server (with DirectAdmin installed) via SSH. I found many procedures on the internet, but none of them seems to work. I was ...
0
votes
1
answer
415
views
How can I install SSH PHP library similar to Ubuntu's libssh2-php on Fedora28?
On Ubuntu there is the lib mentioned above:
sudo apt-get install libssh2-php
But where can I found it on Fedora?
Any idea?
2
votes
2
answers
22k
views
Enabling shell script to run as different user with PHP
I have shell script called copy.sh in my web root directory with following lines on it
rsync -rzv -e 'ssh -p 199' test.txt [email protected]:/home/testuser/txt
ssh [email protected] -p 199 ....
0
votes
2
answers
3k
views
Using Screens with a PHP Script
I found an external developer to make me a PHP script to 'snipe' Mineraft usernames.
In order for it to operate, I have to start the script from the command line using this:
php -f sniper.php > ...
0
votes
1
answer
170
views
bash PHP versus Plesk domain installed PHP
I have configured my domain to use PHP 5.5.30 ... but when I SSH into the server, bash is telling me that the php -v is 5.4.13
Why does bash use a different version of PHP, even though when running ....
0
votes
1
answer
97
views
Update /bin/usr/php in CentOS 6 [duplicate]
I have Plesk 12.5 installed, and it allows you to install multiple versions of PHP to be selectable within hosting spaces (domains), but the issue I've having right now is that the php that is being ...
6
votes
2
answers
21k
views
Change PHP PATH Variable for SSH [duplicate]
I'm trying to figure out how to change which version of PHP the php alias uses...
I want it to use: /opt/plesk/php/5.6/bin/php
But it currently uses: /usr/bin/php (I think)
How can I ensure that ...
8
votes
3
answers
46k
views
Using nohup to keep a script running indefinitely
I am very new to Linux and I've only been using it to SSH to my web server using Putty. The issue I am having is this:
Basically I've got 2 php scripts. One get_tweets.php constantly listens for ...
0
votes
1
answer
994
views
Can't terminate PHP daemon process
I've started a PHP daemon process via SSH with
php ./my-script.php --daemon
Now I want to quit this process, but I can't.
It's still active in the foreground of my shell and I've hit CTRL + C ...
2
votes
0
answers
4k
views
Can't Install ImageMagick on Centos using Yum
I am trying to install ImageMagick on my dedicated-virtual Centos server for use with PHP.
I first ran the following commands successfully:
# yum install gcc php-devel php-pear
# yum install ...
1
vote
2
answers
2k
views
PHP exec expect script with SCP then SSH
I have a PHP page which runs the following expect script to upload a file to another server on my network:
#!/usr/bin/expect -f
set password [lindex $argv 0]
spawn /usr/bin/scp /home/Dave/bin/test ...
11
votes
2
answers
24k
views
Find out screen id
I want to start a program with SSH using PHP, which works fine, but now I want to kill the screen with PHP, but the only thing I know is the name of the screen. How do I find out the screen ID (...
1
vote
2
answers
7k
views
PHP exec command has the result 0 even if an error occurs
I have this PHP code:
$execout=exec('ssh [email protected] "sudo /etc/init.d/smokeping reload"',$output1,$result);
if($result !=0){
echo"that can't reload";
}
else{
echo "successfully ...
0
votes
2
answers
4k
views
How to check that ssh login was successful in a script?
I do run ssh server "svn info /path/to/codebase" from php. It works fine but I wan to know how to check if the ssh login was not successful.
I want to check from my php script that ssh server is up ...