Replies: 1 comment
-
Note sure what is happening, but I would try the following to get a better grip on the problem: 1. In your JavaScript saveData function, add the following after creating the xhr object:
This will print any info that the server produces when running the php script in the console window of your browser, and might contain useful information/error messages. Create a PhP script that simply saves some data and visit this script in the browsre
That way you can check if it is related to how you are parsing the data sent through jsPsych, or if there is an issue on the server itself (perhaps some permissions need to be set before you can actually write data)? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, I have an issue storing data as described here https://www.jspsych.org/7.0/overview/data/, using a php script. I know that there are a bunch of posts n this topic out there, but 1. they all refer to older versions of jsPsych, and 2. none of the approaches helped me solve the puzzle. Below my code snippets, JS and PHP:
php:
I host my experiment over the university server, and they have a set up a server to store the data. Hence, the data file into which the data should be saved is not in the git repo, but some external directory. I am not sure whether the problem lies with my script, or with the server where the data is supposed to be saved? I would really appreciate some insights. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions