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'); //database connection: require (MYSQL); //empty errors for storing errors: $login_errors = array(); //Validate email address: if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)){ $e = mysqli_real_escape_string($dbc,$_POST['email']); }else{ $login_errors['email'] = 'Please enter a valid email address!'; } //Validate password: if (!empty($_POST['pass'])){ $p = mysqli_real_escape_string($dbc, $_POST['pass']); }else{ $login_errors['pass'] = 'Please enter your password!'; } //If no errors, query database (date_expired if greater than or equal to this moment, the value is true if not it is false): if (empty($login_errors)){ $q = "SELECT id, username, type, IF(date_expires >= NOW(), true, false) FROM users WHERE (email ='$e' AND pass ='" . get_password_hash($p) . "')"; $r = mysqli_query ($dbc, $q); //If one row is returned by database query, get data and store in session: if (mysqli_num_rows($r) == 1){ $row = mysqli_fetch_array($r, MYSQLI_NUM); //If administrator, create a new session ID for safety: if($row[2] == 'admin'){ session_regenerate_id(true); $_SESSION['user_admin'] = true; } $_SESSION['user_id'] = $row[0]; $_SESSION['username'] = $row[1]; if($row[3] == 1)$_SESSION['user_not_expired'] = true; //If no row was returned, create error message: }else{ $login_errors['login'] = 'The email address and password do not match those on file.'; } }//End of $login_errors IF.
  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 accepted for Mediacom domains or invalid recipient - POL112 Array ( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mail() [function.mail]: SMTP server response: 550 5.1.1 <gen@mchsi.com> Suspect mail not accepted for Mediacom domains or invalid recipient - POL112 [2] => C:\xampp\htdocs\register.php [3] => 59 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( [first_name] => Gen [last_name] => Koenig [username] => Gen => Gen@mchsi.com [pass1] => Gen1900 [pass2] => Gen1900 [submit_button] => Next → ) [_GET] => Array ( ) [_COOKIE] => Array ( [phpSESSID] => 76k03qejg1kk8uk1ub14nflcg7 ) [_FILES] => Array ( ) [_SERVER] => Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => \xampp\mysql\bin [OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf [php_PEAR_SYSCONF_DIR] => \xampp\php [phpRC] => \xampp\php [TMP] => \xampp\tmp [HTTP_HOST] => localhost [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.25) Gecko/20111212 Firefox/3.6.25 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_KEEP_ALIVE] => 115 [HTTP_CONNECTION] => keep-alive [HTTP_REFERER] => http://localhost/register.php [HTTP_COOKIE] => PHPSESSID=76k03qejg1kk8uk1ub14nflcg7 [CONTENT_TYPE] => application/x-www-form-urlencoded [CONTENT_LENGTH] => 123 [PATH] => C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\QuickTime\QTSystem\; [systemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC [WINDIR] => C:\Windows [sERVER_SIGNATURE] => Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80 [sERVER_SOFTWARE] => Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 [sERVER_NAME] => localhost [sERVER_ADDR] => 127.0.0.1 [sERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [sERVER_ADMIN] => postmaster@localhost [sCRIPT_FILENAME] => C:/xampp/htdocs/register.php [REMOTE_PORT] => 58936 [GATEWAY_INTERFACE] => CGI/1.1 [sERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /register.php [sCRIPT_NAME] => /register.php [php_SELF] => /register.php [REQUEST_TIME] => 1328140273 ) [live] => [contact_email] => postmaster@localhost.com [_SESSION] => Array ( ) [page_title] => Register [pages] => Array ( [Home] => index.php [About] => about.php [Contact] => contact.php [Register] => register.php ) [this_page] => register.php [v] => register.php [k] => Register [dbc] => mysqli Object ( [affected_rows] => 1 [client_info] => mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ [client_version] => 50008 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 22 [server_info] => 5.5.16 [server_version] => 50516 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 82 [warning_count] => 1 ) [reg_errors] => Array ( ) [fn] => Gen [ln] => Koenig => Gen [e] => Gen@mchsi.com [p] => Gen1900 [q] => INSERT INTO users (username, email, pass, first_name, last_name, date_expires) VALUES ('Gen', 'Gen@mchsi.com', '��]E7�#�8���H�(��Z(0�B�V�c�', 'Gen', 'Koenig', ADDDATE(NOW(), INTERVAL 1 MONTH)) [r] => 1 [rows] => 0 [body] => Thank you for registering at . Blah. Blah. ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\register.php [line] => 59 [function] => mail [args] => Array ( [0] => Gen@mchsi.com [1] => Registration Confirmation [2] => Thank you for registering at . Blah. Blah. [3] => From: postmaster@localhost ) ) ) This is line#59 in my register.php file: mail ($_POST['email'], 'Registration Confirmation', $body, 'From: postmaster@localhost'); These are my settings in my php.ini file: [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = mail.mediacombb.net (I called my isp and they told me that this is my SMTP.) ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost Please explain in detail what is wrong and why I am changing it. Error (previously error 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 Line #38 of my config.inc.php file (This is a comment): }//End my_error_handler()definition Error (previously error 2): When logging in and clicking forgot password, I still get object not found error. Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster. Error 404
  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'); //start session: session_start(); //Define error handling (max of 5 arguments): function my_error_handler($e_number,$e_message,$e_file,$e_line,$e_vars){ global $live,$contact_email; //Detailed error message: $message="An error occurred in script '$e_file' on line $e_line:\n$e_message\n"; //add backtrace (information that happended up until this point) info: $message .= " " .print_r(debug_backtrace(),1) . " \n"; //If site isn't live, show error message in browser: if(!$live){ echo' '.nl2br($message).' '; //If site is live, send error to an email (1 means email),(0 means operating system's log): }else{ error_log($message,1,$contact_email, 'From:postmaster@localhost.com'); //If site is live, show generic message if error not a notice: if($e_number!=E_NOTICE){ echo ' A system error occurred. We apologize for the inconvenience. '; } }//End $live IF-ELSE return true; }//End my_error_handler()definition //Apply error handler (tells PHP to use the custom function for handling errors instead of its default): set_error_handler('my_error_handler'); (Should this be in here since the error says the set_error_handler shouldn't be redeclared?) //Redirect invalid users (checks for user_id, redirect to index.php page): function redirect_invalid_user($check = 'user_id', $destination = 'index.php', $protocol = 'http://'){ if (!isset($_SESSION[$check])){ $url = $protocol . BASE_URL . $destination; //header () function redirects: header ("Location: $url"); // exit () terminates the script. If you don't terminate the script, the header() function will continue to execute the script. exit(); } } Problem #2. When logging in and clicking forgot password, I still get object not found error. This is index.php file: require('./includes/config.inc.php'); //include the login file: if($_SERVER['REQUEST_METHOD'] == 'POST'){ include ('./includes/login.inc.php'); (this is the correct path) } include ('./includes/header.html'); //database connection: require (MYSQL); ?> Welcome Welcome to Knowledge is Power, a site dedicated to keeping you up to date on the Web security and programming information you need to know. include ('./includes/footer.html'); ?> This is my login.inc.php file: require('./includes/config.inc.php'); //database connection: require (MYSQL); //empty errors for storing errors: $login_errors = array(); //Validate email address: if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)){ $e = mysqli_real_escape_string($dbc,$_POST['email']); }else{ $login_errors['email'] = 'Please enter a valid email address!'; } //Validate password: if (!empty($_POST['pass'])){ $p = mysqli_real_escape_string($dbc, $_POST['pass']); }else{ $login_errors['pass'] = 'Please enter your password!'; } //If no errors, query database (date_expired if greater than or equal to this moment, the value is true if not it is false): if (empty($login_errors)){ $q = "SELECT id, username, type, IF(date_expires >= NOW(), true, false) FROM users WHERE (email ='$e' AND pass ='" . get_password_hash($p) . "')"; $r = mysqli_query ($dbc, $q); //If one row is returned by database query, get data and store in session: if (mysqli_num_rows($r) == 1){ $row = mysqli_fetch_array($r, MYSQLI_NUM); //If administrator, create a new session ID for safety: if($row[2] == 'admin'){ session_regenerate_id(true); $_SESSION['user_admin'] = true; } $_SESSION['user_id'] = $row[0]; $_SESSION['username'] = $row[1]; if($row[3] == 1)$_SESSION['user_not_expired'] = true; //If no row was returned, create error message: }else{ $login_errors['login'] = 'The email address and password do not match those on file.'; } }//End of $login_errors IF.
  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 these email addresses are in my user table) and click forgot password, I get the following error. Example of e-mail address: Brooke@mchsi.com. (this is what I am entering as it is in the user table). Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster. Error 404 localhost 01/30/12 20:51:22 Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Error when logging in with password (This file is according to the book and my dbc is defined in my config.inc.php file and my user table is updating when the users register the first time.): An error occurred in script 'C:\xampp\htdocs\includes\login.inc.php' on line 6: Undefined variable: dbc This is the first part of my login.inc.php file: <?php //empty errors for storing errors: $login_errors = array(); //Validate email address: if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)){ $e = mysqli_real_escape_string($dbc,$_POST['email']); }else{ $login_errors['email'] = 'Please enter a valid email address!'; }
  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 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost
  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 my config.inc.php file is: $contact_email='lkkerns@mchsi.com'; In my register.php file (line 59) is: mail ($_POST['email'], 'Registration Confirmation', $body, 'From: lkkerns@mchsi.com');
  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, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Array ( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mail() [function.mail]: Failed to connect to mailserver at "me@example.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() [2] => C:\xampp\htdocs\register.php [3] => 59 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( [first_name] => Lesley [last_name] => Pallies [username] => Lesley => Lesley@example.com [pass1] => Lesley45 [pass2] => Lesley45 [submit_button] => Next → ) [_GET] => Array ( ) [_COOKIE] => Array ( [phpSESSID] => i08v7ule9inqpddlocj3i5kha5 ) [_FILES] => Array ( ) [_SERVER] => Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => \xampp\mysql\bin [OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf [php_PEAR_SYSCONF_DIR] => \xampp\php [phpRC] => \xampp\php [TMP] => \xampp\tmp [HTTP_HOST] => localhost [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.25) Gecko/20111212 Firefox/3.6.25 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_KEEP_ALIVE] => 115 [HTTP_CONNECTION] => keep-alive [HTTP_REFERER] => http://localhost/register.php [HTTP_COOKIE] => PHPSESSID=i08v7ule9inqpddlocj3i5kha5 [CONTENT_TYPE] => application/x-www-form-urlencoded [CONTENT_LENGTH] => 137 [PATH] => C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\QuickTime\QTSystem\; [systemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC [WINDIR] => C:\Windows [sERVER_SIGNATURE] => Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80 [sERVER_SOFTWARE] => Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 [sERVER_NAME] => localhost [sERVER_ADDR] => 127.0.0.1 [sERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [sERVER_ADMIN] => postmaster@localhost [sCRIPT_FILENAME] => C:/xampp/htdocs/register.php [REMOTE_PORT] => 50534 [GATEWAY_INTERFACE] => CGI/1.1 [sERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /register.php [sCRIPT_NAME] => /register.php [php_SELF] => /register.php [REQUEST_TIME] => 1327891244 ) [live] => [contact_email] => you@example.com [_SESSION] => Array ( [user_admin] => 1 ) [page_title] => Register [pages] => Array ( [Home] => index.php [About] => about.php [Contact] => contact.php [Register] => register.php ) [this_page] => register.php [v] => register.php [k] => Register [dbc] => mysqli Object ( [affected_rows] => 1 [client_info] => mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ [client_version] => 50008 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 8 [server_info] => 5.5.16 [server_version] => 50516 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 10 [warning_count] => 1 ) [reg_errors] => Array ( ) [fn] => Lesley [ln] => Pallies => Lesley [e] => Lesley@example.com [p] => Lesley45 [q] => INSERT INTO users (username, email, pass, first_name, last_name, date_expires) VALUES ('Lesley', 'Lesley@example.com', '��3K@�3���ea��{z�\"Tv|�R5��', 'Lesley', 'Pallies', ADDDATE(NOW(), INTERVAL 1 MONTH)) [r] => 1 [rows] => 0 [body] => Thank you for registering at . Blah. Blah. ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\register.php [line] => 59 [function] => mail [args] => Array ( [0] => Lesley@example.com [1] => Registration Confirmation [2] => Thank you for registering at . Blah. Blah. [3] => From: me@example.com ) ) )
  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(www.example.com/includes/mysql.inc.php) [function.require]: failed to open stream: No such file or directory Fatal error: require() [function.require]: Failed opening required 'www.example.com/includes/mysql.inc.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\index.php on line 8 In my php.ini file under paths and directories, it has: ; Windows: "\path1;\path2" include_path = ".;C:\xampp\php\PEAR" Does this need to be changed to www.example.com or do I change my constants to this path? Thank you, Lynae
  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_entry.php?id={$row['entry_id']}\">Delete</a> </p><hr />\n");
  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 entered in the php.ini and bin\my.ini files. Nothing works. Any suggestions?
×
×
  • Create New...