Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2008-03-16, 01:15 AM
gom gom is offline
Junior Member
 
Join Date: Mar 2008
Posts: 3
gom is on a distinguished road
Default PHP/MYSQL help needed....please.

I am very new to this, and I could really appreciate any help.

I created a database called "mwalid_database". The username is "mwalid_user". The database password is "password". The main user is "commish".

My localhost address is "mysql30.ixwebhosting.com"

Here is the original file I am to edit:

Quote:
<?
$db_user = "DBUSER";
$db_pass = "DBPASS";
$db_mysql = "DBNAME";
$main_user = "ADMIN USER";
if (!defined('NUKE'))
define('NUKE',0);
// Added to see if we are using PhP Nuke or not
if (constant("NUKE")==0)
{
$dbi=mysql_connect ("localhost", "$db_user", "$db_pass");
mysql_select_db ("$db_mysql",$dbi);
}
else
{
require_once("mainfile.php");
}
global $prefix, $dbi;
?>
I am not using nuke.

As far as I can see, I made the following changes:

Quote:
<?
$db_user = "mwalid_user";
$db_pass = "password";
$db_mysql = "mwalid_database";
$main_user = "commish";
if (!defined('NUKE'))
define('NUKE',0);
// Added to see if we are using PhP Nuke or not
if (constant("NUKE")==0)
{
$dbi=mysql_connect ("mysql30.ixwebhosting.com", "mwalid_user", "password");
mysql_select_db ("mwalid_database",$dbi);
}
else
{
require_once("mainfile.php");
}
global $prefix, $dbi;
?>
I am able to create users, but no attempts at logging in, either by creating a normal or superuser, makes any difference. I get a login un-successful every time. The URL for the website is www.talksoxbbl.com/bosi/standings.php?lid=#

If anyone can post/email or IM me at AOL sith712, I'd appreciate it. TIA.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2008-03-16, 04:05 PM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

Change:

Code:
$dbi=mysql_connect ("mysql30.ixwebhosting.com", "mwalid_user", "password");
mysql_select_db ("mwalid_database",$dbi);
to

Code:
$dbi=mysql_connect ("localhost", "mwalid_user", "password") or die("FAILED MYSQL CONNECT");
mysql_select_db ("mwalid_database",$dbi) or die("COULD NOT SELECT DATABASE");
That way you can see if this is actually the issue. It doesnt sound like this area is the problem.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
  #3 (permalink)  
Old 2008-03-16, 05:14 PM
gom gom is offline
Junior Member
 
Join Date: Mar 2008
Posts: 3
gom is on a distinguished road
Default

This is what I get:

FAILED MYSQL CONNECT

So it's obvious I'm not getting a mysql connection, but I don't understand how to fix it.
Reply With Quote
  #4 (permalink)  
Old 2008-03-17, 11:57 PM
gom gom is offline
Junior Member
 
Join Date: Mar 2008
Posts: 3
gom is on a distinguished road
Default

The problem was, I found out, that the sessions on the windows server were not holding. I switched it over to a linux server, and it worked perfectly.

Thanks for your help, either way. I appreciate it.
Reply With Quote
  #5 (permalink)  
Old 2008-03-18, 06:04 AM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

LOL. And people wonder why i love linux.

Glad you got it working, and thanks for posting your solution. Always good to know what worked even if it wasnt my idea.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:57 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.