SlideShare uma empresa Scribd logo
1 de 13
Baixar para ler offline
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


              

Mais conteúdo relacionado

Mais procurados

WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
Danilo Ercoli
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome Extensions
Ron Reiter
 
Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
Varun Raj
 
SOAP:Simple Object Access Protocol -XML-RPC
SOAP:Simple Object Access Protocol-XML-RPCSOAP:Simple Object Access Protocol-XML-RPC
SOAP:Simple Object Access Protocol -XML-RPC
elliando dias
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in Linux
Thamizharasan P
 

Mais procurados (20)

WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
 
Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome Extensions
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVC
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
 
Discovering Chrome Extensions
Discovering Chrome ExtensionsDiscovering Chrome Extensions
Discovering Chrome Extensions
 
WebSphere Message Broker installation guide
WebSphere Message Broker installation guideWebSphere Message Broker installation guide
WebSphere Message Broker installation guide
 
WebAssembly and .NET
WebAssembly and .NETWebAssembly and .NET
WebAssembly and .NET
 
Introduction to chrome extension development
Introduction to chrome extension developmentIntroduction to chrome extension development
Introduction to chrome extension development
 
JAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronizedJAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronized
 
SOAP:Simple Object Access Protocol -XML-RPC
SOAP:Simple Object Access Protocol-XML-RPCSOAP:Simple Object Access Protocol-XML-RPC
SOAP:Simple Object Access Protocol -XML-RPC
 
Scaling WordPress on Microsoft
Scaling WordPress on MicrosoftScaling WordPress on Microsoft
Scaling WordPress on Microsoft
 
1. introduction to php and variable
1. introduction to php and variable1. introduction to php and variable
1. introduction to php and variable
 
Care and Feeding of Large Web Applications
Care and Feeding of Large Web ApplicationsCare and Feeding of Large Web Applications
Care and Feeding of Large Web Applications
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in Linux
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On Windows
 

Destaque (8)

簡報2
簡報2簡報2
簡報2
 
Pubblicita Playboy
Pubblicita PlayboyPubblicita Playboy
Pubblicita Playboy
 
簡報2
簡報2簡報2
簡報2
 
FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012
 
Continuing Professional Development
Continuing Professional DevelopmentContinuing Professional Development
Continuing Professional Development
 
Masterpiece Video Productions
Masterpiece Video ProductionsMasterpiece Video Productions
Masterpiece Video Productions
 
One year of FusionInventory
One year of FusionInventoryOne year of FusionInventory
One year of FusionInventory
 
Bodypaintingworld
BodypaintingworldBodypaintingworld
Bodypaintingworld
 

Semelhante a What Could Microsoft Do To Make PHP Run Better On Windows

06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebserver
tarensi
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
Uma Sam
 
6 3 tier architecture php
6 3 tier architecture php6 3 tier architecture php
6 3 tier architecture php
cefour
 

Semelhante a What Could Microsoft Do To Make PHP Run Better On Windows (20)

CNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: ExploitationCNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: Exploitation
 
06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebserver
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
unit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docxunit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docx
 
Php myadmin
Php myadminPhp myadmin
Php myadmin
 
PHP Course and Training
PHP Course and Training PHP Course and Training
PHP Course and Training
 
Php Training in Chandigarh
Php Training in ChandigarhPhp Training in Chandigarh
Php Training in Chandigarh
 
PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matter
 
6 3 tier architecture php
6 3 tier architecture php6 3 tier architecture php
6 3 tier architecture php
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
test
testtest
test
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
ssfsd fsdf ds f
ssfsd fsdf ds fssfsd fsdf ds f
ssfsd fsdf ds f
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
ssfsd fsdf ds f
ssfsd fsdf ds fssfsd fsdf ds f
ssfsd fsdf ds f
 
ssfsd fsdf ds f
ssfsd fsdf ds fssfsd fsdf ds f
ssfsd fsdf ds f
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

What Could Microsoft Do To Make PHP Run Better On Windows

  • 1. 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    
  • 2. 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    
  • 3. Existing pure PHP code based solutions    
  • 4. 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    
  • 5. 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    
  • 6. 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()    
  • 7. 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    
  • 8. Solutions that require changes on PHP core code for Windows    
  • 9. 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    
  • 10. 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    
  • 11. 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    
  • 12. 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    
  • 13. Questions? Thank you! Manuel Lemos mlemos@prophp.com.br www.prophp.com.br www.php.org.br