login about faq

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

asked Jan 12 '15 at 05:44

enveetee's gravatar image

enveetee
15


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?

link

answered Jan 12 '15 at 09:11

jpbro's gravatar image

jpbro ♦
1.1k2618

Also, does the component work as expected if you try against the local server by IP address instead of host name?

link

answered Jan 12 '15 at 09:12

jpbro's gravatar image

jpbro ♦
1.1k2618

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

link

answered Jan 12 '15 at 16:20

enveetee's gravatar image

enveetee
15

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

link

answered Jan 12 '15 at 16:21

enveetee's gravatar image

enveetee
15

edited Jan 12 '15 at 16:41

jpbro's gravatar image

jpbro ♦
1.1k2618

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.

link

answered Jan 12 '15 at 16:45

jpbro's gravatar image

jpbro ♦
1.1k2618

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

link

answered Jan 12 '15 at 17:00

enveetee's gravatar image

enveetee
15

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

link

answered Jan 12 '15 at 17:08

enveetee's gravatar image

enveetee
15

It depends - if your project is using other 9.4 components, then leave them selected until you've migrated over completely to 9.5 (at which point you can just leave the 9.5 component selected). 9.5 has all of the Chilkat components in a single ActiveX DLL.

(Jan 12 '15 at 17:20) jpbro ♦

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)

link

answered Jan 12 '15 at 17:12

enveetee's gravatar image

enveetee
15

So the method reports success in the log and return value, but then the problem is you don't see the successfully uploaded file on your virtual server?

If so, are you 100% sure that the www.servername.com/~test domain/path is pointing to your virtual server, and not somewhere else? In the LastErrorText results, is the resolution of the www.servername.com domain resulting in your virtual server IP or your production server IP?

(Jan 12 '15 at 17:24) jpbro ♦

Lastly - if it is guaranteed that your domain is pointing to your virtual server, are you sure that the ~test path is where you think it is? That is to say, if you do a full search for the uploaded file name on the entire hard drive, does the uploaded file appear somewhere else on the server than where you are expecting it to appear?

(Jan 12 '15 at 17:24) jpbro ♦

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

link

answered Jan 19 '15 at 04:28

enveetee's gravatar image

enveetee
15

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×50
×12

Asked: Jan 12 '15 at 05:44

Seen: 1,089 times

Last updated: Jan 19 '15 at 04:28

powered by OSQA