View Single Post
Old 09-08-2021, 08:44 AM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,057
Quote:
Originally Posted by Publisher Bucks View Post
Line 118 in recipesnew.php is:



Also, a quick question sarettah, what is the purpose of having the charset=utf8 in there? Wont it do the same thing without that? Just pull the databases name, or is that a security thing?
Your error: /blah/blah/domain.com/recipesnew.php(118): PDO->__construct('mysql:host=loca...', NULL, NULL, Array)

indicates that you are not passing in a username or password. The places that say NULL, NULL right before the Array indicate that $dbuser and $dbpass are coming in as NULL meaning there ain't nothing there.

Your error: /blah/blah/domain.com/recipesnew.php(118): PDO->__construct('mysql:host=loca...', NULL, NULL, Array)

PDO("mysql:host=$dbhost;dbname=$dbname" ,$dbuser,$dbpass,array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
}


So, if you are using the dbcreds.php file then the problem is in there. If you are not using that and have the user and password hardcoded then that would be where the issue is.


The charset=utf8 just tells it to accept utf8 characters. The routine I pulled it from has to handle various different languages. I pretty much have everything I do coded for utf8 (unicode).

.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote