Forum Stats

  • 3,875,288 Users
  • 2,266,906 Discussions


OHS 12c and php 5.3 without fpm

Njyrala-Oracle Member Posts: 36 Employee
edited Jan 13, 2015 6:28AM in PHP

Hi, I have previously configured php 5.3 with 11g OHS using instructions in note 1163665.1. I configure php with oci8. Setup works fine.

Later I've installed ohs 12.1.3 and configured php 5.6 (with oci8) using instructions in this page:Installing PHP on Oracle HTTP Server 12c. This setup also worked fine.

Our application dev team however does not want to upgrade from 5.3 because they are using 'Call-time pass-by-reference' and that has been disabled from php 5.4 onwards.

I tried to configure php5.3 with 12c OHS using same steps as described in note 1163665.1 but that does not work at all, I'm not able to get any php pages to come up.

Is php 5.3 configurable with 12c ohs and are there any steps for that? Or can I use the same steps as descrived in the 12c and php 5.5 instructions even though I use 5.3 ( ?

This would mean I would configure php-fpm using php 5.3 and I would actually prefer not to use php-fpm as that requires additional fpm process to runon my midtier. Are there any instructions available for configureing php 5.3 without fpm on 12c ohs?




  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,656 Employee

    PHP-FPM was included in PHP 5.3 but there may be some configuration differences from PHP 5.5.

    If you build PHP on OHS without using PHP-FPM, you need to make sure that PHP OCI8 is built with the Oracle client header files (e.g. Instant Client SDK) that match the version of the Oracle client libraries in OHS.  The steps may or may not look something like, substituting the appropriate Instant Client version.

    A third alternative is to install a standalone Apache & PHP and use OHS to proxy to this self contained Apache.

  • Njyrala-Oracle
    Njyrala-Oracle Member Posts: 36 Employee


    I followed the steps in with few exceptions

    - I used instant client

    - I had libxml2 on my server so included that in config command

    - my server is not itanum so I did not do any of the litanum specific setup like export CFLAGS='+O2 +DD64'

    - if I ran config with apxs2 then make install failed:  --with-apxs2=$ORACLE_HOME/bin/apxs

    UCRMV4078:fapau_a> (fapau:fmw_fapau) /u01/app/oracle/product/php5.3_fapau12c

    $ make install

    Installing PHP SAPI module:       apache2handler


    This PRODUCT_HOME is managed and updates to instance configuration must be

    made through wlst or EM.

    make: *** [install-sapi] Error 1

    I think this is 12c OHS specific issue so I ran config without apxi, like this:
    /u01/app/stage/software/php/php5.3/php-5.3.27/configure --with-oci8=instantclient,/u01/app/oracle/product/instantclient_12_1 --disable-rpath --with-libdir=$LD_LIBRARY_PATH --prefix=$ORACLE_HOME --with-libxml-dir=/u01/app/oracle/product/libxml2 --with-config-file-path=$CONFIG_FILE_PATH

    - ohs 12c configs were not updated so I added following lines to httpd.conf manually:

    LoadModule php5_module   /u01/app/oracle/product/fmw_fapau/ohs/modules/

    AddType application/x-httpd-php .php .phtml

    AddType application/x-httpd-php-source .phps

    AddType application/x-tar .tgz

    - also had to copy from php code area to my OHS_HOME/modules

    After this I'm able to access php fine through 12c ohs.

    I also tested with fpm-php and that too worked fine when I followed the steps in here: Installing PHP on Oracle HTTP Server 12c
    but just used 5.3 php.

    Thanks for your help!

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,656 Employee

    Your first solution looks very, very odd and I wouldn't use it.

    I'd go with your PHP FPM configuration.

    Since PHP 5.3 is no longer receiving any patches, you are leaving yourself open to security problems.

  • Njyrala-Oracle
    Njyrala-Oracle Member Posts: 36 Employee

    Hi CJ, sorry did not notice your repply until now. Thanks for that info, I will make sure we upgrade to newer version asap.


This discussion has been closed.