titothefixer

Q: Why won't my Server hosted website's contact form work?

I am using Server 5.0.15 to host a website that I built with Adobe Muse.  I am trying to use a contact form that uses PHP.  It is enabled and I still can't receive emails.  How do I fix it?

iMac, OS X Server

Posted on Feb 17, 2016 6:48 PM

Close

Q: Why won't my Server hosted website's contact form work?

  • All replies
  • Helpful answers

  • by Ivan Robertovich,

    Ivan Robertovich Ivan Robertovich Feb 19, 2016 6:53 AM in response to titothefixer
    Level 1 (53 points)
    Notebooks
    Feb 19, 2016 6:53 AM in response to titothefixer

    In the advanced panel of the server app for the website, try enabling htaccess overrides for that site. 

     

    Otherwise, look in the website error log and find messages for "POST" type from your IP and copy those here.

  • by Ivan Robertovich,

    Ivan Robertovich Ivan Robertovich Feb 19, 2016 6:55 AM in response to Ivan Robertovich
    Level 1 (53 points)
    Notebooks
    Feb 19, 2016 6:55 AM in response to Ivan Robertovich

    One other thing.  Be sure that muse doesn't expect php to make a database connection.  Check the documentation for it. 

  • by titothefixer,

    titothefixer titothefixer Feb 19, 2016 8:34 AM in response to Ivan Robertovich
    Level 1 (0 points)
    Feb 19, 2016 8:34 AM in response to Ivan Robertovich

    enabling htacess has caused an error.  This is the only thing that comes up in the error log:

     

    [Fri Feb 19 11:24:59.959659 2016] [:error] [pid 86318] [client 127.0.0.1:62446] script '/Library/Server/Web/Data/Sites/www.andrewjeter.com/scripts/form-u342.php' not found or unable to stat, referer: http://www.andrewjeter.com/contact-me.html

  • by Ivan Robertovich,

    Ivan Robertovich Ivan Robertovich Feb 19, 2016 9:04 AM in response to titothefixer
    Level 1 (53 points)
    Notebooks
    Feb 19, 2016 9:04 AM in response to titothefixer

    Sounds like a permissions error.

     

    Check the file (you can use finder) and be sure the _www user can see it and execute it.

     

    The other problem possible here is that the file wasn't saved to the same document root.  Be sure your website location is selected correctly. 

     

    Are you familiar with terminal?   If so, you need to change owner to _www:_www and be sure that file has x

  • by titothefixer,

    titothefixer titothefixer Feb 19, 2016 9:19 AM in response to Ivan Robertovich
    Level 1 (0 points)
    Feb 19, 2016 9:19 AM in response to Ivan Robertovich

    I fixed that issue by deleting all the files in the website folder and reloading.  I no longer get that error.  I'm back to my original problem.  I have allowed htacess and I am getting no errors in the log.  I have searched adobe forums and can't find a requirement for a database connection.  Any other ideas?

  • by Ivan Robertovich,

    Ivan Robertovich Ivan Robertovich Feb 19, 2016 9:21 AM in response to titothefixer
    Level 1 (53 points)
    Notebooks
    Feb 19, 2016 9:21 AM in response to titothefixer

    Check the permissions and be sure _www can execute the file

     

    when hen you say it doesn't work, what happens?  Are you supposed to get an email?   Is email service on and sending mail otherwise?

  • by titothefixer,

    titothefixer titothefixer Feb 19, 2016 9:27 AM in response to Ivan Robertovich
    Level 1 (0 points)
    Feb 19, 2016 9:27 AM in response to Ivan Robertovich

    I am not very familiar with terminal the only time I've used it, I copy/paste commands. 

     

    It is supposed to send me an email with the details of the form.  I was able to get it to work when hosting my website on Machighway but I want to host on my own server.  I have multiple websites I want to host but don't want to pay for every site. 

  • by Ivan Robertovich,

    Ivan Robertovich Ivan Robertovich Feb 19, 2016 9:31 AM in response to titothefixer
    Level 1 (53 points)
    Notebooks
    Feb 19, 2016 9:31 AM in response to titothefixer

    II think we found your issue. 

     

    Donyou have email set up on this server?   It won't send you email unless you do.

  • by titothefixer,

    titothefixer titothefixer Feb 19, 2016 9:41 AM in response to Ivan Robertovich
    Level 1 (0 points)
    Feb 19, 2016 9:41 AM in response to Ivan Robertovich

    OK, that is another issue I've been having.  Port 25 is blocked through my ISP.  I haven't been able to get that to work. 

  • by Ivan Robertovich,

    Ivan Robertovich Ivan Robertovich Feb 19, 2016 9:50 AM in response to titothefixer
    Level 1 (53 points)
    Notebooks
    Feb 19, 2016 9:50 AM in response to titothefixer

    OK.  Let's solve your email issue first.  Does your ISP permit SMTP forwarding?   If so, your server can be told how to play by their rules.

     

    Apple says SMTP relay is set up like this:

     

    1. Open Server.app
    2. In the Mail pane, select “Relay outgoing mail through ISP.”
      If this option is already selected, click the Edit button. A prompt appears where you can enter your relay server connection details.
    3. Click the box next to "Relay outgoing mail through ISP."
    4. Click the Edit button.
    5. Enter the relay server DNS name or IP address.
  • by titothefixer,

    titothefixer titothefixer Feb 22, 2016 8:22 AM in response to Ivan Robertovich
    Level 1 (0 points)
    Feb 22, 2016 8:22 AM in response to Ivan Robertovich

    I finally got this entered.  The error log says "no route to host"