Question:
Hi there
I am using your Freeware Upload compoment. It works fine uploading to my production server (Apache/PHP) but I cannot get it work when I upload to a local virtual server (www.servername.com/~test)
Any ideas please
Thanks
Nigel
Hi Nigel,
Can you post a small snippet of code, and the contents of the LastErrorText property (in <pre></pre> tags) as they are returned immediately after the first failing call to the Upload component?
Also are you sure that www.servername.com/~test is pointing to the local virtual server and that calls from a local browser are successfully going to the local server?
Also, does the component work as expected if you try against the local server by IP address instead of host name?
Hi
Log below which was captured after calling BlockingUpLoad()
All other previous calls to the component give
ChilkatLog: --ChilkatLog
upload works if I use domain (www.myserver.com) or ip address (xxx.xxx.xxx.xxx)
I have a virtual server www.myserver.com/~virtual but cannot upload to it
the Log...
ChilkatLog: BlockingUpload: DllDate: Aug 15 2013 ChilkatVersion: 9.4.1.42 UnlockPrefix: NONE Username: NIGEL3XS:Nigel Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 0 Connecting to HTTP server domain: xxx.xxx.xxx.xxx port: 80 Non-SSL connection Connect_Socket: hostname: xxx.xxx.xxx.xxx port: 80 ssl: 0 maxWaitMs: 30000 ConnectTimeoutMs_1: 30000 calling ConnectSocket2 IPV6 enabled connect with NO heartbeat. This is an IPV4 numeric address... AddrInfoList: AddrInfo: ai_flags: 4 ai_family: 2 ai_socktype: 1 ai_protocol: 0 ai_addrlen: 16 ai_canonname: (NULL) --AddrInfo --AddrInfoList Connect using IPV4. ipAddress1: xxx.xxx.xxx.xxx myIP_3: 192.168.1.74 myPort_3: 59132 connect successful (2) socketOptions: SO_SNDBUF: 8192 SO_RCVBUF: 8192 TCP_NODELAY: 0 --socketOptions Success. --Connect_Socket numFilesToUpload: 1 sourceFile: C:CONTROL7DATApvt1.sys numBytesSent: 51842 Upload sent, fetching HTTP response... stringCharset: ansi stringCharset: ansi NumBytesToReceive: 133 BufferedInSize: 135 Data already buffered and ready.. TimeToReceiveMs: Elapsed time: 0 millisec NumBytesToReceive: 2 BufferedInSize: 2 Data already buffered and ready. TimeToReceiveMs: Elapsed time: 0 millisec stringCharset: ansi stringCharset: ansi Success. --BlockingUpload --ChilkatLog
Code snip
Dim upload As New ChilkatUpload upload.hostname = "xxx.xxx.xxx.xxx" Msgbox2 upload.LastErrorText upload.Path = "/php/cs_fileupload.php" Msgbox2 upload.LastErrorText Dim f$Dim Tot& Count& = 0 Dim Success As Long
'Add one or more files to be uploaded. Call upload.AddFileReference("file1[]", mSYS.DirectoryData & "pvt1.sys") Msgbox2 upload.LastErrorText ' Do the upload. The method returns when the upload ' is completed. ' This component also includes asynchronous upload capability, ' which is demonstrated in another example.
Success = upload.BlockingUpload() If (Success <> 1) Then Msgbox2 upload.LastErrorText Else Dim x% x = TOpenFile("c:ERRORV.TXT", "O", 1, 1) Print #x, upload.LastErrorText Close #x Msgbox2 upload.LastErrorText Msgbox2 upload.ResponseStatus
End If
Is the return code from BlockingUpload 0? or something else? I ask because the LastErrorText indicates Success as far as I can tell.
Also, I see you aren't using the latest version of the Chilkat library, can you try again with 9.5.0.46 and see if it works? It might be a bug that has already been fixed.
Hi
Return code is 1 whether I upload to www.mysever.com or www.myserver.com/~virtualhost
I will download and install the latest version Thanks
Hi
I have downloaded and registered the newer verion. One question...
I am currently using several chilkat components in my project and have all the relevant components ticked in references.
Do I need to remove them from my project and check the reference to the newly installed DLL (which is shown)
Thanks
I have installed the newer version I have deselected the Upload component from references I have selected the new all-in-one-dll
The problem still persists, I cannot upload to my virtual server's Upload folder (works fine for the actual domain)
Thanks for your help on this. I think the issue is with the configuration of sub domains / virtual servers on my server box.
I am moving the app to a hosted company, so should be able to check functionality once installed
thank you for your support