zoukankan      html  css  js  c++  java
  • php+apache+oracle安装

    安装apache

    ./configure --prefix=/opt/apache2  --enable-module=so

    编译php

    ./configure --prefix=/myhome/php-5 --with-gd  --with-jpeg --with-jpeg-dir=/usr  --with-zlib-dir=/usr/local  --with-png-dir=/usr/local \
      --with-apxs2=/myhome/apache2/bin/apxs --with-oci8=/oracle/oracle/product/10.2.0/db_7

    修改apache配置文件httpd.conf

    代码
    LoadModule php5_module modules/libphp5.so
    <IfModule mod_php5.c>
    AddType application
    /x-httpd-php .php
    php_admin_flag magic_quotes_gpc Off
    php_admin_flag magic_quotes_runtime Off
    </IfModule>

    测试数据库连接
     

    代码
    <?php
    $sql="select * from wh_hosts";
    $db_conn
    = oci_connect( "sys", "tiger","sid" );
    $stmt
    = ociparse($db_conn, $sql);
    ociexecute($stmt);
    $nrows
    = oci_fetch_all($stmt, $results);
    oci_free_statement($stmt);
    oci_close($db_conn);
    ?>
  • 相关阅读:
    maven完成构建后,eclipse导入运行maven web
    maven构建java项目的过程【完全】
    maven配置【转载】
    iOS - 移动设备防丢失App
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/itfriend/p/1869096.html
Copyright © 2011-2022 走看看