Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Posts

    5413
  • Joined

  • Last visited

  • Days Won

    155

Everything posted by Larry

  1. Okay, so, first, $_SESSION and $GLOBALS aren't passed from script to script. They always exist and are read from the environment. But I'm not sure why you're using $GLOBALS at all. I don't think I've ever used that. Why aren't you setting values in the $_SESSION array like normal?
  2. In a situation like this, I'd start by verifying the session ID, which will tell you whether a new session is being started or not.
  3. Hmmm...could you explain in more detail what you're seeing (i.e., what's not happening that should or what is happening that shouldn't)? The most details the better!
  4. Where on your file system is your mysql_connect.php script? Also, please please please stop using all caps.
  5. Yeah, that would seem to be the case. You want that message to handle the situation when agent is set, right?
  6. According to your logic: if (!isset($_POST['agent']) ) { // Print the results if Agent: echo "<p>Thank you <b>$agent</b> for your request for <b>$guest</b>.</p> <p>We will reply to you at <i>$email</i>.</p>\n"; The conditional checks if agent *is not* set. But the following comment suggests the message is printed if there is an agent. One of these two seems to be wrong.
  7. This is just a simple matter of your path to the file being included is incorrect. The code you're using expects mysql_connect.php to be one folder up from register.php.
  8. SSL does put additional loads on the server, but due to improvements in servers and browsers in recent years, it's not significant. I see numbers as low as a 1-2% additional load for SSL.
  9. Okay, that's helpful! I would click on the Apache "Logs" button to view the error logs. At the end of them there should be an error message indicating why it didn't start. It's likely it's a port issue (e.g., if you've also installed Skype). If you search Google for that, you'll come up with likely solutions, such as: https://www.geckoandfly.com/7491/xampp-apache-wont-start-change-port-to-listen-85/ And could you please turn off the caps lock? Thanks!
  10. What operating system are you trying to install this on? What are you specifically trying to install? What is the specific error message you're seeing and at what step?
  11. Hmm... I don't really know! I'll investigate and see if I can turn up anything (a quick search wasn't helpful).
  12. Ah, that would do it! No need to feel stupid; it happens to the best of us. Kudos for figuring it out and thanks for sharing the solution!
  13. I learned HTML originally from http://www.peachpit.com/store/html-and-css-visual-quickstart-guide-9780321928832 but it's 5 years old now, so that's probably not the best choice. Maybe someone else has other recommendations?
  14. It's probably not loading the CSS file. Make sure it exists in the proper directory consistent with how the HTML references it. You can use your browser's developer tools to also confirm whether or not it's being loaded.
  15. Yeah, arguably using SSL all the time is the best current practice. Use a rewrite rule to force SSL and ensure you're using relative links everywhere so it should stay on HTTPS.
  16. Your internet provider does not give you an SSL connection. You should be using the Terminal on your Mac to connect to MySQL on your Mac, so it should be okay that it's not SSL. Nothing happens. The files are all on your computer. When you go to create a website *on a hosted server*, you'll export the database from your local MAMP installation and then import it (using phpMyAdmin or whatever) on the hosted server. I'm not familiar with upgrading the MySQL database, but that error would suggest you're using the wrong password.
  17. Hey Julien! So long as you're never storing anything sensitive in your local MySQL database, I don't think it's a problem to leave the password unchanged. And, if you change the root password in MySQL, you'll need to change your phpMyAdmin config, too. So that's another argument against. That being said, what you're doing wrong is not using the correct current password! According to Google searches (and I thought I said this in the book), the default root user password should be "root".
  18. Yeah, this error means the query returned false instead of 0 or more results, which means the query has an error in it. Most likely there's a mismatch between the query and how the table is defined. The easiest way to know the specific problem is to print out the MySQL error.
  19. Glad to hear it's working! And thanks for your question about the e-commerce book. There's no plans for another edition at the moment, so not for the foreseeable future.
  20. Okay, good. So SHA2() with a length of 512 should return a string with a length of 128, so VARCHAR(128) or VARCHAR(256) should be fine. I imagine something was just missed along the way which is why a match isn't made. I'd start by registering a new users and logging in that user. Use a simple and obvious password, like "password" (without the quotes). Or you can just run an UPDATE query, updating all the registered users to a new password of "password" (I assume this is all in a test environment with no actual users). You can also do SELECT SHA2('password', 512) in phpMyAdmin to see what that string's value should be. Then if you look at the stored passwords you could see if there's a problem such as the stored value being cut off b/c the database column is too short.
  21. So it really depends upon what method is being used for encrypting and decrypting the password. You've done some great debugging in determining that the email address is fine but the password doesn't match. What code is being used to encrypt and store the password? What code is being used to fetch and check for a password match?
  22. If I recall correctly, different methods for storing the password are used at different points. So that varchar(128) is probably for a different approach.
×
×
  • Create New...