bijingyuan 2009-12-03
Oracle 就不说了,Linux 是 CentOS。
1. 安装 httpd(apache)
yum install httpd -y
2. 安装 php, php-gd, php-mcrypt, php-pecl*
yum install php php-gd php-mcrypt php-pecl* -y
3. 安装 oci8
pecl install oci8
安装时输入oracle安装目录
4.修改 httpd.conf
找到
User apache
Group apache
改成系统中的用户,如:
User oracle
Group oracle
5. 在/etc/php.d/下创建 oracle.ini 内容:
; Enable oracle extension module
extension=oci8.so
6.修改 php(/etc/php.ini)的临时目录:
session.save_path = "/tmp/php"
并将 /tmp/php 的权限降到最低 chmod 777 /tmp/php
7.设置环境变量 .bash_profile
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1/
LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib
TNS_ADMIN=/opt/oracle/product/11.2.0/dbhome_1/network/admin
ORACLE_SID=orcl
export ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN ORACLE_SID
8.
chkconfig --level 3 httpd on
chkconfig --level 5 httpd on
9. reboot
<?php. if (!empty($_POST)) {. $data1 = $_POST["data1"];$data2 = $_POST["data2"];$fuhao = $_POST["fuh