Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

PHP AND MYSQL PROBLEM!


  • Please log in to reply

#16
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
the only thing displayed from index.php that looks troublesome is:

_SERVER["REQUEST_METHOD"] GET

but the direct call using mailto() failed earlier, which bypassed using the form.

I'm not familiar with the SMTP settings. are these default values?

EDIT:
again, not being familiar with setting up a server, the following variables have no value:sendmail_from and sendmail_path. this may or may not be a problem.

EDIT #2:
is there an error recorded in the site error log when attempting to run mailto()?

Edited by bdlt, 20 December 2005 - 10:19 AM.

  • 0

Advertisements


#17
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
here's another link - this one is for email settings:

http://us2.php.net/mail


EDIT: here's another

http://www.sitepoint...anced-email-php

Edited by bdlt, 20 December 2005 - 10:59 AM.

  • 0

#18
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
Have you configured Exchange on this server? Most likely you have not enabled "Local relay". This is can be found in Exchange>system Manager>Servers>Name of your server>protocols>SMTP>default smtp>properties>Access>Relay Restrictions>Then grant access to the ips of puters on your network that you wish to allow mail relay. This should solve your relay issue and your site should now be able to send mail. On the note of your sql issue, did you uncomment the Ext_mysql line in php.ini?

Hope this Helps :tazz:

-Lee

Edited by sinisfun, 20 December 2005 - 01:19 PM.

  • 0

#19
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
I'm not using SQL. Do I need to have MYSQL install to use mail_From?

I did the Exchange Relay thing, but for some reason, it's still now working.

Thanks Guys!

Edited by jrm-hosting, 20 December 2005 - 09:58 PM.

  • 0

#20
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
What kind of package is your isp providing you with? If you are on a residential plan they may be blocking outbound port 25 unless it is destined for their mail relay. If that is the case you can set you page to relay through blah.yourisp.ispmail.net or simular. If that is not the case then there could be a few more things we can try, however we should rule this out before we get into the fun stuff. If they are blocking port 25 you may have to step up to an business package to eliminate this issue. You may have to blast a quick email or phone call off to their tech sup line.

-Lee

Edited by sinisfun, 20 December 2005 - 10:00 PM.

  • 0

#21
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
I have comcast and I think I have asked them about that and they told me that they are not blocking anything. I can send and receive email to and from my exchange server. I'm hosting my site.
  • 0

#22
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
But your server is not relaying mail correct?
  • 0

#23
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
I'm not quite sure I understand. I can send and receive both from the local pcs and via OWA.
  • 0

#24
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
Then maybe I am miss understanding, wanna give me a brief run through on what your problems are?

Edited by sinisfun, 20 December 2005 - 10:10 PM.

  • 0

#25
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
Ok. Here's the situation:

I can send and receive emails from my local PCs, Via the web externally, I can do POP.

Now, I wanna use PHP for my contact form and the script seem to be working because I'm getting directed to the thank you page, but I'm not getting the results in my email.
  • 0

Advertisements


#26
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
OK, so you are having local relay issues, possibly due to permissions. How is your page calling sendmail?
  • 0

#27
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
<?
$to = "jmetellus@jrm-hosting.com";
$name = $_POST['name'];
$email = $_POST['email'] ;
$subject = $_POST['subject'];
$comments = $_POST['comments'] ;

mail( $to, $subject, $name, "Feedback Form Results", $comments );
header( "Location: thankyou.htm" );
?>
  • 0

#28
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
Name this one process.php
<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($subject);
$text = stripslashes($text);
mail('youremail@domain.com',$subject,$text,"From: $name <$email>");
header("location:form.php");
?>
and this one form.php
<form action="process.php" method="post">
Name: <input type="text" name="name" size="20" maxlength="20"><br />
Email: <input type="text" name="email" size="30" maxlength="30"><br />
Subject: <input type="text" name="subject" size="30" maxlength="30"><br />
Text:<textarea name="text" name="text" cols="50" rows="10"></textarea><br />
<input type="submit" name="submit" value="Send">
</form>


Replace the pertinant info with your mail addy, and post it to your site, then see if that one works. Lets see where that takes us....
  • 0

#29
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
checkit out: http://jrm-hosting.com/form.php
I get nothing in my email.
  • 0

#30
sinisfun

sinisfun

    Member

  • Member
  • PipPip
  • 52 posts
Did you have any problems when you installed exchange?
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP