Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-31 Thread Gates, Jeff
From: Matijn Woudt tijn...@gmail.commailto:tijn...@gmail.com
Date: Wednesday, May 23, 2012 3:59 PM
To: a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk 
a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk
Cc: Jeff Gates gat...@si.edumailto:gat...@si.edu, 
php-general@lists.php.netmailto:php-general@lists.php.net 
php-general@lists.php.netmailto:php-general@lists.php.net
Subject: Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers



On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan 
a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk wrote:
On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:

On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff 
gat...@si.edumailto:gat...@si.edu wrote:
 Can anyone tell me what differences I might encounter by working with PHP on 
 a Unix server verses working with PHP on a Windows server. We use Windows 
 production servers here but many of us would like to get more LAMP 
 environments.

 So, I'm wondering if I can use the hive mind here to get a sense of the pros 
 and cons of each platform.

 Thanks.

 Jeff

Apart from all other suggestions, one of the most common errors are
because of different php.ini settings. If you can keep those settings
(mostly) equal, there will not be that many errors.

- Matijn



I would say that's not limited to the distinction between Windows and Linux but 
any server. I've seen what appears to be an identical setup (same version of 
PHP, MySQL, etc) fail only because of a small setting in the php.ini file, just 
because the default was slightly different on the second system; both were 
running Linux.


Yes, ofcourse, that comment was meant for any two systems.

- Matijn

Well, let me also add a related question: what types of problems might I 
encounter if I was trying to set up a Drupal or Wordpress instance on a Windows 
server running PHP as opposed to a Unix server?

Jeff

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-31 Thread Matijn Woudt
On Thu, May 31, 2012 at 3:29 PM, Gates, Jeff gat...@si.edu wrote:
 From: Matijn Woudt tijn...@gmail.commailto:tijn...@gmail.com
 Date: Wednesday, May 23, 2012 3:59 PM
 To: a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk 
 a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk
 Cc: Jeff Gates gat...@si.edumailto:gat...@si.edu, 
 php-general@lists.php.netmailto:php-general@lists.php.net 
 php-general@lists.php.netmailto:php-general@lists.php.net
 Subject: Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers



 On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan 
 a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk wrote:
 On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:

 On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff 
 gat...@si.edumailto:gat...@si.edu wrote:
 Can anyone tell me what differences I might encounter by working with PHP on 
 a Unix server verses working with PHP on a Windows server. We use Windows 
 production servers here but many of us would like to get more LAMP 
 environments.

 So, I'm wondering if I can use the hive mind here to get a sense of the pros 
 and cons of each platform.

 Thanks.

 Jeff

 Apart from all other suggestions, one of the most common errors are
 because of different php.ini settings. If you can keep those settings
 (mostly) equal, there will not be that many errors.

 - Matijn



 I would say that's not limited to the distinction between Windows and Linux 
 but any server. I've seen what appears to be an identical setup (same version 
 of PHP, MySQL, etc) fail only because of a small setting in the php.ini file, 
 just because the default was slightly different on the second system; both 
 were running Linux.


 Yes, ofcourse, that comment was meant for any two systems.

 - Matijn

 Well, let me also add a related question: what types of problems might I 
 encounter if I was trying to set up a Drupal or Wordpress instance on a 
 Windows server running PHP as opposed to a Unix server?

 Jeff

