Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams
  • php_oci8_12c enabled,
  • php_pdo_oci enabled,
  • oracle instantclient-basiclite-windows.x64-12.1.0.2.0
  • System Path defined according
  • added mod_fcgid 2.3.9 to Apache
  • added oci8 2.0.12 Thread Safe x64 for PHP 5.6 (replaced old php_oci8_12c.dll)
  • I see PDO for Oracle in phpinfo.

    I have a db_o.php config file:

    return [
        'class' => 'yii\db\Connection',
        'dsn' => 'oci:dbname=//SOME_IP_ADDRESS:PORT/YOUR_SID;charset=UTF8',
        'username' => '',
        'password' => '',
    

    Based on this oracle article I've managed to set up everything and basically it works (with limitations), however changes are needed:

  • it doesn't have to be NTS, I have used TS components everywhere
  • as wampserver uses phpForApache.ini, and Fcgid config needs php.ini, I had to duplicate phpForApache.ini and rename it to php.ini.
  • instead of <Directory "c:/Apache24/htdocs"> of course I had to add +ExecCGI to <Directory "${INSTALL_DIR}/www/">
  • I get now in gii table names while generating model, but:

  • if I need relations, it takes more than 2 minutes, so wampserver is stopping. I don't know why, but I think it's because the database and relations are simply too complicated (lot of composite keys etc.). I'm getting Internal Server Error, before max_execution_time (I have to change it in both php ini files). I've found in apache error log that it was caused by mod_fcgid (read timeout from pipe), so I have changed FcgidIOTimeout and FcgidBusyTimeout also to 300 (sec.) and memory_limit to 512M because it was also not enough. Why does it need so many resources I have no clue, because in the end it has only 3 relations generated. :]
  • So it works now. No questions. Many thanks!

    I can't get it to work. I've tried now all versions, all Paths, no luck. However wampserver is starting without any errors after selecting extensions, in phpinfo i can't see them. – user2511599 Feb 21, 2017 at 13:27 I've noticed in phpinfo Configure Command: "--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" so I've moved instantclient_12_1, changed Path also according to that, but still not working. I'm completely stuck. – user2511599 Feb 21, 2017 at 13:33 from link "you also have to have an ORACLE driver installed on your system. The PHP extension is just an interface between your PHP code and the ORACLE driver," did you install driver? – zakrzu Feb 21, 2017 at 21:20

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.