What Could Microsoft Do To Make PHP Run Better On Windows
Upcoming SlideShare
Loading in...5
×
 

What Could Microsoft Do To Make PHP Run Better On Windows

on

  • 3,551 views

Presentation given by Manuel Lemos in Microsoft Web Development Summit 2008 about suggestions of things that Microsoft could do or help doing to make PHP run better on Windows

Presentation given by Manuel Lemos in Microsoft Web Development Summit 2008 about suggestions of things that Microsoft could do or help doing to make PHP run better on Windows

Statistics

Views

Total Views
3,551
Views on SlideShare
2,722
Embed Views
829

Actions

Likes
0
Downloads
9
Comments
0

6 Embeds 829

http://www.phpclasses.org 813
http://gzmweb.com 11
http://www.phpclasses.local 2
http://sv2.users.phpclasses.org 1
http://promoxy.mirrors.phpclasses.org 1
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

What Could Microsoft Do To Make PHP Run Better On Windows What Could Microsoft Do To Make PHP Run Better On Windows Presentation Transcript

  • What could Microsoft do to make PHP run better on Windows Manuel Lemos mlemos@prophp.com.br www.prophp.com.br www.php.org.br Microsoft Web Dev Summit 2008 Redmond, November 18, 2008    
  • The problems ● PHP Windows developers face challenges that they would not face when using PHP on other platforms ● Some PHP features do not work well on Windows ● Some Windows specific features are not supported directly by PHP extensions ● PHP core lacks of Windows developers ● “PHP Windows developers are second-class citizens” – Rasmus Lerdord – PHP creator ● Microsoft may help    
  • Existing pure PHP code based solutions    
  • Finding and sharing PHP components for Windows ● Some problems can be solved with pure PHP code ● PHPClasses.org site distributes contributed solutions in the form of classes of objects ● Anybody can contribute with their own PHP classes ● There is a category for Windows specific components: www.phpclasses.org/browse/class/69.html    
  • Accessing Windows shares that require authentication ● PHP cannot access files on Windows remote shares that require authentication ● Victor Varela from Spain solved the problem with the stream wrapper class SMB4PHP: www.phpclasses.org/smb4php ● It uses smbclient program to access files with names with the format: smb://user:password@host/path/to/share    
  • Sending email via SMTP server that requires authentication ● PHP sends email via SMTP on Windows ● The mail() function does not support SMTP authentication ● The MIME message class can solve that problem: www.phpclasses.org/mimemessage ● It supports LOGIN, PLAIN, MD5, NTLM authentication methods via SASL library: www.phpclasses.org/sasl ● Comes with easy replacement function smtp_mail()    
  • Sending e-mail via Microsoft Exchange mail pickup folder ● PHP can queue email much faster when Microsoft Exchange queue pickup folder is available ● Just create email files and drop in the pickup folder ● The MIME message class comes with a sub-class specialized in queuing messages that way: www.phpclasses.org/mimemessage    
  • Solutions that require changes on PHP core code for Windows    
  • Windows implementation of GetMXRR function ● The DNS MX records point to the SMTP server that receives messages for a given domain ● Emulating a delivery to the SMTP server in the MX records can be used to verify if a e-mail is valid ● GetMXRR() function returns the MX records but it is not implemented in PHP under Windows ● A patch to PHP could enable the GetMXRR() function under Windows, so very popular e-mail validation components could also be used in PHP on Windows: www.phpclasses.org/emailvalidation    
  • HTTP NTLM authentication built-in PHP ● NTLM protocol is used to authenticate users during Windows logon ● Web servers that require this authentication on the same Windows domain can reuse credentials to avoid asking passwords again to the users ● PHP has built-in HTTP basic authentication support but not NTLM. It depends on Web server extensions and additional configuration not integrated with PHP ● Built-in NTLM authentication support independent of the Web server would be better    
  • Better file locking support on Windows ● File locking is used to prevent corruption of files being changed by multiple users at the same time ● Examples: content caching and access counters ● PHP file locking function flock() do not work well under Windows    
  • Making PHP extensions run with stability in multithreaded Web servers ● Multithreaded Web servers like IIS and Apache 2 (worker) take less memory to serve the same number of simultaneous HTTP requests ● Less memory per request leads to less costs to scale ● PHP is mostly thread-safe but some extensions and dependency libraries aren't ● Making C/C++ code thread-safe is not a trivial task ● Dr. Sagar Chaki <chaki+@cs.cmu.edu> developed a tool named Beacon to verify code thread safety ● Beacon could be used to certify which extensions are thread-safe and which need to be fixed    
  • Questions? Thank you! Manuel Lemos mlemos@prophp.com.br www.prophp.com.br www.php.org.br