|
Posted by robert maas, see http://tinyurl.com/uh3t on 03/10/07 03:14
Background: A few days ago I was browsing <www.free-webhosts.com>,
specifically <http://www.thefreesite.com/Free_Web_Space/>, where it
lists <http://www.5gbfree.com/> which allows 3GB of Web space plus
10 MySql databases! I tried to get an account there, but I can't
see the letters in the box (CAPTCHA) because my access is text
only. (Details of my situation:
<http://www.rawbw.com/~rem/NewPub/mySituation.html>)
But earlier today I briefly got full net access at a local computer
lab that was just about to close for the day, so I was able to
complete my registration. I now have my own 5gbfree.com site. I was
able to create a database called test1, a user called self, and set
up priviledge for that user to use that database, except I have no
idea how to check if it really worked, because my test script
doesn't work:
<?
$user="calrobert_self"; $password="...";
$res = mysql_connect(localhost,$user,$password);
echo "res = $res<br>";
$database="test1";
@mysql_select_db($database) or die( "Unable to select database $database");
mysql_close();
?>
It returns a empty result from mysql_connect, and it dies unable to
select the database test1. I tried to join the newbie forum they
have, but it requires javascript, which isn't available here. I did
a Google search to try to find any previous mention of 5gbfree, but
there's nothing except spam from a user that apparently has been
terminated from 5gbfree because when I try to connect to that
user's Web site I get redirected to 404.php and from there to the
main greeting page for 5gbfree.com.
So does anybody know anyone who already has an account on
5gbfree.com who could tell me how to diagnose the problem I'm
having with PHP/MySQL access? Or just somebody with general
PHP/MySQL experience who can help me?
ObNit: No, my password isn't "...". I omitted it here for obvious
reasons. But in the actual script the correct password is there,
AFAIK, I don't know how to verify that the password I set up
matches the password I'm trying to use in this PHP script. I tried
changing the password in the script to be incorrect, but the result
is the same, null result (printing as empty string, i.e. nothing
printed at all there) in $res. I also changed the $user to be a
bogus value, and still there's no change in the output. I have no
idea whether it's failing to find the user, or failing to match the
password, or failing to find the database, or failing to allow that
user to get access to that database.
[Back to original message]
|