Jump to content
Larry Ullman's Book Forums

Lynae

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Lynae

  • Rank
    Newbie
  1. I resolved this error: Fatal error: Cannot redeclare my_error_handler() (previously declared in C:\xampp\htdocs\includes\config.inc.php:18) in C:\xampp\htdocs\includes\config.inc.php on line 38 I figured out I was including the config.inc.php file and MYSQL in the login.inc.php file. I took these out and it fixed the error. I also resolved my invalid path error: I had the path for the link to the forgot_password.php with an extra s (forgot_passsword.php). Frustrating but finally got it!
  2. Thanks Edward but I get this error (when accessing the index.php) if I change it to that: arse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\includes\config.inc.php on line 9 (first line iine in define for the constants) According to our instructor, it should be how I have it below. I am not having a problem registering it is just my other two errors in my previous post. define ('BASE_URI', 'http://localhost/'); define ('BASE_URL','/www/'); define ('MYSQL','/includes/mysql.inc.php');
  3. I don't get the error when registering anymore. The problem was I put MYSQL connection was after the header file. (errata in book corrects this) Still getting the other two errors? I get this error when logging in with my password: Problem #1. Fatal error: Cannot redeclare my_error_handler() (previously declared in C:\xampp\htdocs\includes\config.inc.php:18) in C:\xampp\htdocs\includes\config.inc.php on line 38 I listed the config.inc.php file in previous post so is this coming from the login.inc.php which is the following: <?php require('./includes/config.inc.php'); //d
  4. Yes, this book is for a class. I don't think this is for me but I need to get through the class. How is this incorrect if my database is updating? URL is website and URI is path, correct? //Define constants: define ('BASE_URI', 'http://localhost/'); define ('BASE_URL','/www/'); define ('MYSQL','/includes/mysql.inc.php'); Another error (God help me!): When registering a user, I get the following error: An error occurred in script 'C:\xampp\htdocs\register.php' on line 59: mail() [function.mail]: SMTP server response: 550 5.1.1 <gen@mchsi.com> Suspect mail not accept
  5. Hi Edward, I appreciate your patients! Okay. This class is going to send me over the edge! I get this error when logging in with my password: Problem #1. Fatal error: Cannot redeclare my_error_handler() (previously declared in C:\xampp\htdocs\includes\config.inc.php:18) in C:\xampp\htdocs\includes\config.inc.php on line 38 This is my config.inc.php file: //Define variables: $live=false; $contact_email='postmaster@localhost.com'; //Define constants: define ('BASE_URI', 'http://localhost/'); define ('BASE_URL','/www/'); define ('MYSQL','/includes/mysql.inc.php');
  6. Okay, I called my isp and got the address below. This took care of the previous error. Is this the only thing I need to change with the setting below? So the e-mail address in my config.inc.php and register.php files don't really matter? I have two more issues described below. [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = mail.mediacombb.net ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost Chpt 4 logging in: When I type a previously registered email address (I verified that t
  7. I have windows 7. I am confused because last semester in my PHP class, I didn't have a problem. I had my php.ini file set to me@example.com. So if I only need it for class and testing on localhost, what do I need to change? So if I only test on my localhost, what do I put for SMTP server and why didn't I have a problem last semester when testing my files? Sorry I am not understanding. So if I have a gmail account, this doesn't work either. [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = lynaekern@gmail.com ; http://php.net/smtp-port smtp_port = 25 ; For Win32 o
  8. I still get an error & am confused. Please clarify: Error: An error occurred in script 'C:\xampp\htdocs\register.php' on line 59: mail() [function.mail]: Failed to connect to mailserver at "lkkerns@mchsi.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() I set my php.ini file to my email address: [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = lkkerns@mchsi.com ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost My email variable in m
  9. I get the following error when trying to register on the website. Mercury in running in my xampp. In my register.php file on line 59, I have: mail ($_POST['email'], 'Registration Confirmation', $body, 'From: me@example.com'); In my php.ini file, I have the mailserver set to me@example.com The following is the message I get when registering: Thanks! Thank you for registering! You may now log in and access the site's content. An error occurred in script 'C:\xampp\htdocs\register.php' on line 59: mail() [function.mail]: Failed to connect to mailserver at "me@example.com" port 25
  10. I am unclear what I need to include for the first two constants on page 58, problem 3. Do I need to set the first constant up since my setup is according to figure 3-3? The second and third constants are set up: define ('BASE_URL','www.example.com/'); line 8 define ('MYSQL', BASE_URL . 'includes/mysql.inc.php'); Is this defining the URL of the website and do I also need to change this URL in my php.ini file? This part doesn't make sense to me since I am using http://localhost/ These are my errors: An error occurred in script 'C:\xampp\htdocs\index.php' on line 8: require
  11. I am working on #4 pursue (chapter 12): convert newline characters into HTML break tags: It looks like I need to use the n12br but I can't get it to work in my view_entry.php. I thought I could simple add this code after the print below but it doesn't work. Many examples that I found show using the echo but I tried that and it doesn't work either. Any suggestions? while ($row = mysql_fetch_array($r)){ print n12br("<p><h3>{$row['title']}</h3> {$row['entry']}<br /> <a href=\"edit_entry.php?id={$row['entry_id']}\">Edit</a> <a href=\"delete_en
  12. I got my script to work by: leaving my mysql_start.bat open and I looked up the standard values for the user id and the password.
  13. I am working on Script 12.1 and I get an error message: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Lynae'@'localhost' (using password: NO) in C:\xampp\htdocs\mysql_connect.php on line 14 Could not connect to MySQL. What file is this trying to access when verifying my localhost, username, and password? I have played around with my php.ini and my.ini and neither one seems to effect it. MySQL is running. I also tried this path to access MySQL: C:\xampp\mysql\bin\mysql -u Lynae -p password: I have tried no password, the password that I manually enter
×
×
  • Create New...