php-windows Digest 2 Apr 2001 14:46:19 -0000 Issue 523 Topics (messages 6432 through 6435): Re: unhappy camper 6432 by: Mangiola Nunzio arivia.kom Apache and PHP problem 6433 by: Steve ActivePerl win32 6434 by: Eduardo Silva Case insensitive str_replace 6435 by: Matthew Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
You forgot to select a database. mysql_select_db("database",$link_id); That should work. > ---------- > From: paul morgan[SMTP:[EMAIL PROTECTED]] > Sent: Saturday, March 31, 2001 1:53 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] unhappy camper > > hi, > I'm new to this game but have managed to set up apache 1.3.19 that runs > php/4.0.4pl1 (the apache dll I think) on Win 98 SE. I've also installed > the > windows build of mysql, version 3.23 I think and can administer easily via > the msdos prompt. I have removed the general root user, as in the mysql > Docs > and replaced it with my own logon user and pwd. > > The problem is that I can't seem to pull anything out of a database that I > create. I've read the docs that come with mysql, esp Ch6 and privileges, > but > even simple things like typing 'show grants;' gives me an error in the > msdos > prompt yet I can insert, delete etc data from the database I created > whilst > in the msdos prompt - command line interface. I can connect to mysql using > the 'mysql_connect() function in php I think (I don't get any erroes when > just testing the connection) but when actually going to do something via > php > I get an error similar to this; > > Warning: Supplied argument is not a valid MySQL result resource in > ...location of file then line number. > > Some example code that fails is below. It fails on the line where the > 'while' loop starts but I think that's because the $result var doesn't > seem > to be allowed to list tables?? but I don't know why. > > > <?php > > $link_id = mysql_connect("localhost", "myUsername", "myPassword"); > > $result = mysql_query("SHOW TABLES", $link_id); > > while($query_data = mysql_fetch_row($result)) > { > echo "$query_data[0], is some data <br>"; > } > > ?> > > > Anyone got any ideas as to why I'm getting stuffed? Is it permissions > within > mysql or is there a known bug in one of the apps that is messing me about. > Any suggestions gratefully received. Please reply to this or to my addy > directly. > > Many thanks ;) > > Paul > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hi All, I'm new at this and am trying to get PHP to work with Apache. I've tried all of the tips I can find but when I view a php file in my browser it has an internal server error (500 I think). If I use the registry to get it to run the scripts it opens all the graphics on the page in my image viewer. I'm sure there is something obviose. Cheers for any help Steve
Helo there, o want to know who use ActivePerl win32 with Apache and PHP, for send-me tips of instalation and configuration under win32 ? Thank you. ________________________________________________________________________ O YAHOO! GEOCITIES CHEGOU AO BRASIL! Crie sua home page com tudo em português - http://br.geocities.com
Hello... Does anyone know how to do a case insensitive str_replace? I don't want to alter the case of the original string (so I can't do a strtolower first). I've seen some functions used with the likes of [^Aa] in them but I'm not sure how to use this... Anyone got any ideas? -- Matt [EMAIL PROTECTED] [EMAIL PROTECTED] < www.mralston.co.uk />