|
-
May 7th, 2002, 12:35 PM
#1
Thread Starter
PowerPoster
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.
-
May 7th, 2002, 12:53 PM
#2
PowerPoster
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.
-
May 7th, 2002, 12:59 PM
#3
Thread Starter
PowerPoster
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.
-
May 7th, 2002, 01:00 PM
#4
Thread Starter
PowerPoster
I went to the Apache site. What am I downloading exactly? The http server?
-
May 7th, 2002, 01:36 PM
#5
PowerPoster
-
May 7th, 2002, 01:37 PM
#6
Black Cat
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.
-
May 7th, 2002, 01:50 PM
#7
Thread Starter
PowerPoster
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.
-
May 7th, 2002, 01:52 PM
#8
Thread Starter
PowerPoster
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.
-
May 7th, 2002, 03:07 PM
#9
PowerPoster
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.
-
May 7th, 2002, 03:18 PM
#10
Thread Starter
PowerPoster
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.
-
May 7th, 2002, 03:18 PM
#11
Stuck in the 80s
How big are these three things?
-
May 7th, 2002, 03:28 PM
#12
Thread Starter
PowerPoster
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
-
May 7th, 2002, 04:39 PM
#13
-
May 8th, 2002, 03:22 PM
#14
Lively Member
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...
-
May 8th, 2002, 05:56 PM
#15
Thread Starter
PowerPoster
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.
-
May 10th, 2002, 02:22 AM
#16
Lively Member
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"

-
May 15th, 2002, 11:42 PM
#17
PowerPoster
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|