You might need to change a few basic configuration options (paths,
database, etc) inside Drupal/Wordpress/.., but otherwise those are
perfectly compatible on Windows  Linux.

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-31 Thread Bastien Koert
On Thu, May 31, 2012 at 9:38 AM, Matijn Woudt tijn...@gmail.com wrote:
 On Thu, May 31, 2012 at 3:29 PM, Gates, Jeff gat...@si.edu wrote:
 From: Matijn Woudt tijn...@gmail.commailto:tijn...@gmail.com
 Date: Wednesday, May 23, 2012 3:59 PM
 To: a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk 
 a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk
 Cc: Jeff Gates gat...@si.edumailto:gat...@si.edu, 
 php-general@lists.php.netmailto:php-general@lists.php.net 
 php-general@lists.php.netmailto:php-general@lists.php.net
 Subject: Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers



 On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan 
 a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk wrote:
 On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:

 On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff 
 gat...@si.edumailto:gat...@si.edu wrote:
 Can anyone tell me what differences I might encounter by working with PHP 
 on a Unix server verses working with PHP on a Windows server. We use 
 Windows production servers here but many of us would like to get more LAMP 
 environments.

 So, I'm wondering if I can use the hive mind here to get a sense of the 
 pros and cons of each platform.

 Thanks.

 Jeff

 Apart from all other suggestions, one of the most common errors are
 because of different php.ini settings. If you can keep those settings
 (mostly) equal, there will not be that many errors.

 - Matijn



 I would say that's not limited to the distinction between Windows and Linux 
 but any server. I've seen what appears to be an identical setup (same 
 version of PHP, MySQL, etc) fail only because of a small setting in the 
 php.ini file, just because the default was slightly different on the second 
 system; both were running Linux.


 Yes, ofcourse, that comment was meant for any two systems.

 - Matijn

 Well, let me also add a related question: what types of problems might I 
 encounter if I was trying to set up a Drupal or Wordpress instance on a 
 Windows server running PHP as opposed to a Unix server?

 Jeff

 You might need to change a few basic configuration options (paths,
 database, etc) inside Drupal/Wordpress/.., but otherwise those are
 perfectly compatible on Windows  Linux.

 - Matijn

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


Why not install virtualbox or something similar and install a flavor
of linux and use that to do your dev on? It more closely mimics what
will be the operating environment and would lead to less hassles

-- 

Bastien

Cat, the other other white meat

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Mark Rousell
On 22/05/2012 19:15, Gates, Jeff wrote:
 Can anyone tell me what differences I might encounter by working with PHP on 
 a Unix server verses working with PHP on a Windows server. We use Windows 
 production servers here but many of us would like to get more LAMP 
 environments.
 
 So, I'm wondering if I can use the hive mind here to get a sense of the pros 
 and cons of each platform.
 
 Thanks.
 
 Jeff

In addition to Ashley's response, server variables can be populated with
different values on PHP/Apache/Linux versus PHP/IIS/Windows. This can be
a particular issue if you're writing 404 handlers or anything that
relies on query strings.

In particular you need to test and check for differences between Apache
and IIS in how the REQUEST_URI, QUERY_STRING, URL, and ORIG_PATH_INFO
variables are populated depending on whether your script is being called
directly or as a 404 handler.

When redirecting due to a 404 or some other redirect or error IIS will
populate some variables with values like this
/404.php?404;http://www.server.com:80/blah.php?v=1t=2; whereas Apache
will populate the same variable with /blah.php?v=1t=2 in the same
situation. This means the query string needs to be parsed differently.
You need to test for your own usage scenarios.



-- 
MarkR

PGP public key: http://www.signal100.com/markr/pgp
Key ID: C9C5C162


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Mark Rousell
On 22/05/2012 19:32, Ashley Sheridan wrote:
 After that, you have file permissions. In Unix, you have file, owner and
 group permissions; Windows has read/write permissions and I believe on
 newer versions you can get something similar to what Unix/Linux has had
 for the last however many years but I'm not 100% sure on that one.

Just to clarify on this point, Windows (or rather NTFS) permissions use
full ACLs and so, for each file system object, any number of users
and/or groups can have any number of allow or deny permissions assigned
to them for a range of activities (e.g. read, write, append, delete,
create, execute, traverse, read/write attributes, read/write
permissions, etc.). There's a good article here that begins to explain
it: 'Understanding Windows NTFS Permissions'
http://www.windowsecurity.com/articles/Understanding-Windows-NTFS-Permissions.html

NTFS ACLs are similar to (not not identical to) Posix Access Control
Lists that are available for Linux and Unixes.


-- 
MarkR

PGP public key: http://www.signal100.com/markr/pgp
Key ID: C9C5C162


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Matijn Woudt
On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edu wrote:
 Can anyone tell me what differences I might encounter by working with PHP on 
 a Unix server verses working with PHP on a Windows server. We use Windows 
 production servers here but many of us would like to get more LAMP 
 environments.

 So, I'm wondering if I can use the hive mind here to get a sense of the pros 
 and cons of each platform.

 Thanks.

 Jeff

