Your daily news about web technology, interface and design.

Sorry about the current website getting messy,
we are currently moving to our new wordpress platform "webmasterbulletin.net".
> Developper's Zone > PHP & PEAR
 
Php on windows, why not ?

There is at least one good reason to choose windows as a host for your PHP/mysql web site : installation is as easy as other windows programs, and it is much easier to change configuration or add libraries to PHP on windows than on linux where you have to like the cc or gcc compiler command if you need to manipulate extensions or add ons.

Of course most linux platforms ship with apache, php and mysql installed. But if you want to perform simple tasks such as adding extensions or upgrading your php version (which can occur very often with php), you'll need a good linux guy if you are not experienced at compiling and recompiling.

On the other hand, Apache, php , mysql on windows work quite the same, except for small differences like the PATH_SEPARATOR. In fact, even if it is not quite designed for windows, this Apache, php & mysql thing installs in a few clicks and can work on a production environment.

To install these, don't bother downloading separate packages first. The easyphp program is an installer that will do that for you, it weighs around 10mo and is a full installer for apache, mysql, php. It ships with phpmyadmin,  a php program that administrates the mysql server. My advice there is to install easy php in somewhere else than program files because your web root folder is a subdirectory of the easyPhp install.

As mentionned above, windows is good for adding extensions to PHP : just uncomment the line of extension dll by removing the ";" character in the php.ini file, php's configuration file. One strange thing though, is that you'll find it hard to get the extension working just like that. It must be a bug of PHP : even though the extension folder is clearly defined in the php.ini, I found that extensions are more easily found when their dll file is placed in windows/system directory. For some extensions such as php_domxml.dll, I also had to move iconv.dll to the system folder because domxml depends on it. Same for php_gettext.dll, I had to move it there along with libintl-1.dll.

Apart from these small tricks, you'll find that installing PHP, Mysql and Apache on windows is really worth in terms of ease of administration.



Comments are temporarily disabled because of SPAM
 Discussion / comments
2005-01-27
infoweb.co.nz webmaster comments from infoweb.co.nz :
Linux vs Windows arguments are stupid and all articles like this do is start more arguments.
- Windows can be secure
- Linux has easy ways to install (including modules)
If you want to know what operating system to run php on, here is a good rule.
It is easier to stick with what you know.
- If you have never used linux, there is no point moving to it just for a website.
- Operating systems are only a personal preference.
 Post a reply to this comment
2005-01-26
Vlais comments from Serbia :
Look huys,
I'm running PHP/MYSQL apps only on Win platform. Develop almost everything I had to using IIS/PHP/MYSQL, and then put it on Linux servers worldwide. Want efficiency, doesn't matter OS.

 Post a reply to this comment
2005-01-26
|pit comments :
The use of COM object is one reason to use php on windows. In fact this is the only legit reason I know to run windows over linux.
 Post a reply to this comment
2005-01-26
webxadmin comments :
answers like joe's illustrate a typical example of reasons for this article. From the level of knowledge he seems to have about internals of an OS, that guy must be spending his life trying to compile stuff on his linux box while we do the same on windows in 10 minutes, and the rest of day we have a real life.

I would still recommend linux of course, as long as it doesn't
keep me at my screen all day trying to understand something about include libraries before doing cc.
Thanks john for asking people to be just nice. that's more important than choosing between OSs isn't it.
 Post a reply to this comment
2005-01-26
John Programmer comments :
Listne dude, your cowardly using an anoymous name - then insinuating that the author is naive and idiotic... But you are naive and idiotic... Next time, use your real name and leave nicer comments
 Post a reply to this comment
2005-01-26
Joe Programmer comments from Amerika :
Windows is an insecure platform and hobbled by poor implementation of the various services it offers. To choose Windows over Linux for running PHP is naive at best and idiotic at worst. Sorry, no sale.
 Post a reply to this comment


Database error: Invalid SQL: insert into article_read_count values(now() , 149,13,'38.107.191.87')
MySQL Error: 1136 (Column count doesn't match value count at row 1)
Session halted.