Get support from Xavier Media
It is currently Sun Dec 08, 2013 5:53 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Can't connect to MySQL server during Setup.
PostPosted: Thu Dec 14, 2006 6:34 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Wed Dec 13, 2006 7:57 pm
Posts: 8
Points: 0
I purchased your Password Protection 2.8 and am having trouble setting it up. I installed Apache, PHP and MySql using Xampp. Everything seems fine, Apache runs properly and I can go to the command prompt and connect to MySQL. However, when I run the setup.php I get the following error:

"Database Not OK
The setup script can not connect to your database. Make sure you have filled in correct variables for $mySQL_host, $mySQL_user, $mySQL_pwd and $DataBase in settings.php. If you do not know your database settings then you need to contact your web hosting company to find out.
Please also note that the database name you fill as value for $DataBase in settings.php must already have been created before you can continue."

The values in settings.php are:

$MySQL_host = "localhost";
$MySQL_user = "root";
$MySQL_pwd = "";
$DataBase = "SMSRT_db";

Any help would be greatly appreciated.


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 14, 2006 4:23 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Make sure you're allowed to connect as root from a PHP script. You may ahve to setup a new user with a password to use in settings.php.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 14, 2006 6:24 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Wed Dec 13, 2006 7:57 pm
Posts: 8
Points: 0
Q1: Do I need to allocate the user on MySQL via GRANT and if so what priviledges are required?

Q2: Do I need to create the database before running setup.php?

Thanks


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 14, 2006 6:48 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Q1: Yes, the user must be able to read from and write to the database and also to create new tables when you run setup.php.

Q2: Yes.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 15, 2006 6:20 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Wed Dec 13, 2006 7:57 pm
Posts: 8
Points: 0
Thanks, that worked.

Now I have an additional problem o rmaybe 2.

On the admin page, when I select an option (Settings...) it requires me to login again and then merely returns me to the same admin page.

I've tried the solutions from the forum but they didn't work.

The files are at:

localhost/SMSR

Here's what my settings.pho files looks like:

// Info about the database; user id and password
$mySQL_host = "localhost";
$mySQL_user = "smsrt";
$mySQL_pwd = "fred";

// The name of the database
$DataBase = "smsrt_db";

// The table with all user information
$UserTable = "smsrt_users";

// The table with all settings
$SettingsTable = "smsrt_settings";

// The table with all user groups
$GroupsTable = "smsrt_ugroups";

// The table with all log files
$LogTable = "smsrt_logs";


// Cookie path. Usually /
$CookiePath = "/";

// The domain name where the cookie will be used
$CookieDomain = "SMSR";

// Cookie time. This is how long time the cookie will be valid.
// 3600 = one hour
// 84600 = one day (24 hours)
// 604800 = one week (7 days)
$CookieTime = 3600;

// Where your password protected pages are located.
$ScriptURL = "http://localhost/";

Thanks in advance.


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 15, 2006 3:44 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Quote:
// The domain name where the cookie will be used
$CookieDomain = "SMSR";

The problem is that you must set this to the domain name where you're using CPP otherwise the cookie will not be saved in a correct way.

If you for example will use CPP on your site www.sampleaddress.com then $CookieDomain should be www.sampleaddress.com or .sampleaddress.com. The later will work on www.sampleaddress.com, sampleaddress.com and subdomain.sampleaddress.com.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 15, 2006 6:43 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Wed Dec 13, 2006 7:57 pm
Posts: 8
Points: 0
When the sight is deployed I understand the solution. However, the site is currently under development and is located in the "localhost/SMSR" directory. Under these conditions what should $CookieDomain be set to?

$CookieDomain = "localhost"; ?
$CookieDomain = "localhost/SMSR"; ?

Thanks for the help.


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 15, 2006 8:14 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
I'm not sure because I have never installed the script on localhost, but I think you should try with just localhost because that's the most logical option.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 16, 2006 5:10 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Wed Dec 13, 2006 7:57 pm
Posts: 8
Points: 0
Just thought you would like to know. I tried setting:

$CookieDomain = "localhost";
$CookieDomain = "localhost/SMSR";

with:

$CookiePath = "/SMSR";
$CookiePath = "/";

None of these combinations worked. What ended up working was this:

$CookiePath = "/SMSR";
$CookieDomain = "";

Thanks for your help


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Can't connect to MySQL server during Setup.
PostPosted: Tue Apr 01, 2008 12:05 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Tue Apr 01, 2008 11:57 am
Posts: 2
Points: 0
$CookieDomain = "localhost";
$CookieDomain = "localhost/SMSR";

with:

$CookiePath = "/SMSR";
$CookiePath = "/";


above code can solve your problem.

_________________
the developer hank freid redefines the chic hotel experince


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]