WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Does IBM HTTP Server support PHP?

    Posted Mon March 27, 2017 11:37 AM

    Does IBM HTTP Server support PHP? I need PHP content on IBM HTTP Server, need to run PHP files on IBM HTTP Server.



  • 2.  RE: Does IBM HTTP Server support PHP?

    Posted Mon March 27, 2017 12:09 PM

    Technically, you should be able to use IBM HTTP Server with PHP. Check this link for considerations on using IHS and PHP: IBM HTTP Server Questions and Answers: Other Modules

    Specifically, the last point:

    Can I use PHP with IBM HTTP Server?

    IBM never provides any support for configuring/building/using any modules not provided as part of the IHS installation. Additionally, there are some PHP-specific issues to note.

    License issues

    • WebSphere customers are licensed to use IHS in support of their WebSphere Application Server and not for any other purpose. For the vast majority of use cases, colocating PHP with IHS will not fall within these terms (as it effectively is using IHS as a (non-java) application server).

    • In contrast, "free web download" version of IBM HTTP Server has no such license limitations but is not supported by IBM.

    • When IBM HTTP Server is used under the z/OS Ported Tools license, there are no license limitations but support is limited to the components provided by IBM.

    Technical issues

    • Supported versions of IBM HTTP Server uses a threaded MPM. The "standard" method of using PHP with Apache, mod_php, cannot be reliably used with this MPM. Alternatives include running PHP via CGI or FastCGI.

    • PHP may need modifications to its build system to accommodate IHS

     

    Is there any reason not to use Apache HTTP Server?



  • 3.  RE: Does IBM HTTP Server support PHP?

    Posted Tue March 28, 2017 11:11 AM

    This is great Martin, thanks for the info! 



  • 4.  RE: Does IBM HTTP Server support PHP?

    Posted Thu March 30, 2017 01:07 PM

     

    Hello Sarah,

    Yes, it is possible. You have only to download the libphp5.so and save it into libexec folder. Therefore, to either include or remove the comment, "#", the following entries in the httpd.conf:

     

    1. LoadModule php5_module libexec/libphp5.so
    2. AddModule mod_php5.c
    3. AddType application/x-httpd-php .php

    Lastly, perhaps you want to enable the website uses index.php, then include it:

    1. DirectoryIndex index.html index.php

     

    If you have any issues, please let me know!



    In Reply to Sarah Hickner:

     

    Does IBM HTTP Server support PHP? I need PHP content on IBM HTTP Server, need to run PHP files on IBM HTTP Server.