# I want to program a virtual pet site in PHP...



## CGKGS (Nov 14, 2004)

I want to program a virtual pet site in PHP, but I don't know PHP. I only know (some) HTML. I have an old computer that I can use as a server. What should I learn before I learn PHP (if anything)? I don't know anything about creating virtual pet sites, but I want to do it because it seems fun and challenging. Also, my old computer has Windows 98. Are Apache and MySql compatable with Windows 98? Sorry that this is so long, I just have a lot of questions to ask.


----------



## Cybertrion (Oct 5, 2004)

Apache runs well on Windows 98, not sure about MySQL but I believe it should work. Learning some HTML, CSS and Javascripting would be nice.


----------



## CGKGS (Nov 14, 2004)

Yeah, but I don't want to learn Javascript, and I don't want to learn CSS yet. With that said, would it be really hard to learn PHP?


----------



## Sanguinan (Sep 26, 2004)

No, I'm currently learning PHP. I don't know much CSS or any Javascript. I however do know HTML very well. Try www.php.net. Read the intro tutorial there, and then the manual. Also, try reading others code, trying to figure it out.. Yes, mySQL and Apache run fine with 98 (if it's SE, it may work with first, but I've never tried). Just absorb any tidbits of PHP you can, a virtual pet site, such as neopets.com? That won't be easy, but will be a great learning expierience. I happen to be working on an NFL site for my first site.


----------



## CGKGS (Nov 14, 2004)

Cool, football's awesome. Thank's for the help, and yes, a site like neopets.com.


----------



## CGKGS (Nov 14, 2004)

To learn PHP, could I just download PHP, MySql, and Apache on my PC for free? I'm currently running WinXP Home Edition. How big is the download (everything put together)?


----------



## CGKGS (Nov 14, 2004)

Wait a minute... I just read that I don't need to download MySQL and stuff like that, as long as the web host supports PHP. Is this true?

PS: On my server, I will download those things, but to learn PHP, I don't want to do all of that. Also, is it possible to mix HTML and PHP? ex: use HTML for simple text and PHP for complex things like registration and logging in


----------



## Sanguinan (Sep 26, 2004)

Ok first off, yes everything you need for PHP is free, and you could download it all to your computer. Also, you cant download it to your host, only your host can do that. And yes, you 'break away' from HTML to go into PHP mode. Your site is still mainly HTML. Any other questions?


----------



## CGKGS (Nov 14, 2004)

I don't understand what you mean by "Also, you cant download it to your host, only your host can do that".


----------



## CGKGS (Nov 14, 2004)

Also, since I'm serving the website with the computer I'm using now, will it cause it to have poor performance?


----------



## Sanguinan (Sep 26, 2004)

Ok wait...are you going to run the site off of your computer, or do you have a webhost?


----------



## Sequal7 (Apr 15, 2001)

I believe from his first post that he wanted to run it on his computer.

PHP is simple to use and fairly easy to learn, you dont need much skill other than html, unless you connect to a mySQL database, then it gets a little more complicated. You should also know how to call connection strings, virtual includes etc.

As far as compromises with your old computer running as a host, Yes, computer operating system, and size will make your site slow. If your computer is old,a nd not much processor, HDD and ram speed then your site willbe slow, depending on the amount of connections to it. PHP is far easier to learn than VisualBasic, C++ and ASP.

MYSQl will run fine on windows OS (exception being Win95)


----------



## CGKGS (Nov 14, 2004)

You still haven't really answered my questions;

Can I run the website right from my computer? Will it cause my computer to have poor performance?

PS: my OS : winxp
my cpu speed : 2.6Ghz

edit: would it be possible to run the site without using apache and mysql (just typing the code right into the editor like HTML)? If so, I don't understand what apache and mysql are used for.


----------



## CGKGS (Nov 14, 2004)

Well, let's put it this way:

Is there any free web hosting sites that offer subdomains or /name, that let you use PHP without MySQL?


----------



## CGKGS (Nov 14, 2004)

First, to learn PHP, I'm going to make a pet website where you can log in and post pictures of your real life pet, post information about certain animal breeds, etc. Well, at least I'm going to try. lol


----------



## CGKGS (Nov 14, 2004)

I'm considering downloading MySQl and Apache onto my main computer. Is that a bad idea? Should I use a server instead? Keep in mind that I'm just starting out.


----------



## deviance99 (Nov 15, 2004)

Download MySQL, php and Apache on your home computer (about 100MB or less); then play around with it. Don't ask so many trivial quetions to us; if you can't experiment yourself, then your creative endevour will be hard to come by.

Also, your site is a long way off; depending on your level of programming experiance. If you've never programmed before and don't know SQL, I would say you need a YEAR of training before you can get your site up and running.

Also, take some MySQL tutorials... just do a google search "mySQL tutorials beginner" or "mySQL syntax";


----------



## Sequal7 (Apr 15, 2001)

I rarely get ito it, but since alot of the posts in this forum have absolutely nothing to do with web development, I am going to agree with Deviance on all counts in this one.

First of all, read the answers you get fully.

You said...


> You still haven't really answered my questions;
> Can I run the website right from my computer? Will it cause my computer to have poor performance?


I answered....


> As far as compromises with your old computer running as a host, Yes, computer operating system, and size will make your site slow. If your computer is old, and not much processor, HDD and ram speed then your site will be slow, depending on the amount of connections to it.


Further more, your computer will not run as a personal computer and a server without problems. You need to dedicate a computer for servers if you want any kind of reliability.

You can use XPPro, not XPhome to host your site. You will also most likely need DynamicIp software to allow your site to be on the web (your ISP most likey gives you a dynamic IP)

You will need to know fairly good networking skills to allow connections to your computer so that it is not hijacked or remotely taken.

You will need to read and know PHPMYADMIN, MySQL, and IIS (if using windows), also ODBC connections, Postgres, Sybase for your computer to run the commands successfully.

Is it impossible - NO
Is it difficult - Can be, depends on you
Is it worth it - Yes, if you want to save 5.00 per month
Should you do it - Your decision, not ours so research it all over, but please post your web development questions back here when you get it up and running.


----------



## CGKGS (Nov 14, 2004)

Ok, but I have no clue about networking, and I don't have any money to use for the website, which means it will probably never be made.. well, at least not for a few years when i can afford it. The reason I didn't mention that earlier is because I never really thought about it like that...


----------



## Sequal7 (Apr 15, 2001)

Look, I am sorry, but I think you have the wrong idea from me. You can get all of those for free, albeit with a little inconvience.

- You can download and run a free server, such as Apache http://httpd.apache.org/download.cgi or Linux http://www.redhat.com/ and use PHP http://www.php.net/ and MYSQL http://www.mysql.com/ .
- IP Routing is also free, services such as dynamic dns http://www.dyndns.org/services/dyndns/ allow you to use your own computer with no need to purchase a domain name and point to your computer.
- Networking skills are free to learn on the internet http://httpd.apache.org/docs/misc/security_tips.html , read about allowing ports and connections that will minimize your chances of being hacked.
- If your site traffic is limited (10 - 25 users at any given time) then you can run it on your computer, with limited degredation from the network while using the computer yourself.
- Security is very important, but learning it is also free http://httpd.apache.org/docs/misc/tutorials.html .

Dont be discouraged, you can do it, like I said it is not easy, but the payoff is worth the hassel in all cases.


----------

