Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the best OS to use with PHP? 1

Status
Not open for further replies.

numbered

Technical User
Jun 10, 2002
54
0
0
CA
I'm a newbie with php. I develop with coldfusion and asp. I'd like to get into php.

I have a pc ready and watiing for on operation system. What would you ppl recomend I load onto it?
 
I recommend using PHP with Apache on Linux.

Although PHP will run with every major web server out there, most installations are Apache -- you can get the most help with that.

PHP is also platform agnostic, but some of its support libraries are easier to get working on *-nix OSes than Win32. ______________________________________________________________________
TANSTAAFL!
 
What flavor of linux would you recommend? I was thinking about using suse.
 
I don't think the distribution matters that much any more. And SuSE is the standard ix86 distribution of United Linux.

My personal preference is RedHat. It's not that I consider RedHat fantastically superior to any other, it's just what I'm most familiar with. ______________________________________________________________________
TANSTAAFL!
 
These days, PHP works well on many different OSes, including Windows (The upcoming version 4.3 will fix certain Windows/IIS problems). But in originally, PHP was written on and for Unix servers.

I personally feel the most stable OS/Server combination for PHP is FreeBSD ( with Apache. FreeBSD has consistently rated near the top of the Netcraft battle for "longest uptimes". (
FreeBSD takes a little more work to understand, but once you understand it, you understand Unix, and you can make things happen so fast you won't believe it. I can install and configure a full FreeBSD server in less than a 5th of the time it takes to set up and configure a Win2K server.

Also, a note of interest: FreeBSD is open source, and free, just as Linux, but the license is different. The BSD license doesn't attempt to force open source ideology, as does the Linux GPL. This doesn't make much difference to most users, but the BSD license is often considered a little more "business-friendly", allowing businesses to integrate them with proprietary products, without worry of legal repercussions.

Interestingly enough, Apache and PHP are also both distributed with BSD-style licenses.

I also recommend PostgreSQL ( as the most advanced open-source database system to use with PHP. It far outstrips MySQL for enterprise-level features, and even competes with some of the large commercial DBs. PostgreSQL runs well on FreeBSD, as well as on any other Unix platform. Of course, PostgreSQL is also distributed with the BSD-style licence, since it was created by the same great university as FreeBSD (Berkeley) ;-). -------------------------------------------

Big Brother: "War is Peace" -- Big Business: "Suspicion is Trust"
(
 
rycamor,

Of course, considering that 9 of the top ten sites are also in Japan, I can also logically conclude from those numbers that I should always hire Japanese sysadmins.

Netcraft's numbers are based on IP fingerprinting. Those numbers are better indicators of commonality of the IP stack across revisions than anything. ______________________________________________________________________
TANSTAAFL!
 
How about selling the PC and getting a Mac?

I struggled with setting up Linux on old PCs in my closet and was amazed at how effortless it was to use OSX (a unix variant) on a Mac.

OSX makes the unix world look pretty - - and the OS comes with Apache and PHP installed for you.
 
Why not buy new hardware, its not really a bad idea since you can pick up a suitable second hand base unit for about £20/$30. You can administer through a TCP/IP connection, just like having your own hosting server.

And you don't have to mess around with dual booting or partitioning your drive and loosing some space. We have a Pentium 233MMX 64MB 8GB drive, running FreeBSD and Apache which is controlling our ADSL internet connection AND serving a few websites without any trouble at all.

No screen, no monitor either.
 
Hey Sleipner,

Yeah, I know that statistics never tell the whole story. However, ever since Netcraft started doing this, FreeBSD or BSD/OS have continuously been the top. I think that says something. In terms of personal experience, I will say that I started as a Linux user, and I still love at least one Linux distribution (Slackware), but I gave up after wasting hour after hour dealing with RedHat's inconsistencies, and Mandrake's fussiness. Yes, they are essentially based on the same Unix underpinnings, but I am convinced that FreeBSD's codebase and development strategy are more mature and conservative than Linux, and definitely more mature than the typical hodge-podge of most Linux distributions. Linux has all kinds of neat leading-edge advancements, but FreeBSD just keeps on chugging away, and usually works fine on lower-end hardware than Linux. At one time (just for kicks) I actually installed FreeBSD and compiled Apache, PHP, and MySQL on a 486 with 8 MB of RAM. My main PHP development server for the first year was a P90 with 16 MB RAM, and it gave me absolutely no problems, even developing and testing a complete e-commerce implementation.

So I speak from experience: FreeBSD is a system, not just an OS. The system is a "stripped down to the basics" approach, but it is a unified system. Everything is logically organized, and where it should be. There are no nasty suprises about library locations and startup scripts. And the 'ports' approach to software installation is a dream for sysadmins. I can manage a FreeBSD box much quicker than I can manage any other kind of system. It takes a little more commitment up front to learn, but the results are worth it.

I agree that Linux can do everything FreeBSD can do and vice-versa, and there are some tasks which Linux handles better (especially as a desktop or workstation). But FreeBSD is the ultimate server. And there are companies such as Yahoo, who totally agree with me on this ;-). When you depend on their servers for everything, this is not a decision to be taken lightly. -------------------------------------------

Big Brother: "War is Peace" -- Big Business: "Suspicion is Trust"
(
 
rycamor:

I had already surmised that you prefer BSD. But I still haven't heard a refutation of my inference that BSD's being at the top of the NetCraft uptime list is simply a matter of few changes to BSD's IP stack. ______________________________________________________________________
TANSTAAFL!
 
If you want to jump to Linux, get Redhat to start off, then move on to Mandrake or something else.

If you want something that is not going to break your bank and isn't going to give you problems get Freebsd 4.7. I run apache on mine with Postgres, Mysql, Tomcat 4.12, and a few other things. and I prefer that over Linux any given day. The only problems I've had have been hardware failures but nothing related to the OS.

 
sleipner,

>>I had already surmised that you prefer BSD. But I still haven't heard a refutation of my inference that BSD's being at the top of the NetCraft uptime list is simply a matter of few changes to BSD's IP stack.

I wasn't intending to refute that. I was merely offering other factors and my own experience as to how I arrived at my opinion. Believe me, I have spent my time with each of the above.

I take it you are implying that the reason Linux isn't up there with FreeBSD on the Netcraft list is because someone can recompile and reload the kernel without rebooting, but the TCP/IP stack changes will make it seem as if there was a reboot. I don't know the answer to that for FreeBSD or Linux, so ya got me there...

But, I suspect that the FreeBSD stack has definitely gone through changes over the past 4 years (note that the uptimes of some of those machines are greater than 4 years). Really, the Netcraft findings can be interpreted a couple of ways, and I'm not denying that. One of the interpretations I subscribe to is that FreeBSD works so smoothly that sysadmins rarely feel a need to upgrade the kernel, so they just apply security patches and keep the machine running. I personally have worked with machines that had a 2-3 year uptime, and the only reason for rebooting was to fix hardware problems.

Take my personal experience with a grain of salt, of course. Check it out for yourself ;-). -------------------------------------------

Big Brother: "War is Peace" -- Big Business: "Suspicion is Trust"
(
 
rycamor:

There's something I just noticed in the NetCraft FAQ:

Additionally HP-UX, Linux, Solaris and recent releases of FreeBSD cycle back to zero after 497 days, exactly as if the machine had been rebooted at that precise point. Thus it is not possible to see a HP-UX, Linux or Solaris system with an uptime measurement above 497 days. ______________________________________________________________________
TANSTAAFL!
 
If all you are interested in is learning php, then install it on the os you are most familiar with. Read instructions carefully. You can find all the help you need on the web, but it is not a bad idea to get a good refernce book to read when you're not in front of a computer... (like bathroom time!) Anyhow, PHP is great and works well on almost every common os.
 
install it on the os you are most familiar with...

<sarcasm type=&quot;flippant&quot; delivery=&quot;overly-dramatic&quot;>
Oh, sure! Let's just let reason reign, why don't we?

Takes all the steam out of a good Canon War.
</sarcasm> ______________________________________________________________________
TANSTAAFL!
 
Hehe,

Stow your cannons, boys...

(I wouldn't exactly call FreeBSD canon -- but somehow each definition of it seems to work for Unix ;-))

Seriously, the great thing about PHP is that it works so well on many platforms. I would be willing to bet that FreeBSD works on as many platforms as a Java webserver solution.

I have done PHP projects for Windows, Linux, and FreeBSD servers, and each time found that PHP is the least of the problems you will deal with. But remember, when reading the online documentation at that there are certain functions that are available on one platform that are not available on the other. There are pros and cons both ways on this.

Enjoy -------------------------------------------

Big Brother: &quot;War is Peace&quot; -- Big Business: &quot;Suspicion is Trust&quot;
(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top