project:
to built a oracle8i db server with a apache1.3.14 web server togather in one linux pc server.
solution:
linux rh6.2 distribute+oracle8iR2 for linux+apache1.3.14+php4.0.3pl1
follows are what I did:
install oracle8iR2 and create a db named 'orcl.localdomain'.
gunzip ../apache_1.3.14.tar.gz | tar xf -
cd apache_1.3.14
./configure --with-layout=RedHat
cd ..
gunzip ../php-4.0.3pl1.tar.gz | tar xf -
cd ../php-4.0.3pl1
./configure --with-oci8=/oralce/OraHome1 --with-oralce=/oracle/OraHome1 --with-apache=../apache_1.3.14 --enable-track-vars
make
make instal
cd apache_1.3.14
./configure --with-layout=RedHat --activate-module=src/modules/php4/libphp4.a
make
make instlal
cd php-4.0.3pl1
cp php.ini-dist /usr/local/lib/php.ini
and unrecommend the line 'AddType application/x-httpd-php .php'
login oracle
dbstart
lsnrctl start
ps -ef find the sessions of orcl and listener
login root
append the oracle env arg to /etc/profile
ORACLE_SID=orcld
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
LD_LIBRARY_PATH=/oracle/OraHome1/lib
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
ORACLE_HOME=/oracle/OraHome1
login out and login root again
sh /usr/sbin/apachectl start
httpd started
index.php:
<title>
This is my first homepage.
</title>
<body>
<?php
$user="system";
$passwd="manager";
$sid="orcl.localdomain";
$connect=ora_logon($user,$passwd,$sid);
echo "$connect";
phpinfo();
?>
</body>
it echos "message invalid or unrecognised'
change sid into orcl,the same result.replace ora_logon with ocilogon,the result too.
delete all lines in body except phpinfo()
parts of the result:
----
oracle
Oracle Support enabled
Oracle Version 8.1
Compile-time ORACLE_HOME /oracle/OraHome1
Libraries Used
oci8
OCI8 Support enabled
Revision $Revision: 1.97 $
Oracle Version 8.1
Compile-time ORACLE_HOME /oracle/OraHome1
Libraries Used
----
i'm sure that tnsnames.ora is ok,'cause there's no pbs to connect orcl with sqlplus in other client.
can I built a db server togather with apache+php server?is it the pbs?
who can help me?
to built a oracle8i db server with a apache1.3.14 web server togather in one linux pc server.
solution:
linux rh6.2 distribute+oracle8iR2 for linux+apache1.3.14+php4.0.3pl1
follows are what I did:
install oracle8iR2 and create a db named 'orcl.localdomain'.
gunzip ../apache_1.3.14.tar.gz | tar xf -
cd apache_1.3.14
./configure --with-layout=RedHat
cd ..
gunzip ../php-4.0.3pl1.tar.gz | tar xf -
cd ../php-4.0.3pl1
./configure --with-oci8=/oralce/OraHome1 --with-oralce=/oracle/OraHome1 --with-apache=../apache_1.3.14 --enable-track-vars
make
make instal
cd apache_1.3.14
./configure --with-layout=RedHat --activate-module=src/modules/php4/libphp4.a
make
make instlal
cd php-4.0.3pl1
cp php.ini-dist /usr/local/lib/php.ini
and unrecommend the line 'AddType application/x-httpd-php .php'
login oracle
dbstart
lsnrctl start
ps -ef find the sessions of orcl and listener
login root
append the oracle env arg to /etc/profile
ORACLE_SID=orcld
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
LD_LIBRARY_PATH=/oracle/OraHome1/lib
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
ORACLE_HOME=/oracle/OraHome1
login out and login root again
sh /usr/sbin/apachectl start
httpd started
index.php:
<title>
This is my first homepage.
</title>
<body>
<?php
$user="system";
$passwd="manager";
$sid="orcl.localdomain";
$connect=ora_logon($user,$passwd,$sid);
echo "$connect";
phpinfo();
?>
</body>
it echos "message invalid or unrecognised'
change sid into orcl,the same result.replace ora_logon with ocilogon,the result too.
delete all lines in body except phpinfo()
parts of the result:
----
oracle
Oracle Support enabled
Oracle Version 8.1
Compile-time ORACLE_HOME /oracle/OraHome1
Libraries Used
oci8
OCI8 Support enabled
Revision $Revision: 1.97 $
Oracle Version 8.1
Compile-time ORACLE_HOME /oracle/OraHome1
Libraries Used
----
i'm sure that tnsnames.ora is ok,'cause there's no pbs to connect orcl with sqlplus in other client.
can I built a db server togather with apache+php server?is it the pbs?
who can help me?