To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
Like the subject says, I'm having problems getting this to run. It seems to be configuring and compiling fine, but after I do a make install and go to restart apache, the startup script says it's up and ok, but it's really not starting.
The frustrating thing is that it's not throwing up any usefull error messages, I've checked both apache's error log and the system log.
If I compile it w/o oracle, it works fine. I actually just keep a backup of libphp4.so to replace the "broken" one to minimize downtime..
my configure params:
./configure --with-mysql --with-oci8=/usr/u01 --with-apxs=/usr/sbin/apxs
Not necessarily. If I understand it correctly, oci8 is better suited for Oracle 8 (which I'm using and failed to mention), but I have tried both and neither work. They both produce the same symptoms.
<snip out of the 'configure' file>
--with-oci8[=DIR] "Include Oracle-oci8 support. Default DIR is ORACLE_HOME."
</snip>
Follow the below steps you are sure to run oracle,
You definitely need to download apache > 1.3.9, and php4
untar them into directories apache and php
$ cd apache
$./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a
$ cd ../php
$ ./configure --with-apache=../apache --with-oci8=$ORACLE_HOME --enable-sigchild --with-config-file-path=/usr/local/apache/conf
$make
$ make install
$cd ../apache
$make
NOTE: If make complains about No rule tomake then do the initial apache configure again followed by make
$ make install
$ cd ../php
$ cp php.ini-dist /usr/local/apache/conf/php.ini
$ cd /usr/local/apache/conf
$ vi httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
If the above doesnt work then your oracle 8i installation is improper.
php4 compiles fine, and without oracle-support (oci8) it runs fine but whenever
I activate oci8 (or oracle) apache simply doesn't start. no error-messages, no
crash, no core, it simply fails to start.
I set the Oracle-Enviroment-Variables in the httpd-start-script (ORACLE_HOME, LD_LIBRARY_PATH, ORACLE_SID, ORACLE_BASE, PATH)
and to be sure that there are no permission-problems apache runs as user "oracle"
the oracle-db and the listener both are up and running.
I'm using oracle 8.1.6 Enterprise Server on Redhat-Linux 6.1 (I patched the apxs-skript according to the infos from php3)
with sqlplus I can do sql-queries (create tables, search.....) just fine, so oracle
seems to be working.
for compilation I used:
./configure --with-apxs=/usr/sbin/apxs --with-oci8=/oracle/software --with-gnu-ld
make
make install
I had to activate the module in /etc/httpd/conf/httpd.conf, but the installer wrote the
proper entries there. As I already said, it works fine without the --with-oci8-option
......
btw: php3 shows exactly the same behaviour
I can't help you with the small details as I'm not an admin, but my admin fixed it by just inserting a line into the httpd startup script. He explained it to me as the problem being an Oracle dependency - wish I knew more. Hope this helps.
Dennis
See below:
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo -n "Starting httpd: "
export LD_PRELOAD=/usr/lib/libpthread.so <-- Line Added
daemon httpd
echo
touch /var/lock/subsys/httpd
;;
stop)
echo -n "Shutting down http: "
killproc httpd
echo
rm -f /var/lock/subsys/httpd
rm -f /var/run/httpd.pid
;;
status)
status httpd
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading httpd: "
killproc httpd -HUP
echo
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
Thanks a lot for the tip, it works fine now! I think this should show up in an
INSTALL.oracle - File in the distribution. Seems that it is a common problem.....
this method worked great for me too all once you get past the header part here are the steps i took:
This change should be a relatively quick thing the first time did take longer then hoped. First download the latest apache for linux www.apache.com then download the latest php build in this case it was php4.0.3pl1 these files will be .tar.gz place them where ever you wish and run this command to extract them gzip -cd filename | tar xvf - this will create a subdirectory inside the one your in inside there will be all the source code to install these you still need to make compile and install them. Oracle client must be installed to do this!!! Also you will need to set up the following environment vairbles by typeing or adding this to your .profile (roots preferably)
export ORACLE_BASE=/usr/local/oracle ** path to your oracle
export ORACLE_HOME=/usr/local/oracle ** path to your oracle
export ORACLE_SID=YOUR_SID ** generaly HITS
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
start with apache by entering the apache folder where you extracted the distribution and running this command
./configure --with-layout=Apache --with-prefix=(where you want to install it at (/usr/local/apache)) --enable-module-mime-magic --enable-shared=headers --enable-module=info --enable-module=rewrite --enable-shared=rewrite --enable-module=speling --enable-shared=speling .
Then run this command
make
Then run this one
make install
At this point apache is installed and sitting in /usr/local/apache to start the server go into /usr/local/apache/bin and type ./apachectl start now go to your webbrowser and put in the address to your server to make sure your getting pages.
Now enter the folder where you extracted your Php source code you will need to add the following header files to the main folder and the ext/oci8 folder
these can be found in the oracle home folder do a search for them they are kindof scattered but you need to get them from a linux box running the full blown oracle server!! you may get liucky and find them within your client version.
once this is done inside your php distribution folder type the folowing
./configure --with-apxs=/usr/local/apache/bin/apxs --with-oci8=(path to oracle home)
then type
make
then type
make install
this will do everything for you cept two final steps go to you apache bin folder usualy /usr/local/apache/bin and edit the apachectl file and add the following line to the top of it
export LD_PRELOAD=/usr/lib/libpthread.so
now type
./apachectl start
bingo your done.
the environment variables set above must be set to start apache also I reccomend adding them to any .profile that will need it