Jump to content

confusion on server software


zaniac

Recommended Posts

Ok I was planning to start the PHP tutorial tonight, but am a little confused. If I am using a host's server, do I still need server software like Apache? As you can guess I don't have my own server, I simply use a host. Also on the PHP site, which file do I download from the page below. I have windows XP, do I need to download all the windows files? Probably asking for the obvious on this one, sorry.PHP files (which one???)Sorry I'm feeling tired today and think I am getting easily confused :)Thanks for any light you guys can shed on this for me :)

Link to comment
Share on other sites

If you are using a host, you don't need your own server. You only need to set up your own server if you want to develop and test without needing to upload the files to your host.With regard to the download page, you only need that if you are setting up your own server. You can use one of the packages that aspnetguy mentioned, or you can install it yourself. To do that, first you need a web server running. If you have Windows XP Pro, it comes with a web server called Internet Information Services (IIS). If you don't have XP Pro, you can download the free Apache server, which you can do a Google search for. Once you have a web server installed, the file you need to download on the php.net site is the zip package Windows binary. Once you download that, the installation instructions for PHP start here:http://www.php.net/manual/en/install.general.php

Link to comment
Share on other sites

For web pages, PHP needs a web server to run. PHP interacts with the web server. You can run standalone PHP scripts without a web server, but they don't do the same type of things that you would use PHP on a web server for. If you are trying to learn how to use PHP on the web, then you definately need some sort of server to test on. This can be your host's server, you can test there. The only reason people set up test servers themselves is to make the development quicker because you don't need to upload everything every time you make a change. Personally, I tested using my first host for a while. Only when I wanted to get serious did I take the time to install my own server.

Link to comment
Share on other sites

For web pages, PHP needs a web server to run. PHP interacts with the web server. You can run standalone PHP scripts without a web server, but they don't do the same type of things that you would use PHP on a web server for. If you are trying to learn how to use PHP on the web, then you definately need some sort of server to test on. This can be your host's server, you can test there. The only reason people set up test servers themselves is to make the development quicker because you don't need to upload everything every time you make a change. Personally, I tested using my first host for a while. Only when I wanted to get serious did I take the time to install my own server.
Thanks again for answering my query :)I have just installed the latest version of Apache, but according to a book I am using, it is telling me to alter the software's configuration file. The book is saying to add the following in the AddModule section....AddModule mod_php5.cI cannot see where such a section exists in the file. Everything else that the book has asked me to add has been added, I just can't find this one section. Does the configuration file need to be altered for apache to operate for the simple testing means of PHP5?As you may have guessed I'm not a computer whizz lol :)Any help or ideas are (especially in this case) very much greatly appreciated :)
Link to comment
Share on other sites

There might not be an AddModule section if there aren't any modules to add, so you might need to create that. Just add that line in the config file and see if it works, I've never set up Apache myself so I can't be very specific.

Link to comment
Share on other sites

Hi JSG, I have tried adding the module onto the configuration file. Nothing seems to happen. Having tried testing the software it has come up with this....httpd.exe: Syntax error on line 115 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/PHP/php5apache.dll into server: The specified module could not be found.Note the errors or messages above, and press the <ESC> key to exit. 12............ arrrrrrrrrrrrrrrrrrgh! How frustrating, as I can see the PHP5apache.dll file on my computer in that location. I want to desperately learn PHP, but want to have the software prepared first so I can practice/test at the same time, like I can with XHTML and CSS :)Maybe I'll try one of the other pieces of software mentioned above.

Link to comment
Share on other sites

Tanguay's workshop explains in detail how to install Apache, PHP, and even how to install MySQL and MaxDB. Read there (I feel too lazy to explain it all).
Link to comment
Share on other sites

Well I have Apache installed and working fine... hurrah! I am having problems with PHP displaying through IE6 browser, as I can only seem to get the HTML side of the file displayed. In Firefox and Opera nothing is displayed except for the file's coding.I'm baffled by this, but will keep plodding along until I get a result haha :)Thanks again Boen for that link you gave, it's has helped me greatly up to this point :)

Link to comment
Share on other sites

If you are seeing PHP code in the file (i.e., you view the source from the browser and can see "<?php" in the source), then PHP is not being executed by Apache. I believe the line in the config file to get PHP to handle PHP files is the AddHandler section, where you want to tell Apache that PHP should be the handler for .php files. Also make sure that files you want to execute PHP code in are named .php.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...