Apart from all other suggestions, one of the most common errors are
because of different php.ini settings. If you can keep those settings
(mostly) equal, there will not be that many errors.

- Matijn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Ashley Sheridan
On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:

 On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edu wrote:
  Can anyone tell me what differences I might encounter by working with PHP 
  on a Unix server verses working with PHP on a Windows server. We use 
  Windows production servers here but many of us would like to get more LAMP 
  environments.
 
  So, I'm wondering if I can use the hive mind here to get a sense of the 
  pros and cons of each platform.
 
  Thanks.
 
  Jeff
 
 Apart from all other suggestions, one of the most common errors are
 because of different php.ini settings. If you can keep those settings
 (mostly) equal, there will not be that many errors.
 
 - Matijn
 


I would say that's not limited to the distinction between Windows and
Linux but any server. I've seen what appears to be an identical setup
(same version of PHP, MySQL, etc) fail only because of a small setting
in the php.ini file, just because the default was slightly different on
the second system; both were running Linux.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Matijn Woudt
On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:

 **
 On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:

 On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edu wrote:
  Can anyone tell me what differences I might encounter by working with PHP 
  on a Unix server verses working with PHP on a Windows server. We use 
  Windows production servers here but many of us would like to get more LAMP 
  environments.
 
  So, I'm wondering if I can use the hive mind here to get a sense of the 
  pros and cons of each platform.
 
  Thanks.
 
  Jeff

 Apart from all other suggestions, one of the most common errors are
 because of different php.ini settings. If you can keep those settings
 (mostly) equal, there will not be that many errors.

 - Matijn



 I would say that's not limited to the distinction between Windows and
 Linux but any server. I've seen what appears to be an identical setup (same
 version of PHP, MySQL, etc) fail only because of a small setting in the
 php.ini file, just because the default was slightly different on the second
 system; both were running Linux.


Yes, ofcourse, that comment was meant for any two systems.

- Matijn


[PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-22 Thread Gates, Jeff
Can anyone tell me what differences I might encounter by working with PHP on a 
Unix server verses working with PHP on a Windows server. We use Windows 
production servers here but many of us would like to get more LAMP environments.

So, I'm wondering if I can use the hive mind here to get a sense of the pros 
and cons of each platform.

Thanks.

Jeff

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-22 Thread Ashley Sheridan
On Tue, 2012-05-22 at 14:15 -0400, Gates, Jeff wrote:

 Can anyone tell me what differences I might encounter by working with PHP on 
 a Unix server verses working with PHP on a Windows server. We use Windows 
 production servers here but many of us would like to get more LAMP 
 environments.
 
 So, I'm wondering if I can use the hive mind here to get a sense of the pros 
 and cons of each platform.
 
 Thanks.
 
 Jeff
 


The first difference I'd point out is things like filenames and paths.
*nix systems are case sensitive, so script.php and Script.php are two
totally different files which can happily exist within the same
directory, whereas on a Windows system this isn't true. This can affect
anything from front-end assets (images, CSS, Javascript files, etc) to
PHP includes and even MySQL tables depending on how the database is
configured (it tends to create database files based on the name of the
DB and it's tables)

Also, the path separator is different. Unix/Linux uses a forward slash
and Windows uses a back-slash. While these can be interchanged quite
often without the world imploding, sometimes they just refuse to, so
it's best to ensure you're using the right one for the script. PHP has
several constants defined to help you which change depending on the
system PHP is currently being run on, you can find out more about them
at http://php.net/manual/en/dir.constants.php 

After that, you have file permissions. In Unix, you have file, owner and
group permissions; Windows has read/write permissions and I believe on
newer versions you can get something similar to what Unix/Linux has had
for the last however many years but I'm not 100% sure on that one.

There are differences with setting up PHP to send emails. On Windows I
believe you have to use SMTP, but on Linux you tend to use the internal
sendmail with the choice of SMTP if you wish.

In the main, I'd say that you want your production servers to mirror the
live ones as closely as possible. There have been plenty of times where
I've moved a script to a different machine and things have stopped
working because of a different version of PHP or MySQL was installed,
and you run the risk further if the OS is different too. When you're on
a deadline, the last thing you want is to have to debug something that
you know works just fine!

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk