PennController for IBEX › Forums › Support › Upload audio samples to the server
- This topic has 2 replies, 2 voices, and was last updated 4 years, 8 months ago by asdf.
-
AuthorPosts
-
March 28, 2020 at 12:08 am #4919asdfParticipant
The experiment was not able to upload results to my server when I was trying to collect audio samples following the tutorial on this page: https://www.pcibex.net/wiki/recording-and-collecting-audio-samples/.
I just copy-and-pasted the project code in the tutorial but the error message was always popping out: “There was an error uploading the recordings ().” and there’s nothing in the “uploads” folder on my server. Furthermore there’s also an error message in the debugging module: VoiceRecorder’s Ajax post failed. (0); (PennController: NA).
I’ve already checked everything based on the tutorial: set up the server; create “uploads” folder and make sure it has appropriate permission; upload php file; run “InitiateRecorder” before other trials. Furthermore, I’ve also checked with the server provider that everything is fine with the server and the address that I use in the “InitiateRecorder” to access the php file is correct.
I’m wondering if there’s any clue to shoot the trouble of uploading audio samples to the server cause I have no idea where to start the debugging. Or if there are any other points that I need to pay attention to for the server setup part?
Many thanks in advance!
March 28, 2020 at 12:58 pm #4920JeremyKeymasterHi,
Several people have reported having trouble uploading audio samples to their server, and unfortunately there’s no one-size-fits-all solution, everyone’s server configuration is different.
However, most often the problem comes from failed attempts at cross-domain requests, and the error code that you report (0) is consistent with that. So here are a couple questions:
- Is your experiment hosted on the PCIbex Farm? Line 6 of the PHP script on the documentation page assumes that the samples are coming from https://expt.pcibex.net/
- Are you sending the sample to a secure domain? The PCIbex Farm is at a secure domain (https) and the server where you send your audio samples also need to have secure credentials
- Someone had a problem when uploading large files: their PHP configuration would only allow uploads of up to 10MB or 100MB, and archives of several long audio samples get large very quickly
I can’t think of anything else at the moment, but feel free to share your experiment’s link with me so I can troubleshoot more eaisly
Jeremy
March 28, 2020 at 1:32 pm #4921asdfParticipantYeah it’s the problem with cross-domain requests! I’ve changed the domain on my server to a secure one and the uploading problem is solved. Thank you so much Jeremy!
-
AuthorPosts
- You must be logged in to reply to this topic.