If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Messages posted by: cdonner
Forum Index » Profile for cdonner » Messages posted by cdonner
Author Message
I am asking if there could be a problem with the code - I really don't feel like becoming an PHP expert in order to get this working.
I manually created the MySQL account and I KNOW what the correct password is, and the correct password is in the config file. The fact that the admin interface works PROVES this because the admin interface also has to connect to the database in order to function, and I know that it pulls in the same config file because it writes my traces to the screen.
What I am saying is that I inspected - by using output statements - the value of the user id and password fields of the $POLLDB array, or object, or whatever it is, and they are EMPTY in the method that uses the values to open a database connection. Somehow the global variable $POLLDB is not visible inside this method. All I am asking is that someone who understands PHP better than I take a look at this if there is an easy explanation for this behavior. Thanks.
mysql_connect(): Access denied for user: 'cdonner@localhost' (Using password: NO) in /home/cdonner/public_html/cdonner/polls/include/class_mysql.php on line 34

The admin interface works (which uses the same config file, so don't give me crap about not using the correct database credentials like some of the poor souls who posted here earlier). I am using MySQL and as you can see from the error message, the correct database interface got involved. Save to say that my include path is correct as well. The funny thing is, when I inspect the value of the user id and password in booth.php, they are correct, but in class_mysql.php they have no value. It looks like the global $POLLDB is not known inside of class_mysql.php. I don't program PHP and don't really know the language, but could it be that the construct with this global array is not working as intended under certain circumstances/environments? PHP version is 4.3.10.
 
Forum Index » Profile for cdonner » Messages posted by cdonner
Go to:   
Based on the open source JForum