Search code examples
phpapacheproceduremod-plsql

Apache server and MOD_PLSQL with PHP


I'm using Apache, PHP and Oracle based application. The apache using MOD_PLSQL. But application only accessed through PHP. Is that MOD_PLSQL necessary for PHP to connect with oracle? The oracle have many procedure which is used through PHP. I want to know whether the PHP need MOD_PLSQL to access the oracle procedure?


Solution

  • To use PHP you just need a web server such as Apache. PHP can query the Oracle database, call stored procedures and put together the content of the page and then hand it off to Apache. Apache will then send the content to the browser.

    So you do not need mod_plsql. Just realize that by not using mod_plsql (or Oracle's Rest Listener), many system are not as efficient. You would need to evaluate your particular goals.

    Mod_plsql and Apache accomplish the same end result without using PHP. The browser issues a page request to Apache. Apache communicates directly to an Oracle package or procedure. Oracle queries the database and assembles the content and then gives it to Apache. Under this architecture, data is accessed quickly via a CPU bus. Compare this to PHP where data is accessed via JDBC or Native Drivers--data is moving in and out of Oracle/PHP.

    The one word of caution with mod-plsql is security. You will need to understand how to properly lock down the database. Really, the same word of caution goes out to PHP/Oracle.

    If you go down the mod-plsql route, look into PL Server Pages (PSPs). These allow you to write code in you're favorite editor similar to PHP. All in all, I've yet to find anything as powerful and efficient as Oracle's Web Toolkit.