Help - Search - Members - Calendar
Full Version: Problems With The Hosting
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
Forge
None of my php scripts can connect to any of my database's this isn't anything to do with the php.

I cant edit css online which is a bummer.
Ed
Are you sure the database credentials are correct?

The hostname needs to be 'localhost'.
Forge
yeah everythings correct
Forge
QUOTE
Access denied for user 'vhostswww'@'localhost'


Thats the error i get. I never put vhostswww anywhere :s
Ed
QUOTE(Forge @ Dec 22 2007, 04:31 PM) *
Thats the error i get. I never put vhostswww anywhere :s


What's your connection string?

I think it falls back to 'vhostswww' if you've not entered a user.
Forge
QUOTE(Bread @ Dec 22 2007, 04:45 PM) *
What's your connection string?

I think it falls back to 'vhostswww' if you've not entered a user.


CODE
<form action='?process=configuration' method='post'>
MySQL Username<br>
<input type='text' name='dbusername' size='20'><br>
MySQL Password<br>
<input type='password' name='dbpassword' size='20'><br>
MySQL Database<br>
<input type='text' name='dbname' size='20'><br>
MySQL Host<br>
<input type='text' name='dbhost' value='localhost' size='20'><br><br>
<input type='submit' value='Connect to MySQL'>
</form>
</div>
");;

break; case'configuration':
echo ("
<div id='content_left'>Now we will try and connect to the MySQL server and database.<br><br></div>");

$dbusername = $_POST['dbusername'];
$dbpassword = $_POST['dbpassword'];
$dbname = $_POST['dbname'];
$dbhost = $_POST['dbhost'];
$_SESSION['sqluser'] = $dbusername;
$_SESSION['sqlpassword'] = $dbpassword;
$_SESSION['sqldb'] = $dbname;
$_SESSION['dbhost'] = $dbhost;

$dbconnect = mysql_connect($dbhost, $dbusername, $dbpassword) or die ("<div id='error'>LP couldn't connect to the MySQL server. Please check that your details are correct.</div>");
echo("<div id='green'>LP has succesfully connected to the MySQL server.<br></div>");

if(mysql_select_db($dbname)) die ("<div id='error'>LP couldn't connect to the database. Please check that the database exists.</div>");
echo("<div id='green'>LP has succesfully connected to the database.<br></div>");
Forge
I enter all the information correctly and it still doesnt work
Ed
PM me you database details, I'll take a look into it, but MySQL is operational.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.