This is a discussion on Trouble getting started with PHP/MySQL on 5gbfree.com within the MySQL Database forums, part of the Database Forums category; Background: A few days ago I was browsing <www.free-webhosts.com>, specifically <http://www.thefreesite.com/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
"robert maas, see http://tinyurl.com/uh3t" <rem642b@yahoo.com> wrote in
message news:rem-2007mar09-001@yahoo.com... > 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(); > ?> [snip] Check "mysql_connect()" -- http://us2.php.net/function.mysql-connect Perhaps "localhost" should be the something in the 5gbfree.com domain... |
|
|||
|
Message-ID: <MdWdnce7FNgqtm_YnZ2dnUVZ_umlnZ2d@comcast.com> from
McKirahan contained the following: >Perhaps "localhost" should be the something in the 5gbfree.com domain... You should be able to find out by looking at http://www.5gbfree.com/phpmyadmin/ Mind you, I've just created a free account and phpmyadmin is hanging on my machine. -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
|||
|
Message-ID: <s4u4v2h9tss5neht1irqstrlhcmdbab7iq@4ax.com> from Geoff
Berrow contained the following: > >>Perhaps "localhost" should be the something in the 5gbfree.com domain... > >You should be able to find out by looking at >http://www.5gbfree.com/phpmyadmin/ Mind you, I've just created a free >account and phpmyadmin is hanging on my machine. Horrendously slow, but works fine with $res = mysql_connect('localhost',$user,$password); -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |