Results 1 to 17 of 17

Thread: PHP/mySQL newbie

  1. #1

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819

    PHP/mySQL newbie

    I contact my web host a little while ago and they enabled mySQL for my domain. Now I don't know what to do next. I created a simple hello world PHP page and uploaded it and it displayed a blank page.

    So... what am I not doing right?

    Also, what do I need to install on my computer to debug in place. In other words, how do I install a server with PHP/mySQL capability on my computer?

    I have XP Pro.

    All help is very much appreciated.

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    You need a web server; IIS comes with Windows (at least it came with 2000 Pro) but as with MS stuff it's full o' holes, so I suggest Apache

    Also you need PHP. PHP4.2 has just come out, you can get that at www.php.net

    Lastly, you need mysql, which can be got from www.mysql.com

    Install of those, following the instructions for apache/php/mysql config. It's not quite brain surgery but almost

    I don't know what you did for your php script, but a hello world would look something like this
    PHP Code:
    <?php

    print 'Hello World';

    ?>
    if that doesn't work, try naming the extension 'php' or 'php3' (depends on the host). If it still doesn't work, there is some config problem that only your host can solve.

  3. #3

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    Thanks mr. ( I assume mr. ) pix lover. I figured out the extension thing. It had an htm extension so when I uploaded it and opened the page it didn't do anything. When I changed the extension it worked.

    But, I'd really like to get it working on my computer first. I know I'm going to have a devil of a time with the mySQL bit. My web host sent me an e-mail full of jargon and an address to my admin site. I sort of browsed the database stuff, but it didn't make any sense to me. I'm probably doing too much at once. The first thing I want to make is a guest book or similar just to get the feel for it. Not too many fields to worry about. Once it works, I'll delete it because I can't think of anything cheesier to have on a web site than a guest book.

    Expect lots of threads from me here. Hopefully I can get a handle on this quickly so I can do more instead of post more.

    Thanks for the info.

  4. #4

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    I went to the Apache site. What am I downloading exactly? The http server?

  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    yep, the server

    Apache http server: http://httpd.apache.org/
    PHP windows binary: http://www.php.net/downloads.php
    MySQL windows installation: http://www.mysql.com/downloads/mysql-3.23.html

  6. #6
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    http://www.apache.org/dist/httpd/

    You want version 2 of Apache for a Windows box, as older versions will be outperformed by IIS on that OS. And as far as IIS being full of security holes, PHP itself has had tons of these...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  7. #7

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    I'm really sorry to be asking all these lame questions, but server/web stuff is really out of my realm.

    I downloaded the latest version of Apache without SSL. Didn't think I needed that. I also downloaded mySQL and PHP 4.something. The latest version though.

    Then I installed Apache and it started asking me for domains, etc. I had no clue what to put in those fields, so I just entered "localhost" in both of them.

    If that is wrong, which I'm sure it is, how do I change it and what should it be?

    By the way, I just talked to my web host and they said don't do any of this because it won't work when I upload it anyway due to different configurations or something.

    damn I'm lost.

  8. #8

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    I'm not creating a server for online use. I just want to be able to debug my php pages and mySQL on my computer before uploading them. That's the only reason I'm downloading this stuff.

    The way my computer is now, it can't interpret PHP, so it just gets ignored. I don't know if what I did works until I actually upload the pages.

  9. #9
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Originally posted by JoshT
    And as far as IIS being full of security holes, PHP itself has had tons of these...
    true, but no point adding even more

    AFAIK you can only use 127.0.0.1 to specify the local machine when apache asks for your domain. Thats what it advises you do anyway.

    Ignore your host; ig a PHP file works on yours it'll work on theirs (provided you don't start writing stuff that depends on additional modules being installed.

  10. #10

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    So do I put the same value in for both the network domain and the server name?

    I couldn't find anything on the Apache site that had anything to do with installing or configuring this. All I could find was a faq about the history of Apache and the people who made it.

  11. #11
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    How big are these three things?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  12. #12

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    The downloads are about 20 mb total. I don't know how big they are when they get installed.

    Apache is 3.1 MB
    PHP is 5 MB
    mySQL is < 12 MB

  13. #13
    scoutt
    Guest

  14. #14
    Lively Member
    Join Date
    Mar 2002
    Location
    England
    Posts
    79
    Originally posted by cafeenman
    I'm not creating a server for online use. I just want to be able to debug my php pages and mySQL on my computer before uploading them. That's the only reason I'm downloading this stuff.

    The way my computer is now, it can't interpret PHP, so it just gets ignored. I don't know if what I did works until I actually upload the pages.
    if you aint building it for online use... i suggest www.firepages.com.au they have a single 10MB downloadable package for windows... i use it to write, test and debug scripts on...


  15. #15

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    OK, I think we're talking about the same thing. I want to test my stuff on my computer, make sure it works and then upload it to my web site.

  16. #16
    Lively Member
    Join Date
    Apr 2001
    Location
    The Netherlands
    Posts
    94
    Yo, the best place to learn is on the web.
    Just check this page => http://www.w3schools.com/

    This one is even better
    http://hotwired.lycos.com/webmonkey/...tutorial4.html
    The above goes into setting up php and mysql (at home)

    Finally this one.
    http://hotwired.lycos.com/webmonkey/...php/index.html
    Just some regular tuts.
    "Against All Odds"

  17. #17
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width