llHTTPRequest, MySql, PHP, XAMPP
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-04-2006 11:18
I installed XAMPP just lately, which includes MySQL along with a server and PHP.
Any help on how to use llHTTPRequest to get PHP to manipulate MySQL would be greatly appreciated. If that's not the right approach to being able to work with an external database from within SL, info on the correct approach would also be appreciated.
I've successfully run some very simple PHP scripts initiated with llHTTPRequest so far. I have no experience with mysql at all.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Sator Canetti
Frustrated Catgirl
Join date: 20 Sep 2005
Posts: 130
|
06-04-2006 12:54
It's at a point like this where having an idea of what you'd like to store would be helpful.
_____________________
"Have gone to commit suicide. Intend to return from grave Friday. Feed cat." -- A memo by Spider Jerusalem in Transmetropolitan "Some people are like Slinkies; not really good for anything, but they still bring a smile to your face when you push them down a flight of stairs." If you're reading this signature, I've probably just disagreed with you. Welcome to the club 
|
|
Blueman Steele
Registered User
Join date: 28 Dec 2004
Posts: 1,038
|
Self Taught
06-04-2006 13:01
there are great books (Visual Quickstart being good) that combine learning PHP alongside MySQL. here's a great starter book... http://www.amazon.com/gp/product/0321186486/ref=pd_bxgy_img_b/103-8921499-2489465?%5Fencoding=UTF8You can also learn PHP and MySQL for free at http://www.w3schools.com/
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-04-2006 14:09
Thanks Blue, I have made a bookmark folder for "PHP and MySQL" and added that link,along with php.net.
Santor, I'm not trying to store some data, I am trying to learn how it's done. Since I am a beginner, a database that would be considered simple would be a good start, one in which the results of a query could be judged for accuracy by simple examination of the results. A boring but useful example would be something that looks up LSL functions and spits out the parameters and some explanatory text. For test purposes just a few LSL functions would suffice.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
06-04-2006 14:15
I got myself a whole chunk of web space recently and have been working thru the same learning curve ( although coding and databases are no strangers to me mysql and php are a little out of my normal line ) I use this site a lot to see what the relevant php & mysql statements do and their syntax http://www.php.net/manual/en/index.phpThen I do a google search, for example "php reading mail" and take a look thru the examples that spring up. So far I have a php / mysql backend talking quite nicely to an LSL script via a combination of email and HTTP requests ( I used the example from the wiki as an example to build on ) and it isnt actually that difficult once you get enough examples to rip apart. Hope it helps
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-04-2006 18:10
From: Adriana Caligari I got myself a whole chunk of web space recently and have been working thru the same learning curve ( although coding and databases are no strangers to me mysql and php are a little out of my normal line ) I use this site a lot to see what the relevant php & mysql statements do and their syntax http://www.php.net/manual/en/index.php Then I do a google search, for example "php reading mail" and take a look thru the examples that spring up. So far I have a php / mysql backend talking quite nicely to an LSL script via a combination of email and HTTP requests ( I used the example from the wiki as an example to build on ) and it isnt actually that difficult once you get enough examples to rip apart. Hope it helps You got some space on a server, that provides email as well, right? I got the Mercury mail package in the XAMPP install, I haven't looked at that yet.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
06-04-2006 18:25
Suezanne, lemme be a bit frank. Why are you going to all this tremendous trouble to install Mysql, php, etc on your own when you've never messed with this before?
I am a multi-year veteran in setting up these kinds of servers, and its a pain in the ass a lot of the time. I can't imagine how someone who's relatively new to all of this is approaching the creation of their own server.
Its *really* not necessary. There incredibily inexpensive web hosting accounts available out there, $2-$5 a month, that provide you with php and mysql access. There's almost nothing you can do in SL at this point that is going to use up all of the resources you would get from having a basic webhosting account somewhere.
I put a classified up last week, because I am personally offering php/mysql hosting services for users in SL. If you just want hosting space and no help w/ the coding, I'll even provide you with hosting cheap(like $1USD per month, paid in equivalent $L). If you need special coding done, then I'll work with you to figure out what you need.
I would rather see someone like you who is *obviously* set on learning how to do this stuff spend their time actually learning PHP and Mysql coding, rather than wasting your time setting up servers that is really just overkill.
Anyway, the offer's out there.
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-04-2006 22:12
The server is installed and running, it took less than an hour to install the Apache web server, PHP, perl, Mercury mail, etc, including the download time and reading the installation instructions.
I can contact my server from SL with llHTTPRequest. I have run a PHP script or two. Well, four or five, actually.
If I'd known how easy it was to set up a server to play with I'd a done it long ago.
The reason to do this is for fun, to experience the pleasure of learning, of doing something new.
When I taught myself forth on my Atari 800 , I did it for fun. When I taught myself 6502 assembly language, I did it for fun. When I taught myself some Pascal, I did it for fun. Turbo-Pascal on a KayPro, I think it was. When I did some dBase, I got paid for it, but it was fun anyway. Later I worked at a place that had just switched from using a T-99 to run quality control on mainframes, to using the new IBM PC . They let me stay after work and play, i.e., program, on the TI-99, as well as using it during my lunch break. I did that for fun.
Later I tried C with Turbo-C and the full expensive Borland C package. That was not fun. Can't win 'em all.
Lately I got the free Visual Basic - (well, I left out and old version of Visual Basic, so old it came on floppies) - haven't done much with that.
I left out Logo on the Atari. That was fun too, despite having an editor almost as bad as the SL script editor.
Getting the SL object to read back the headers it passed to the PHP script was fun. It remains to be seen if making MySQL do something will be fun; I suspect it will.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
06-04-2006 23:27
I started php with a SAMS teach yourself in 24 hours book. MySQL I sort of knew a bit from a while ago. These two sites I find incredibly useful: http://www.php.net/manual/en/http://dev.mysql.com/doc/refman/5.0/en/
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
06-05-2006 00:10
Suezanne, I lay down before you in your superior geekydom.  I'm glad you got your server running. If you have any help with mysql or php scripting, just ask and I'll answer whatever questions you have. Geuis
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
06-05-2006 06:30
I may be geekish, but a real geek would be a lot better in their field of geekyness than I am. Such is life.
Thanks for the link, Eloise, it's in my bookmarks now.
Getting the server to work easily wasn't due to knowlege or ability, I just looked up phrases like "servers for dummies" and "simplest apache webserver" and found the XAMPP package. There were comments on how bad using it was, comments from real computer whizzes who said it was better to get the plain installations of all the programs separately and set all all the configuration optiolns manually. There was also a lot of amount of comments in forums on how people were losing their minds doing that and were saved by getting the one-click no-brain all-in-one XAMPP package. That sounded like what I wanted. Tried it and it seems to be working ok so far.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
06-05-2006 09:09
From: SuezanneC Baskerville You got some space on a server, that provides email as well, right?
I got the Mercury mail package in the XAMPP install, I haven't looked at that yet. I got php - mysql - 2000 email address - ftp clients - a host of plugins and goodies etc to make life easier and a help desk that is actually useful and friendly look at www.bluehost.com
|