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

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

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
 

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

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

Último

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Último (20)

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

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