0 votes
in SoSci Survey (English) by s247941 (140 points)

Hello,

when I am trying to access the "Database for Contents", I get the following error warning:

This page isn’t workingwww.soscisurvey.de is currently unable to handle this request.
HTTP ERROR 500

How can I solve this issue?

Thank you!

1 Answer

0 votes
by SoSci Survey (327k points)

Most likely your PHP code causes some trouble - or the database for contents in your project is too large, and you're using a function that loads a lot of that data.

What is the PHP code you're using, and how many entries (of what length) are we talking about?

If you tell us the exact time of such an error (UTC, please), we can also take a look into the error logs.

by s247941 (140 points)
I am doing a multi-wave survey and I tried to access content from the questionnaire A2 (opens after people have used the opt-in function to confirm their e-mail) in a later questionnaire C (in the same project). Specifically, I wanted it to access the data from the variable "EX01" in A2 (which are 12 items that can be answered on a 5-point Likert scale), calculate the mean and use the mean in C. For this I wrote the follwoing code in A2:

$key = caseSerial();
$EX01mean= valueMean('EX01');
$data = $EX01mean;
dbStore($key, $data);

And the following code in C:
$key = caseSerial();
$data = dbGet($key);
$EX01mean_numeric = $data;

I tried to test this code but it does not work (another issue) but when I wanted to check in the database what had been stored, I couldn't access it anymore. But also this might not be the exact php code that caused the problem, because I changed it a lot to find out what the error is.

I deleted the php-Code in the project after, but I still couldn't access the database.

I do not know the exact time when the error first occurred... But I tried to access the database now again (18:23 UTC) and it does not work.
by SoSci Survey (327k points)
The last code line will need to select the first entry in the array:

$EX01mean_numeric = (float)$data[0];

Otherwise, the code should not cause any isses at all.

> when I wanted to check in the database what had been stored, I couldn't access it anymore.

Sounds like the same issue that causes the 500 error.

> 18:23 UTC

Okay, I seen an error in the logfiles. We will solve this within 24 hours. Would it be acceptable for you, if I created an administrator login to the project to test, if it works ater the update? If yes, please tell me which of the projects in your account is affected by the issue.
by SoSci Survey (327k points)
edited by SoSci Survey
We have solved the issue with accessing the database listing, altough the display may not be optimal, yet - however, there is still a little error in your code. You store an object by using dbStore(), but try to retrieve an array via dbGet().

Either use dbSet() and dbGet()
Or use dbStore() and dbRetrieve()

The second option will allow you to store single values, an associative array or even arrays within arrays.

Please let us know, if you still encounter an error 500 - and if so, please tell us the time. Thank you.
by s247941 (140 points)
Thank you! Everything works now

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...