Hi, i have problem with connection on ftp with example script i get message all time "ERROR = -1", but in filezilla or other ftp client i connect normally with same data ?
And what this _FTP_Open('') means, i can write what i want in ? like this is my connection name or something from server ?
thanks in advance
Code:
#include <FTPEx.au3>
#include <MsgBoxConstants.au3>
Local $sServer = '**********'
Local $sUsername = '*******'
Local $sPass = '*********'
Local $hOpen = _FTP_Open('MyFTP Control')
Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass)
If @error Then
MsgBox($MB_SYSTEMMODAL, 'FTP Connection : ', 'ERROR = ' & @error)
Else
MsgBox($MB_SYSTEMMODAL, 'FTP Connection : ', 'Connected')
EndIf
Local $iFtpc = _FTP_Close($hConn)
Local $iFtpo = _FTP_Close($hOpen)
The _FTP_Open is probably the UserAgent. Your data must be wrong then, check your servername / username / pass and retry again. Also try to run the program with elevated privileges.
Ah works just added #RequireAdmin, stupid windows 8
Now have same problem with GUI but all works fine just dont want to connect again throws error -1, i try to compile ( x64 ) and run as admin, try to run script just in x64
Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <FTPEx.au3>
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#Region ### START Koda GUI section ###
$GUI = GUICreate("FTP tool", 308, 242, 643, 265)
GUICtrlCreateLabel("Host", 16, 16, 26, 17)
GUICtrlCreateLabel("Port", 192, 16, 23, 17)
GUICtrlCreateLabel("Username", 16, 56, 52, 17)
GUICtrlCreateLabel("Password", 16, 88, 50, 17)
GUICtrlCreateLabel("Status : ", 8, 152, 43, 17)
$status = GUICtrlCreateLabel("Not connected", 52, 152, 221, 17)
$host = GUICtrlCreateInput("", 48, 12, 121, 21)
$port = GUICtrlCreateCombo("", 224, 12, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "21|80")
$username = GUICtrlCreateInput("", 79, 52, 121, 21)
$password = GUICtrlCreateInput("", 79, 81, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$connectBtn = GUICtrlCreateButton("CONNECT", 56, 192, 75, 25)
$disconnectBtn = GUICtrlCreateButton("DISCONNECT", 143, 192, 107, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
If GUICtrlRead($status) = 'Not connected' Then GUICtrlSetState($disconnectBtn, $GUI_DISABLE) ; disable disconnect button
GUICtrlSetData($port, '21') ; default port
Global $status, $host, $port, $username, $password
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $connectBtn
_connectFTP()
EndSwitch
WEnd
; connection to FTP server
Func _connectFTP()
Local $_host = GUICtrlRead($host) ; host name
Local $_username = GUICtrlRead($username) ; username
Local $_password = GUICtrlRead($password) ; password
Local $_port = GUICtrlRead($port) ; port
Local $FTPopen = _FTP_Open('FTP connection test') ; name of connection
Local $FTPConnect = _FTP_Connect($FTPopen, GUICtrlRead($_host), GUICtrlRead($_username), GUICtrlRead($_password), "", GUICtrlRead($_port)) ; connect
; try to connect to server
If Not @error Then ; if not error
GUICtrlSetData($status, "Connected") ; set status to connected
GUICtrlSetState($connectBtn, $GUI_DISABLE) ; disable connect button
Else
MsgBox(48, 'FTP connection error', "Can't connect to server, error = " & @error) ; if there is connection error
MsgBox(48, 'Test variables', 'server name = ' & $_host & ', username = ' & $_username & ', password = ' & $_password & ', port = ' & $_port) ; debugg message
EndIf
EndFunc
SOLVED mistake was that i read here already filled variables
Code:
Local $FTPConnect = _FTP_Connect($FTPopen, GUICtrlRead($_host), GUICtrlRead($_username), GUICtrlRead($_password), "", GUICtrlRead($_port)) ; connect
; need to be
Local $FTPConnect = _FTP_Connect($FTPopen, $_host, $_username, $_password, '', $_port) ; connect
Flyff Server - Connection FAIL? 07/17/2014 - Flyff Private Server - 3 Replies Hallo liebe epvper's. Hab nen server aufgesetzt aber bekomme die sachen im log vom erro u Network:
ERROR_LOG
2014/ 7/13 17:06:19 AIL_open_digital_driver error, Music init error
2014/ 7/13 17:06:21 Generic application error. Enable
debug output for detailed information.-2005530518
This sample will now exit.
DB Connection fail 06/19/2013 - SRO Private Server - 11 Replies Well when i try to start op Sr_shardmanager i get a DB connection fail , could it be because i had an error when installing MySQL: It said there was something wrong with my ASP and i thought it wasn't anything special but now i think it's cause of that error that the DB won't connect. I checked all .ini files and everything is as it should be so..
connection to the server - fail 03/23/2013 - Shaiya Private Server - 9 Replies Hello everyone,
I finally managed to configure my server and my French client.
But, I do not have to connect it.
I use "SERVER_SHAIYA_LITE V.12" and French client ep 4.5
I try to connect with:
- User: admin
[Help]Steam fail connection :/ 10/29/2010 - Off Topic - 5 Replies Hey habe mir gestern bei Steam
2 neue Games gekauft
1x Borlderlands
1x Nation Red
Nation Red läuft einwand frei.
Doch jetzt kommt mein Problem..
wenn ich Borderlands starten will kommt
[swSRO] epic connection fail 05/15/2010 - SRO Private Server - 28 Replies http://img208.imageshack.us/img208/6498/wtfffs.png
7 sro clients +same account +7 ce's(2 of the are hidden) +2hours +autoenter each 0,2 seconds delay =3 hours later still not connected xDD
do u guys get such fails?
please dont flame:rolleyes:.if u have such connecting fails post ss's :D