10-27-2010
SSH Connection drops - but does my script keep running?
Hello there.
I'm fairly new to Linux, but I am connecting via SSH and PuTTY to a remote server, and I am running a fairly heavy MySQL script in a PHP page.
Our connection here is dodgy to say the least and I get continuous disconnections.
My question is, when I get disconnected, does my script carry on, or does it end after doing the query it was on when I get disconnected.
The problem I have, is that the first thing the PHP script does is run a big query that takes upto 10 minutes to complete, before looping through all the records.
The big query is the bit its on when I get disconnected, and I don't know whether the script is getting to the loop or not...
Thanks, Chris
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello All,
I wonder if you can help me...
Let me give you some set-up details before I ask you the question.
I have Ultra-60 at home with Solaris 9 and recommended patch cluster installed. The machine is connected to a Linksys WAG54G ADSL router/modem through RJ45 ethernet cable. The... (2 Replies)
Discussion started by: ahmerin
2 Replies
2. Shell Programming and Scripting
Hi,
I am new to Shell Scripting. Can anybody help me in writing a Script Which Could Login from a Unix box to a Remote Unix box which accepts the user credentials automatically and display the result for checking the Disk Space Utilisation (Without running any SSH agent). (1 Reply)
Discussion started by: ajith_tg
1 Replies
3. Shell Programming and Scripting
Hi all,
I'm writing a script that chooses the best computer available in an open lab. The script works great except every now and then there is a dead computer in the lab that begins the ssh handshaking, but freezes after the following:
debug1: Offering public key:
When the script happens... (2 Replies)
Discussion started by: x-375HK-x
2 Replies
4. Shell Programming and Scripting
Hi all, I connect with SSH connection to remote machine in the script and ı want to logout at half of the script then continue to script. If ı write exit in the script it terminates script not SSH connection. How can i do that please help me (1 Reply)
Discussion started by: fozay
1 Replies
5. Shell Programming and Scripting
here's the sitch:
remote freeBSD device. I am ssh'd in as root and running cgsecurity's TESTDISK program. Testdisk will take DAYS to scan this multi-terabyte RAID. Can I quit my terminal or ssh connection, disconnect from the remote computer, come back to it later and NOT stop or interrupt the... (3 Replies)
Discussion started by: jccbin
3 Replies
6. Shell Programming and Scripting
Hi all,
Im new at scripting and i need to run a few commands at work every hours so i decide to make a script but on 1 of the steps i have a the follwoing problem:
The command i do is this:
#!/bin/bash
ssh root@asdasd001 'mysql -h A-db-1 -uroot -password --execute "show slave status"'... (3 Replies)
Discussion started by: Aparicio
3 Replies
7. Shell Programming and Scripting
Hi all,
I need ssh in shell script. My requirement is:
- Take user_name and password from user (in PHP)
- Pass this to shell script which will:
- connect via ssh
- Run sql query
- Pass the results back in PHP
- Put the results to website.
I know PHP has libraries for ssh and ftp, but... (3 Replies)
Discussion started by: shekhar2010us
3 Replies
8. Red Hat
Hi, Here is the issue: Any SSH connection to this server drops in 5 minutes.
# date
Wed Jul 18 17:11:27 GMT 2012 (Note: use GMT)
# grep Alive /etc/ssh/sshd_config
#TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 100
# ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul... (9 Replies)
Discussion started by: aixlover
9 Replies
9. UNIX for Advanced & Expert Users
Hi everybody,
I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop.
I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not...
I have .sh script like below and i have servers.txt contains all the list of servers
#/bin/bash
for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies
LEARN ABOUT PHP
ingres_prepare
INGRES_PREPARE(3) 1 INGRES_PREPARE(3)
ingres_prepare - Prepare a query for later execution
SYNOPSIS
mixed ingres_prepare (resource $link, string $query)
DESCRIPTION
Prepares a query for execution by ingres_execute(3).
The query becomes part of the currently open transaction. If there is no open transaction, ingres_query(3) opens a new transaction. To
close the transaction, you can call either ingres_commit(3) to commit the changes made to the database or ingres_rollback(3) to cancel
these changes. When the script ends, any open transaction is rolled back (by calling ingres_rollback(3)). You can also use ingres_autocom-
mit(3) before opening a new transaction to have every SQL query immediately committed.
Note
Related Configurations
See also the ingres.describe, ingres.scrollable and ingres.utf8 directives in Runtime Configuration.
PARAMETERS
o $link
- The connection link identifier
o $query
- A valid SQL query (see the Ingres SQL reference guide) in the Ingres documentation. See the query parameter in ingres_query(3)
for a list of SQL statements which cannot be executed using ingres_prepare(3)
RETURN VALUES
ingres_prepare(3) returns a query result identifier that is used with ingres_execute(3) to execute the query. To see if an error occurred,
use ingres_errno(3), ingres_error(3), or ingres_errsqlstate(3).
SEE ALSO
ingres_unbuffered_query(3), ingres_fetch_array(3), ingres_fetch_assoc(3), ingres_fetch_object(3), ingres_fetch_row(3), ingres_commit(3),
ingres_rollback(3), ingres_autocommit(3), ingres_set_environment(3), ingres_errno(3), ingres_error(3).
PHP Documentation Group INGRES_PREPARE(3)