Fatal Error: Cannot connect to database, access denied.

Start here! No need to ask twice :)

Fatal Error: Cannot connect to database, access denied.

Postby slambridis » 6:59pm, Mon 08 May, 2006

OK, I promise I did a bunch of searches first before posting this. And I will admit that I have no idea how to use php so I'm probably doing something very basic incorrect. When I go to the lists/admin/ page, I get the error:

Fatal Error: Cannot connect to database, access denied. Please contact the administrator

My hosting is through MediaTemple and I'm working off of an XPsp2 machine.

Here's how the config page is currently set up:
Code: Select all
*/
# select the language module to use
# Look for <country>.inc files in the texts directory
# to find your language
# this is the language for the frontend pages. In the admin pages you can
# choose your language by using the dropdown in the pages.
$language_module = "english.inc";

# what is your Mysql database server
$database_host = "localhost";

# what is the name of the database we are using
$database_name = "phplistdb";

# who do we log in as?
$database_user = "username@omnibucket.com";

# and what password do we use
$database_password = '******';

# if you use multiple installations of PHPlist you can set this to
# something to identify this one. it will be prepended to email report
# subjects
$installation_name = 'PHPlist';

# if you want a prefix to all your tables, specify it here,
$table_prefix = "phplist_";

# if you want to use a different prefix to user tables, specify it here.
# read README.usertables for more information
$usertable_prefix = "phplist_user_";

# if you change the path to the PHPlist system, make the change here as well
# path should be relative to the root directory of your webserver (document root)
# you cannot actually change the "admin", but you can change the "lists"
$pageroot = '/lists';
$adminpages = '/lists/admin';
/*


On thing I think I might be doing wrong is that I never posted my /bin/ or /scripts/ directories up on the server because the instructions never said to, but I'm assuming they should be.

Anyone care to lend a hand?

Thanks,
s
slambridis
phpLister
 
Posts: 5
Joined: 5:19pm, Mon 08 May, 2006

Postby michiel » 1:06am, Tue 09 May, 2006

that error indicates there is something wrong with your database connection details.

a Database connection requires four things, and they are very sensitive to errors (just one little typo and it won't work).

- a database host (the name of the server, in many cases "localhost" works, but not always)
- a database "user" the name of the user who can connect to this host
- a database "password" the password to use for the connection
- a database "name" the name of the database to use.

if any of these four are incorrect, you get the error. So, it's best to double, triple or whatever check your settings, and otherwise ask your ISP why it doesn't work. It's possible, although a bit unlikely, that they made a mistake with their permission settings, but you never know.

and no, you did not have to upload the "bin" or "scripts" directories. Just the "lists" one is all you need in a normal situation.
michiel
Admin
 
Posts: 1022
Joined: 10:18pm, Fri 11 Apr, 2003
Location: Buenos Aires, Argentina

Postby slambridis » 4:15pm, Thu 11 May, 2006

OK, I got it working, but how do I get rid of the "Warning: In safe mode, not everything will work as expected" from the Admin pages?
slambridis
phpLister
 
Posts: 5
Joined: 5:19pm, Mon 08 May, 2006

Postby michiel » 4:17pm, Thu 11 May, 2006

there's an option in the config file to switch that off.
michiel
Admin
 
Posts: 1022
Joined: 10:18pm, Fri 11 Apr, 2003
Location: Buenos Aires, Argentina

Postby slambridis » 4:39pm, Thu 11 May, 2006

OK, I turned it off in the config file, but it still gives the same message. When I try to process a message it states:

"Your webserver is running in "safe_mode"."

I'm running a shared server off of Media Temple...is this something I have to ask them about?
slambridis
phpLister
 
Posts: 5
Joined: 5:19pm, Mon 08 May, 2006

Postby michiel » 5:28pm, Thu 11 May, 2006

yes, but if you're in shared hosting, it's unlikely they will switch it off.

that message will remain, even if you switch off the warnings in the config file.
michiel
Admin
 
Posts: 1022
Joined: 10:18pm, Fri 11 Apr, 2003
Location: Buenos Aires, Argentina

Postby slambridis » 5:36pm, Thu 11 May, 2006

hmmm...so, basically since i'm on a shared server, then phplist is useless to me because i can't actually send any messages?

i would find that strange considering they pointed me to this.
slambridis
phpLister
 
Posts: 5
Joined: 5:19pm, Mon 08 May, 2006

Postby michiel » 5:52pm, Thu 11 May, 2006

no, if you're on a shared server or in safe mode, phplist will work fine, but not as nicely as when it hadn't been in safe mode.
michiel
Admin
 
Posts: 1022
Joined: 10:18pm, Fri 11 Apr, 2003
Location: Buenos Aires, Argentina

Postby slambridis » 6:58pm, Thu 11 May, 2006

Ah, well allrighty then! One last question for you then (and thank you very much for the quick replies). If my list members are within the phpList app, I don't actually need to create a seperate table in mysql admin, correct? it's auto-generated based upon the list users entered through the phplist admin, yes?

learning like a newbie learns,
s
slambridis
phpLister
 
Posts: 5
Joined: 5:19pm, Mon 08 May, 2006

Postby michiel » 5:54pm, Fri 12 May, 2006

yes, phplist can handle all your users and you can manage them with the phplist admin interface
michiel
Admin
 
Posts: 1022
Joined: 10:18pm, Fri 11 Apr, 2003
Location: Buenos Aires, Argentina

DBase table questions

Postby RL » 2:03am, Mon 12 Jun, 2006

Hi there, I was looking for the table that my list data(ie first name and e-mail addy) is kept in using PHPmyAdmin, but I can't find it. :oops:

I found a table with the the fields 'List Name' in it and another with 'First Name' in it(which is all I require beyond an e-mail addy), but I can't find the table with the actual data of e-mail address and first name together.

I know it is in there because it pulls out the first name using [First Name] in the test e-mails I have been sending. Reason I want to know is because I want to import a bunch of list members via SQL dump, but can't find the table!!. lol

Many thanks for your time.

Cheers,
RL
RL
phpList newbie
 
Posts: 2
Joined: 1:48am, Mon 12 Jun, 2006

Re: DBase table questions

Postby RL » 9:35am, Mon 12 Jun, 2006

RL wrote:Hi there, I was looking for the table that my list data(ie first name and e-mail addy) is kept in using PHPmyAdmin, but I can't find it.


Never mind. I just displayed the users cut & pasted into a text file and imported them.
RL
phpList newbie
 
Posts: 2
Joined: 1:48am, Mon 12 Jun, 2006

I get same error (Fatal Error: Cannot connect to database, a

Postby jessejenifer » 3:41pm, Mon 10 Jul, 2006

May be a real stupid question but do i need to go into phpmyadmin and create the database/user/pass?

or by uploading /lists/ all that is taken care of?

thanks in advance for the help.
-j
jessejenifer
phpLister
 
Posts: 6
Joined: 3:36pm, Mon 10 Jul, 2006

Postby Hernol » 3:49pm, Mon 10 Jul, 2006

just uploading lists and initialize the db at lists/admin
Hernol
Admin
 
Posts: 1378
Joined: 6:39pm, Thu 18 May, 2006
Location: Argentina

Postby jessejenifer » 3:52pm, Mon 10 Jul, 2006

I thought i did but i still get this error:
Fatal Error: unknown database, cannot continue

when i go to phpmyadmin i see the database has been created but has no tables...
jessejenifer
phpLister
 
Posts: 6
Joined: 3:36pm, Mon 10 Jul, 2006

Next

Return to Frequently Asked Questions

Who is online

Users browsing this forum: No registered users and 1 guest