Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/2021 in all areas

  1. Doesn't your console have a "preserve" option? Or, add "return false" to the end of your submitData() function to stop the page refreshing
    2 points
  2. Because in the POST example, you are actually doing an HTTP POST request that goes to a new page. This is why I suggested you look at the network tab, so you can see this in action. In the 2nd (all javascript) you don't actually leave the page, you just run javascript code on your existing page.
    1 point
  3. Along the lines of what Barry suggested, you also will find looking at the network tab is also very useful, as it might show you what is occurring with the actual request/response. This will also lead you to the sources tab, so you can add a breakpoint to your javascript code and debug it while it's running, which will let you introspect the actual variables.
    1 point
  4. You were indeed correct. PHP does not do anything odd. And I was too cocky claiming that the "does not exist" error was incorrect. If you get the error "does not exist", that's probably right. And yes, "between servers" means mounted drives... /mnt/fileserver, /mnt/processserver etc... as far as PHP is concerned, just different directories on the same machine. This is what happened: 1) The script checks if all directories involved exists. They never do, so they are always created. I watched this happen, thus I "knew" that they existed. Create fileserver/targetDirectory/, processServer/tempDirectory/, processServer/WatchedFolder/targetDirectory/ 2) The files were uploaded to the web server. This took from a few seconds to half a minute, for large files 3) The files were copied from the web server to fileserver/targetDirectory/ (this always worked) 4) The files were copied from fileserver/targetDirectory/ to processServer/tempDirectory, to avoid copying to the watched folder. (This always worked) 5) Then... sometimes failure when moving from processServer/tempDirectory/ to processServer/WatchedFolder/targetDirectory/ The failure occurred because the watching process scans processServer/WatchedFolder/ for files that have not changed in size the last 15 seconds. Remember that I created the processServer/WatchedFolder/targetDirectory before I even started the file upload! If the upload took "too long", the watching process noticed that the targetDirectory (just another file, after all) had not changed size the last 15 seconds and deleted it. So sometimes when I got to step 5 above, processServer/WatchedFolder/targetDirectory existed, sometimes it did not! Many thanks for your input.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.