In week 9 source codes, can anyone post the output screen of froshims-1.php. When i run it, it doesn't make a difference whether or not I include bootstrap. Nor does it make a difference if I delete the bootstrap folder. I am guessing that the bootstrap folder doesn't have proper permissions.. Just to confirm, please post a picture of what the output should look like. Also, for froshims-3.php i keep getting this error

Undefined property: PHPMailer::$ErrInfo in /home/jharvard/vhosts/localhost/public/register.php on line 23

This is the line on which my die function is present. So i believe the email is not being sent properly.


For the permissions issue, open up the terminal and navigate your way to the folder inside of which is that folder that contains the bootstrap folder and the other froshims php files using the cd command

In my case, they're located in ~/vhosts/localhost/public/froshims so I'll execute these commands

cd ~/vhosts/localhost/public/
chmod 600 froshims/*
chmod 711 froshims froshims/bootstrap froshims/bootstrap/*
chmod 644 froshims/bootstrap/css/* froshims/bootstrap/fonts/* froshims/bootstrap/js/*

Now everything should be having the proper permissions.

For more information about sending mails, check out this!

  • I executed these permission changes and changed the AddAddress value in register-3.php to my non-harvard.edu email address. Get message "Undefined property:PHPMailer::$ErrInfo" at line line 48. So, I don't know why send is still failing. Is there a username/password needed to use the Harvard SMTP server? Or, is something else missing?
    – pokerbeing
    Feb 12 '15 at 22:10
  • I added error trapping: catch (phpmailerException $e) { echo $e->errorMessage(); } Changed it to use my gmail account and smtp.gmail.com, and now got it to properly send email.
    – pokerbeing
    Feb 12 '15 at 22:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .