安装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);
?>

 

相关文章:

  • 2022-12-23
  • 2021-10-20
  • 2021-05-18
  • 2021-11-30
  • 2021-08-11
  • 2021-06-18
  • 2021-06-05
猜你喜欢
  • 2021-05-02
  • 2022-12-23
  • 2021-08-30
  • 2021-07-14
  • 2021-07-31
  • 2021-09-07
  • 2021-08-06
相关资源
相似解决方案