SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
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


              

Contenu connexe

Tendances

WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesDanilo Ercoli
 
Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09mihaiionescu
 
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 codeDanilo Ercoli
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome ExtensionsRon Reiter
 
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 MVCBilal Amjad
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & ExtensionsVarun Raj
 
Discovering Chrome Extensions
Discovering Chrome ExtensionsDiscovering Chrome Extensions
Discovering Chrome ExtensionsÀlex Cabrera Gil
 
WebAssembly and .NET
WebAssembly and .NETWebAssembly and .NET
WebAssembly and .NETJoanna Lamch
 
Introduction to chrome extension development
Introduction to chrome extension developmentIntroduction to chrome extension development
Introduction to chrome extension developmentKAI CHU CHUNG
 
JAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronizedJAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronizedjazoon13
 
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-RPCelliando dias
 
Scaling WordPress on Microsoft
Scaling WordPress on MicrosoftScaling WordPress on Microsoft
Scaling WordPress on MicrosoftJosh Holmes
 
1. introduction to php and variable
1. introduction to php and variable1. introduction to php and variable
1. introduction to php and variableNurAliaAqilaMuhalis
 
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 ApplicationsPerrin Harkins
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in LinuxThamizharasan P
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar litbbsr
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMANAND PRAKASH
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On WindowsJosh Holmes
 

Tendances (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
 

En vedette

Pubblicita Playboy
Pubblicita PlayboyPubblicita Playboy
Pubblicita Playboypc1951
 
FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012FusionInventory at LSM/RMLL 2012
FusionInventory at LSM/RMLL 2012Nouh Walid
 
Continuing Professional Development
Continuing Professional DevelopmentContinuing Professional Development
Continuing Professional DevelopmentTerry Freedman
 
Masterpiece Video Productions
Masterpiece Video ProductionsMasterpiece Video Productions
Masterpiece Video Productionsmasterpiecevideo
 
One year of FusionInventory
One year of FusionInventoryOne year of FusionInventory
One year of FusionInventoryNouh Walid
 
Bodypaintingworld
BodypaintingworldBodypaintingworld
Bodypaintingworldpc1951
 

En vedette (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
 

Similaire à What Could Microsoft Do To Make PHP Run Better On Windows

Similaire à 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
 
IntroductiontoPHP.ppt
IntroductiontoPHP.pptIntroductiontoPHP.ppt
IntroductiontoPHP.ppt
 
ssfsd fsdf ds f
ssfsd fsdf ds fssfsd fsdf ds f
ssfsd fsdf ds f
 

Dernier

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

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