We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12508
    • 63 Posts
    Thanks to all of you who are helping me with this problem.

    Today I tried again to send the form. The result, not only the mail was not sent and the page was not redirected, but I received an error message from the browser:

    Server error

    The website encountered an error while retrieving http://www.bvd-mittelhessen.de:8888/index.php?id=3. It may be down for maintenance or configured incorrectly.

    Here are some suggestions:
    Reload this webpage later.

    HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

    - end of message -

    If I reload the page, I go back to the original page with the form, which actually has the same URL described on the error message above: id=3

    I'm working on localhost, I'm not sure if this can hava an influence.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Does your localhost have a working mail server (sendmail, qmail, etc)? Usually they don't.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • discuss.answer
        • 12508
        • 63 Posts
        Quote from: sottwell at Jan 29, 2013, 03:11 AM
        Does your localhost have a working mail server (sendmail, qmail, etc)? Usually they don't.

        Hi Sottwell, seems like I'm using a mail server, at least it is what my server program says (MAMP Pro - http://www.mamp.info):

        .3.9 Postfix
        Determine the parameters for sending of emails from PHP scripts in this part of the general server configuration. Postfix, which is already installed with Mac OS X on your machine, will be used for this.

        -- end --

        The last time I used Formit and worked on localhost, I was using Mac OSX 10.7. Now I'm using 10.8 and it is not working.
        • discuss.answer
          • 12508
          • 63 Posts
          Quote from: Everettg_99 at Jan 28, 2013, 12:45 PM
          That sounds like a real pain. I've lost my mind over stuff like this, and at some point, it can be really good to walk through everything step by step (and yes, it's extremely frustrating to have to do this). Here's what I've done:

          1. Clear the MODx logs and the cache (or nuke the entire contents of core/cache/)
          2. Open up the FormIt Snippet (or whatever the troublemaker is).
          3. Add in some logging calls like the following:

          $modx->log(xPDO::LOG_LEVEL_ERROR,'Here I am... inside FormIt' . __LINE__);
          // Or:
          $modx->log(xPDO::LOG_LEVEL_ERROR, print_r($_POST, true) ); // log ALL posted data
          


          4. Save the modified Snippet
          5. Re-submit your form
          6. Check the logs

          This is a painstaking process sometimes, but it will tell you exactly where the code is breaking (e.g. if you see logging messages 1, 2, but message 3 is AWOL, then you know something broke after the 2nd message). This will also tell you whether the code is executing at all. Another good thing to eyeball is the PHP log on the server AND any firewall logs (e.g. ModSecurity is an awesome application level firewall, but it can kill form posts silently and drive you insane in the process).

          Thanks Everettg_99 for your suggestion. I did it and I see an error on my php_error.log:

          [29-Jan-2013 10:05:09] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 261900 bytes) in /Users/hvillega/Sites/bvd-cms/core/model/modx/modparser.class.php on line 221

          • discuss.answer
            • 12508
            • 63 Posts
            Quote from: benmarte at Jan 28, 2013, 01:47 PM
            Install QuickEmail and diagnose to see if your site is sending emails so we can rule that out.

            Bennmarte, I installed QuickEmail and seems like there is no errors. Here the report:

            System Settings (used if property is missing):
            emailsender System Setting: [email protected]
            site_name System Setting: MODx

            Properties (from parameters, property set, or snippet default properties:
            Tpl chunk name:
            subject:
            to:
            fromName:
            replyTo:
            emailSender:
            allowHtml: 1
            message:

            Final Values (actually used when sending email):
            subject: Default Subject
            to: [email protected]
            fromName: [email protected]
            replyTo: [email protected]
            emailSender: [email protected]
            allowHtml: 1
            Message Body: Default Message

            Send reported successful

            - - end --

            But no mail was sent. :-(
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              If this is from localhost, is it possible that your ISP has blocked the smtp outgoing port? I've had some that did, in order to prevent their customers from sending spam from their local machines.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                Are you sure that the error in your PHP log occurs when you try to submit your form? Sometimes I tail the log live so I can see everything as it is written, e.g.

                tail -f /Applications/MAMP/logs/php_error.log
                


                The parser error isn't specific, and it could be caused by a lot of things, e.g. bad tag syntax or an error in a Snippet somewhere.
                  • 3749
                  • 24,544 Posts
                  Be sure to check your spam folder. Also, depending on the host, the email may not show up right away.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting