SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 38
  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Beginner - How to install PHP

    Hello, first off my name is David and I am tasked with building a intranet website for our company. We have some fairly grand plans for it eventually but for right now we just want it to "host" (be the interface for) a asset tracking database. I am going through a article on the MySQL website called "Building a Database-Driven Web Site Using PHP and MySQL" which so far is great but I am having trouble installing PHP. I went to the website and downloaded the most recent version and downloaded the binary zip (I think) and unzipped it on the server (I have a test server that I am playing on so if I break it I just rebuild and the rest of the company never notices) but the files that I unzipped have no installer file or anything so I am confused as to what to do from here. Did I download the wrong thing? The article points to another article that guides through installing PHP the link is no good. Any help here would be much appreciated.
    Thanks,
    David

  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    We need to know what type of OS you are installing on

  3. #3
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Also, I am running a server with Windows 2008 server standard R2 with IIS and MySQL 5.1.68-win32

  4. #4
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hispaladin View Post
    Also, I am running a server with Windows 2008 server standard R2 with IIS and MySQL 5.1.68-win32
    Do you plan to use Apache or IIS? Does it matter to you which one you use? (I noticed you put with IIS, but was uncertain if that is a requirement)

  5. #5
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I honestly don't know which, this is all new to me. Please be patient with me, I am learning this all as I go. Which would be the better option? (I know that is probably a completely opinion based question but you are the guys I have to ask right now so whats your opinion)
    David

  6. #6
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Well, I usually recommend apache when dealing with PHP or nginx. For apache, here are a few tutorials
    http://www.sitepoint.com/how-to-install-php-on-windows/
    http://techblog.ankitaoza.com/2011/0...erver-2008-r2/

    For nginx (if you have never heard of this before, you should probably go with apache)
    http://eksith.wordpress.com/2010/11/...mysql-windows/
    http://eksith.wordpress.com/2010/11/...mysql-windows/

  7. #7
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    Also keep in mind, that there are some functions (ones you probably won't need as a beginner) that will not work on Windows, as the main platform for PHP is linux. A couple things would include SHMOP (shared memory), PCNTL_FORK (process forking). But running a production PHP deployment on Windows is definitely not out the question.

  8. #8
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Do you mean that there are some functions of PHP that will not work on windows or apache? I am trying to keep the future in mind when I get this started, I want to be able to do everything we want with it eventually without having to change basically everything, as well as not making it hard for someone who might come in after me. (course I guess that would depend on what they know and how good they are at one or the other.) My network is about 50 machines, most in house at the main office, with the others connecting through VPN. I don't really expect the network to grow to much larger in the near future (we are a agricultural coop so when we add a location it is a grain elevator with 2 computers) but I still want to have lots of options with this. Of course there is the fact that I have no idea what those things are (SHMOP and PCNTL_FORK) but I am trying to think of the long term. I just really don't want to jump into this and end up shutting down possibilities of what we could have done.
    David

  9. #9
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ok another question, (this probably screams that I am in over my head and basically that is true but help me out here I am trying to learn to swim). What is Apache(or IIS)\what does it do? Not really looking for a ten page technical answer but just a basic function.

  10. #10
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hispaladin View Post
    Do you mean that there are some functions of PHP that will not work on windows or apache? I am trying to keep the future in mind when I get this started, I want to be able to do everything we want with it eventually without having to change basically everything, as well as not making it hard for someone who might come in after me. (course I guess that would depend on what they know and how good they are at one or the other.) My network is about 50 machines, most in house at the main office, with the others connecting through VPN. I don't really expect the network to grow to much larger in the near future (we are a agricultural coop so when we add a location it is a grain elevator with 2 computers) but I still want to have lots of options with this. Of course there is the fact that I have no idea what those things are (SHMOP and PCNTL_FORK) but I am trying to think of the long term. I just really don't want to jump into this and end up shutting down possibilities of what we could have done.
    David
    Yes, there will be a few components in PHP that won't be usable running on a Windows environment. Similarly, I believe there are a few Windows components in PHP that won't work on Linux. Don't really worry about that, as you can work around 99% of them using different techniques.

    Quote Originally Posted by Hispaladin View Post
    Ok another question, (this probably screams that I am in over my head and basically that is true but help me out here I am trying to learn to swim). What is Apache(or IIS)\what does it do? Not really looking for a ten page technical answer but just a basic function.
    Apache and IIS are your web servers. They receive the request for a page and direct it to the code/file located on your server and execute it, if necessary, and then serve it up to the browser.

  11. #11
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ok that answers the first question great and confirms my basic ideas on the second. If I may ask, why do you prefer Apache over IIS? I can't say I have a preference because I have never used either of them.

  12. #12
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,053
    Mentioned
    66 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hispaladin View Post
    Ok that answers the first question great and confirms my basic ideas on the second. If I may ask, why do you prefer Apache over IIS? I can't say I have a preference because I have never used either of them.
    IIS/Windows is a lot more expensive (costs run in the hundreds of dollars) to license than Linux/Apache, for no apparent gain as far as I can see.

  13. #13
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Michael Morris View Post
    IIS/Windows is a lot more expensive (costs run in the hundreds of dollars) to license than Linux/Apache, for no apparent gain as far as I can see.
    That's the tangible cost in just purchasing the license/seats for the servers. Both have Administration costs and if you are unfamiliar with Linux, that cost could be greater than maintaining a Windows system that you are already familiar with.

    @Hispaladin ; I usually prefer using Linux with Apache, but I've run PHP on both Windows using IIS and Windows using Apache. It comes down to what was requested and what everyone was familiar with. If you aren't familiar with any of it, then think about how your company is organized and who would eventually be in your place in the future. Would the company primarily endorse a Windows architecture or are they open to Linux? Go with what you think the company would want to have and maintain future going (which may be Windows with IIS).

  14. #14
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    @cpradio Thanks for that input. I will have to do some thinking on that. I really am not sure at this moment because I am the first dedicated IT person the company has had (frightening I know) and at this moment I think they are just starting to realize that if I leave they will actually need to replace me. So far they don't seem to be against Linux but I am not sure of how far that would go. Does Apache require licenses for its use? (they do like cheep when it doesn't cost quality). Thanks again for all the info and help on this.

  15. #15
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hispaladin View Post
    @cpradio Thanks for that input. I will have to do some thinking on that. I really am not sure at this moment because I am the first dedicated IT person the company has had (frightening I know) and at this moment I think they are just starting to realize that if I leave they will actually need to replace me. So far they don't seem to be against Linux but I am not sure of how far that would go. Does Apache require licenses for its use? (they do like cheep when it doesn't cost quality). Thanks again for all the info and help on this.
    Linux and Apache can both be obtained free (for Commercial and Personal use), however, I HIGHLY recommend that if they go this route to get you training in managing Apache/<whatever OS you end up using> -- it will be worth the cost in the long run. You can find out more about Apache's License at http://www.apache.org/licenses/

    For Linux, there are both Commercial abilities (so you get Support), and complete you install it and you support it (thus free) options. Support can be a BIG deal for companies, that's one reason Microsoft excels, but there are a number of good Linux vendors who do equally well in this area. Red Hat, Ubuntu are the two big names I know of (I'm sure there are others). Fedora, CentOS, and Debian (my personal choice) are all free (but there is a huge learning curve to Linux, so be warned).

    I should also mention there is a TON of free support forums out there around the Linux/Apache community, so if you get stuck, you usually just have to search for a forum and post a question. You might not get an answer immediately (whereas, paid support, you might), but you'll get one eventually.

  16. #16
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    After doing some digging on the whole licensing issue I am leaning toward Apache as this project will not be a kingpin for the company (pull it out and the company falls apart). And I am fairly sure they are not going to want to spring for a bunch of licensing for a product they are not sure they even need (I hope to convince them that it will be well worth the time and effort/money once they see it working). I will look into training for Apache/Windows 2008 as that is what we are using on all our servers currently and I don't see any desire to change.

  17. #17
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hispaladin View Post
    After doing some digging on the whole licensing issue I am leaning toward Apache as this project will not be a kingpin for the company (pull it out and the company falls apart). And I am fairly sure they are not going to want to spring for a bunch of licensing for a product they are not sure they even need (I hope to convince them that it will be well worth the time and effort/money once they see it working). I will look into training for Apache/Windows 2008 as that is what we are using on all our servers currently and I don't see any desire to change.
    One thing to mention, you don't need a license for IIS if you have Windows Server 2008 (IIS is included), the only licensing in question is Windows versus Linux. With you already having a Windows 2008 box, Apache versus IIS is purely a choice. IIS you will likely get support under whatever contract you may have with Microsoft (any Technet Subscriptions, etc). Apache, you'll primarily stick to online communities and any training.

    I personally feel PHP runs better on Apache than IIS, but that is my personal opinion. If you company is okay with that approach, I'd choose it (bonus, if they'll get you training on it).

  18. #18
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by cpradio View Post
    I personally feel PHP runs better on Apache than IIS, but that is my personal opinion. If you company is okay with that approach, I'd choose it (bonus, if they'll get you training on it).
    You're also going to find a lot more documentation and people willing to help you with issues you may run into on Apache rather than IIS

  19. #19
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    OK so I am installing apache and I have a question before I go any further. I am at the option to install "for all users, on port 80, as a service." or "only for the Current User, on Port 8080, when started Manually."
    the instructions say if you have a WWW server already in use to use the second option. We have a server that hosts a webpage but it is not a www website. it is citrix.domain.com, will that get in the way (or rather will this get in the way of that?) This server will be hosting an intranet website that would be more like home.domain.coop, not sure if that would make any difference or not I just can not do anything that will get in the way of our citrix page.

  20. #20
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    You should be fine using option 1. So long as the DNS entry for home.domain.coop goes to the new server, you'll be just fine.

  21. #21
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    OK thanks, my boss would probably kill me if I messed up the other server as it actually is business critical, this one not so much

  22. #22
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hispaladin View Post
    OK thanks, my boss would probably kill me if I messed up the other server as it actually is business critical, this one not so much
    You can't screw it up with the install itself. Worse case scenario when you setup the DNS propagation you could accidentally mess things up. You could accidentally send citrix.domain.com to your new box, you could redirect all port 80 to the new box, etc. But you'd have to physically do that. Right now, nothing is directing traffic to your box, so you don't have to worry about what port it specifies yet. Once you direct traffic to it, it is how you direct that traffic that will matter.

    Hope that makes sense.

  23. #23
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    More or less yes I get it Now I am setting put PHP in apache and I am getting an error. I am following the guide to install and configure PHP that I found at http://www.thesitewizard.com/php/ins...-windows.shtml and have modified the httpd.conf file (made a backup first) and it is hanging up on the line "LoadModule php5_module "c:/php/php5apache2_4.dll" The instructions say to use a file that is 2_2 but that does not exist and I get the same error when I do it that way. If i switch back to the original it works fine. Oh yeah, I get this error when I try to start the apache service. any ideas what I am doing wrong? I am running Apache 2.2.x because that was the newest version that I could get that had a windows installer.

  24. #24
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    What error are you getting? Look in your event viewer or in your logs folder for Apache.

    Also for 4 a-d they gave you bad advice. Turn all that stuff OFF (short tags can be turned on, but the other 3 need to be OFF on Prod boxes).

  25. #25
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ah sorry I thought I listed the error.
    The Apache service named reported the following error:
    >>> httpd.exe: Syntax error on line 130 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/php/php5apache2_4.dll into server: The specified module could not be found. .
    ok so I will start over from the backup config file and just turn on the short tags.


Bookmarks

Posting Permissions

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