Jump to content
Larry Ullman's Book Forums

Chapter 18 Not Able To Validate User


Recommended Posts

Hi larry, I have been able to make all of your lessons work up to chapter 18. Using PHP 5.3.8 on Windows Vista with Xampp 1.7.7 installed.

 

In Chapter 18 when testing on my computer as localhost, The registered user never receives an

e-mail to validate his account. My best guess is a possible dissconnect with my e-mail server. I am

still rather new to all of this PHP programing so any suggestions you can give would be greatly appreciated.

Link to comment
Share on other sites

I have configured Mercury email and sent numerous test messages as admin@localhost through Mozilla Thunderbird

the email messages always get sent. Therefore I don't understand why registered users are not receiving

an email confirmation when doing the exercises in Chapter 18. I can only come up with the possibility that all the my

confirmation emails are being rejected as spam.

Link to comment
Share on other sites

Thanks for your reply.

 

Inside php.ini, I have tried using: sendmail_from = admin@localhost sendmail_from = localhost.com sendmail_from = localhost

 

inside ch18/includes/config.inc.php I have: define('EMAIL', 'admin@localhost'); define('BASE_URL', 'http://localhost/ch18/');

Link to comment
Share on other sites

In the php.ini, I would use the "From" address that you know works in Thunderbird. You can play with different "From" addresses in the PHP script, then. Also try different "To" addresses, starting with the one you knew worked from Thunderbird.

Link to comment
Share on other sites

hi sir

In the php.ini, I would use the "From" address that you know works in Thunderbird. You can play with different "From" addresses in the PHP script, then. Also try different "To" addresses, starting with the one you knew worked from Thunderbird.

 

hi sir i am having a problem. the activation message which i received in my thunder bird is successful however when i click the generated link "http://www.example.c...29aa192acc379b7" it forwards me to the this site "http://www.iana.org/domains/example/" even though in my script i wrote this "$body .= BASE_URL . 'activate.php?x=' . urlencode($e) . "&y=$a";" what might be the problem? if i cant fix it i think i cant make to it next topic because i cant activate the account created and cant login.

Link to comment
Share on other sites

  • 4 weeks later...

OK, here is where I am at. I found out how to send an email to validate a registered user in Chapter 18.

 

I finally gave up on using windows to send email.

 

So here is some encouragement for those who are still reluctant to attempt the linux operating system.

 

As a newbie, I was able to setup Ubuntu 12.04 on a Windows PC and this is how I set up my computer

to send email.

 

First you must install a software package called "Sendmail." -- I let Ubuntu install this package for me.

 

Once you have installed Sendmail, you should test to make sure that it is installed and in working order.

To do this go to the Linux Command Prompt and enter the command:

$ echo "my sendmail test" | /usr/sbin/sendmail user@remote.host

 

Replace user@remote.host with an actual working email address. Then check to see if a message was

sent to that address. It should read "my sendmail test" in the body of the email.

 

Now that you have Sendmail up and running, you will then need to configure your php.ini file to recognize

Sendmail. You can find the location of your php.ini file by looking inside your php.info.

 

Before editing your php.ini file. You need to stop your server with this command:

/opt/lampp/lampp stop

 

Inside php.ini look for the "Sendmail_path." Then complete the path by typing the following command:

Sendmail_path = /usr/sbin/sendmail -t -i

 

restart your server with this command: /opt/lampp/lampp start

 

With any luck, you should now be able to send email using php / mail( ) function.

for further discussion on Sendmail and sending email. Consider the following sources:

www.php.net/manual/en/mail.configuration.php

http://forum.powweb....ead.php?t=38269

Link to comment
Share on other sites

 Share

×
×
  • Create New...