can't submit/save
francescosoave opened this issue · 7 comments
Hi, I'm trying to do an APE survey.
Everything's fine except at the end, when I press submit nothiong happens (e.g. no dat asaved on the server/no redirection/no final message displayed). No idea how to debug this but I see an error in the console.
You can try the survey at this link.
Open the console at the end to see the errors (but I don't know if they are relevant or not).
Thanks!
Hi Francesco,
Thanks for your interest in the tool and sorry you ran into an issue.
It looks like http://francescosoave.com/webaudio/php/requestKey.php?saveFilenamePrefix=save is throwing an error, so it doesn't get a key from the server. Have you tried the exact same test locally (with the included Python webserver or similar) and did that work?
Without looking into it further I'm wondering if the server is capable of handling PHP.
hello, thanks! So, the server can 100% handle php as I've run many other scripts on it before. At the moment the server runs PHP 7.2.32 . Do I need specific permissions for the files/folders or any PHP parameter to be changed(e.g. memory limit etc)?
Hi, I have a similar problem in a server using PHP version 7.4.10 (I've also tried other versions and the problem persists) + WAET 1.2.2.
Chrome console displays the following
core.js:3915 POST [my web server]/waet/php/requestKey.php?saveFilenamePrefix=save 500 (Internal Server Error)
The same test runs locally using the Python webserver without any problems getting the key from the server or saving the results.
I changed the permissions of 'waet' and 'saves' folders to write+ for others and groups.
Finally, I also tried to run other PHP scripts on the same server without any problems.
Thanks in advance
Hi, we are running into the same problem.
There is an .htaccess
file in the php folder which causes an error 500 for all files requested from this folder. The problem seems to depend on the server configuration. The commands php_flag
and php_value
in the .htaccess
file can only be used if PHP is configured as an Apache module but not with CGI. As a consequence, you will find a message in the Apache logs such as
Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
There are quite some posts related to this matter on StackOverflow, see for instance https://stackoverflow.com/questions/33998265/detect-support-for-php-value-php-flag-in-htaccess-to-suppress-errors-php-cg
It might be a better practice to conditionalize such commands using IfModule
as proposed in the PHP documentation https://www.php.net/manual/en/configuration.changes.php#example-29.
As a temporary solution, we are wondering if it is save to comment out the respective commands or are they crucial for a proper operation of the WAET software?
FYI at the time I posted, I solved by using PHP 5 (if I recall correctly).
I have the same problem. The earliest version my provider (cloudways.com) supplies is PHP 7.4.
Any suggestions on what to try?
The solution I've found so far (for PHP 8) is:
- Edit the php/.htaccess file to comment out all the php_* lines; in other words, everything except for the <Files...> stuff at the end
- In the PHP-FPM settings on the host, add or substitute the lines:
php_admin_flag[log_errors]=on
php_admin_value[docref_ext]=0
php_admin_value[error_log]=./error.log
php_admin_value[display_errors]=off
php_admin_value[display_startup_errors]=off
php_admin_value[display_html_errors]=off - I changed js/core.js to comment out a check for this.key === null - not sure if this change was necessary, once the php changes were made:
"finish": {
"value": function () {
/* if (this.key === null || requestChains === undefined) {
throw ("Cannot save as key == null"); } */
Now it saves the results, but the analysis page doesn't seem to see them...