Forum
Perch Forms App saves responses locally, but not on web server
Hello,
Submitting Form App's forms locally with XAMPP works. However, submitting the form live on the web server, form's input are not recorded in the database. This means, response entries appear, but not the data or actual input submitted.
As well, Form App's options on the web server seem can't 'read' form's fields. There is an 'Email address field' setting within Forms App, which works correctly locally – so that I can choose the according field, but the list doesn't show up when on the web server.
You may find the according form at https://martonlente.com/#contact-me
My web hosting provider sent me the following response on the issue:
I'm afraid I'm not familiar with Perch CMS, so there's little support I can offer here. I'm confident it's an issue with the script and not our service. There's no web server or PHP logs on our side that would indicate it's an issue with our server.
If there's a PHP script you can guide more towards that handles the form submitting I can take a look, but the contact page only calls the perch_content() function so I don't know where to look for further information regarding that.
The database itself is not storing the responses, so the issue is lying with the form handling. I would make sure your HTML is exact to your XAMPP install - if you change any field names (e.g. textboxes) then it may not be picked up by the PHP script. I would also recommend reviewing your PHP configuration - make sure your XAMPP install and your Arch Hosting account are on the same PHP version. Also check the PHP configuration (phpinfo()) and make sure everything important matches.
Of course my markup and databases I'm testing with are identical. What may cause the issue? Is there anything I should ask from my web hosting provider?
Let me paste my short diagnostic reports below.
Local, working (XAMPP):
Perch: 3.0.13, PHP: 5.6.30, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (3.0.13), assets (3.0.13), categories (3.0.13), perch_forms (1.10), chirp_seo (1.2.1), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_mailchimp', ];
PERCH_LOGINPATH: /perch
PERCH_PATH: E:\1708_personal-branding\31_Web\perch
PERCH_CORE: E:\1708_personal-branding\31_Web\perch\core
PERCH_RESFILEPATH: E:\1708_personal-branding\31_Web\perch\resources
Image manipulation: GD
PHP limits: Max upload 4M, Max POST 16M, Memory: 256M, Total max file upload: 4M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: martonlente.l1
DOCUMENT_ROOT: E:/1708_personal-branding/31_Web
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Web server, not working:
Perch: 3.0.13, PHP: 5.6.33, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, litespeed
Installed apps: content (3.0.13), assets (3.0.13), categories (3.0.13), perch_forms (1.10), chirp_seo (1.2.1), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_mailchimp', ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /home2/martonle/public_html/martonlente.com/perch
PERCH_CORE: /home2/martonle/public_html/martonlente.com/perch/core
PERCH_RESFILEPATH: /home2/martonle/public_html/martonlente.com/perch/resources
Image manipulation: GD
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: martonlente.com
DOCUMENT_ROOT: /home2/martonle/public_html/martonlente.com
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Have you enabled debug and submitted the form to see if there's any errors?
Thanks for the tip Drew. Though yes, I've enabled debug, and no errors were displayed. Submitting the form just redirected to the set page, and everything seemed all right – except the issues described behind the scenes.
You'll need to disable the redirect and try again.
Thanks, when disabling redirect the debugging works, and throws the following error:
The 'template file not found' errors are not present when debugging locally. Can it cause the problem?
By the way the template called 'contact_me_form.html' is a basic perch template living in Perch's template folder, contains Perch's forms tags too, and is used as a shared region across all pages. All pages throw same error message.
I can edit the template's content on the web server too. It's interesting that the error is only present on the webserver, and only when submitting the form – no problem with the paths locally.
Update: Completely deleting the form from within Forms App in Perch on the web server, then resubmitting it again in order to recreate the form seems to solve the issue! :) I'll let you know if I run into a problem inbetween.
That's what I was going to suggest. Looks like you've got mixed file systems.