Programming :: Connect() Gives Error In C++
Feb 4, 2011Code:
When i call Connect() in side HandleConnection() it returns -1 and when i set strerror(errno) it returns "No Error" with value 0.
Code:
When i call Connect() in side HandleConnection() it returns -1 and when i set strerror(errno) it returns "No Error" with value 0.
I'm creating a comment form for a website but when I try to connect the page with a database it gives me a parse error. here are the codes I wrote:
[Code]....
I'm trying to make an SSH script for my place of employment. This script, I want to go out to the server hostnames we have specified (in another file) and change a users account password. We use Kerberized telnet, so if telnet root hostname fails, I want it to use ssh username hostname and use the old password (specified). If both fail, I want it to ask the user what the port should be and input the port in the ssh command.
But I'm having a issue having it try telnet root hostname and if it fails then, try to ssh in, I have no clue how to have it proceed. Is it an if statement? Here's the telnet failed message: telnet: Unable to connect to remote host: Connection refused
every time I try to connect to the ftp server I setup i am recieving this error Response:*** buffer overflow detected ***: /usr/sbin/vsftpd terminated Error:Could not connect to server
View 1 Replies View RelatedI install and configure the vncserver following and reading 1000papers, but all of this present the same problem; when i try to connect to my vncserver,recive this mesage: unable connect to socket: No route to host (113) The OS version is Fedora Core 14 and tigervnc-server i try different solutions including:Allow TCP connection modifing files /etc/gdm/custom.conf and /usr/share/gdm/gdm.chemas Disable SELinux removing iptables Here follow the vncserver configuration:
[code].....
The ip address of the vncserver is correct because i can do ssh on it. Where or what can i do?
I cannot use cvs within eclipse to connect to the server, but when I use cvs in terminal everything works fine.
ERROR Message: Could not connect to :extssh:hongyang@bleong.ndslab.net:/var/cvsroot: CVS communication error: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection$SSH2IOException: Network is unreachable
Network is unreachable
I wrote a code in C to connect to MySQL by using mysql_real_connect function but I recieved error "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" (by using mysql_error function).
I also did the following things: in mysql I typed 'SHOW VARIABLES LIKE '%SOCKET%'', it returned /var/lib/mysql/mysql.sock I typed 'mysql_config --socket' in shell, it returned /var/lib/mysql/mysql.sock I modified /etc/my.cnf file
I am looking to be able to connect to an IRC server in a C program. I have followed some instructions from an old book I have however it doesn't seem to be working. I've tried connecting to localhost on my ssh port and it still doesn't want to work. This is what I have so far as a piece of skeleton test code:
Code:
#include<sys/types.h>
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<unistd.h>
#include<netinet/in.h>
#include<arpa/inet.h>
[Code]....
We make everyday a DB Mysql backup on Linux redhat Enterprise. We are using a bash shell script (and putting it in the crontab) to execute it automatically everyday. We added a line to this script telling, once the backup has completed, to find old backup files (stored on hard disk after each backup) older than x days to remove them. We use the find command (search for file type) with the mtime option and in combination with rm command. Everything runs ok but we also want to add some new code to the same line: If find command cannot find anything or fails, for example if it cannot delete file or fails, send the error message (standard error output) to an error file (like error000001 and increasing) and mail the errorxxxx file to an email address for example to admin@companyname.com. What would be the code for this issue to add it to our find command in the same bash shell script??
View 2 Replies View Relatedhow to rectify these errors..
RCC: Error in 'appchooser.qrc': Cannot find file 'accessories-dictionary.png'
RCC: Error in 'appchooser.qrc': Cannot find file 'akregator.png'
RCC: Error in 'appchooser.qrc': Cannot find file 'digikam.png'
RCC: Error in 'appchooser.qrc': Cannot find file 'k3b.png'
RCC: Warning: No resources in 'appchooser.qrc'.
and my .qrc file is like this
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>accessories-dictionary.png</file>
<file>akregator.png</file>
<file>digikam.png</file>
code....
Parse error: syntax error, unexpected '@' in C:xampphtdocsminippromail.php on line 8 .......its not recognizing the '@' symbol. heres the code im working with
<?php $receiver = myfriend@ourmail.co.in; $subject = wish; $content = Hi! My dear friend how are you.; $sender = myself@ ourmail.co.in ; $headers = From: $sender; mail($receiver,$subject, $content,$headers); echo Mail has been sent successfully.; ?>
On ubuntu I try to access a PIC-controler via the ttyUSB0. I send a few command bytes and get the status from the controler. My C code works without problems on ttyS0 but with the usb-to-serial adapter (I tried two with defferent chipsets pl2303 + ch341-uart) it just sends but can't read from the controller.
With minicom I can communicate with an other computer without problems but in my code there must be something wrong for the ttyUSB.
Here my code for the termios configuration:
Code:
My freetds.conf
Code:
# /usr/local/etc/freetds.conf
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
[Code]...
So I was reading one of the Unix Philosophy rules by Eric Raymond:# Rule of Composition:Design programs to be connected to other programs.How does one achieve that? I know one could several C programs and then use a bash script to feed in the stdin, but how do you do that with just pure C, do you do it with pipelines?
View 2 Replies View RelatedI am doing a project to develop a application that sends sms from a GSM mobile connected to the system. But i dont know how to detect a mobile fone and access it.
View 2 Replies View RelatedI have a centos 5.5 machine. I have forwarded both port 22 and 8080 on my router. I can connect on 22 via telnet ip 22 and even can remotely login into the machine. The problem when I start my java listener program which is listening on 8080 it cant not establish any connection (via telnet ip 8080). I have even add this into the iptables too -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9000 -j ACCEPT. I have disabled the SELINUX too.
View 9 Replies View RelatedIs it possible to connect a signal handler to a variable?So when the variable changes the signal handler is called.I have a vector containing strings which i want to parse when there are one or more available strings in the vector
View 3 Replies View RelatedI've started programming in c recently . following are the details about scene:
* vim is editor and program is compiled in gcc whenever a program involving math function appears it gives error i.though math.h is included in header file compiler complains about it it gives error of unrecognized function that math function like sqrt, etc question is how to connect math.h to a program.
I am getting this error when i try to connect a client to a server in windwos ,anybody knows why ?
View 3 Replies View RelatedI am facing problem of Memory leak whenever i try to connect the Server using the ().
View 2 Replies View Relatedi have Ubuntu10.10 (kernel-2.6.35-22-generic) installed. struct stat StatBuff;
[Code]...
I have mounted a windows share folder on /mnt. When i gave any directory within /mnt/ to stat function it fails with errorno 75. perror shows "Value too large for defined data type". Example 1 is fail but Example 2 works fine.
I have implemented SugarCRM on a SUSE 10 box . Every thing goes ok but in the SugarCRM ,it's saying :
Error: Could not connect to the Sugar Server. Please check your Proxy Settings value in the System Settings admin panel. Last attempted connection @ 10/11/2010 06:37pm and unable to setup email inside that.
But the system is neither have proxy setting and internet runs fine outside SugarCRM. In RHEL, CentOS all run ok but not in SUSE ?
I am getting this error when I try to connect to my MySQL database from a PHP page. MySQL is working fine on it's own and PHP is working on it's own. "Fatal error: Call to undefined function mysql_connect() in /usr/local/htdocs/test.php on line 11" I have found instances on the Internet where other people had the same problem but from everything I've read, none of it appears to do anything for me. I have read that I need the "extension=mysql.so" in my php.ini file and to uncomment it but it's not in there and I don't even have the "mysql.so" file. Many people have said to install the MySQL "devel" package, which I have also done and it is still not adding the file. (Tried "rpm -i php-mysql") I have also tried running the PHP ./configure again with the "--with-mysql". After all of these I still can't seem to get any further than I was when I found out I had a problem
View 10 Replies View RelatedWe have Exchange as our Mailbox server > Qmail as our SMTP server > and we use postini for filtering. We recently got word from a customer that he received a "451 error - can't connect to server" message from Postini - stating that the server is unreachable. This does not happen often so obviously Postini can connect to the qmail server. Are there logs that I can look at to find out why and when these would occur?
View 1 Replies View Related1)We need to do a clean up a folder in a remote unix server . What is the best option to connect to remote server? how do we use ssh ? Is there any prerequisite to use ssh?
2) We have to SCP few files to another folder in a remote unix server . I formed the below command to use in script. Is it of correct usage? scp -r $POS_HOME/posctl [login nameip address:/home/username/directory]
I have seen public key/private key generation part for SCP. How do we handle this? Does this need to be done as unix admin?
I have a customer who is complaining that they can connect to prt y on IP x with telnet. They are seeing the following:
telnet x.x.x.x y
Trying x.x.x.x...
Connected to x.x.x.x.
Escape character is '^]'.
after some time the connection of course times out. Connection closed by foreign host. There is no telnet service running on this port so they cannot do anything, but they are complaining tht the fact that telnet "connects" is a security risk. I am having difficulty explaining why they are able to connect with telnet. I know it has to do with the socket layer API in Linux but I am having difficulty explaining this sufficiently. I also can't just say "this is the way linux works" to them. I am looking through "UNIX Network Programming" by W.
seems that the secret way to manage sourceforge.net files without pain and blood is not revealed yet!I uploaded some files in my sourceforge project named blackwar .I want to connect to my projects folder in sourceforge.net using filezilla or gftp.I want to see my files there and manage them.
View 3 Replies View RelatedI want to create script wherein it will check the application if its running. The command that I'll be using to check the application is telnet (if you can recommend others, that's ok). I've an application and it is listening to port 1808. If I do telnet localhost 1808, the response is :
Code:
[root@test ~]# telnet localhost 1808
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
What I want to happen is if the response is like to code above, it will execute a commands. Obviously, above code knows that the application is not working so I need to execute a commands. I created a script before using expect but I don't think it will work because I haven't establish a shell yet unlike successful telnet I could spawn expect.
I have installed it++ on suse11.2 I have downloaded an example project and everytime i try to "make"..error "/bin/sh: line 1: .dependencies: Permission denied" comes up.I have tried to run as root but this hangs on "checking dependencies" and gives no action.
View 2 Replies View RelatedI have installed opensuse 11.3 I am unable to connect to my wireless connection.
KNetworkManager finds the connection (when i scan for connections), i can enter the WEP Hex key, it says it is configured. Goes through its "check list" when you click "ok", and all seems good. But it won't connect. When i run "nm-tool" i get:
State: unknown
WARNING **: error: could not connect to NetworkManager
I edited values in:
linux-2ys8:/home/sam # vi /var/lib/NetworkManager/NetworkManager.state
to "true"
running rcnetwork restart, output was:
Shutting down network interfaces:
eth0 device: Atheros Communications AR8121/AR8113/AR8114 Gigabit or Fast Ethernet (rev b0)
eth0
[code]....
knetworkmanager(9276): KUniqueApplication: Cannot find the D-Bus session server: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
knetworkmanager(9275): KUniqueApplication: Pipe closed unexpectedly.