RE: [PHP4BETA] RE: PHP/Oracle Silent Apache Crash

From: Date: Mon, 19 Jun 2000 19:13:54 +0000
Subject: RE: [PHP4BETA] RE: PHP/Oracle Silent Apache Crash
Groups: php.version4 
Request: Send a blank email to php-version4+get-16325@lists.php.net to get a copy of this message
Actually, no I haven't. Basically, Thies has passed on to me three individual attempts to do this: [1] Export -lpthread in LDFLAGS before configuring Apache. [2] Add -lpthread to LIBS1 line in src/Makefile for Apache. [3] Export -lpthread in LIBS before configuring Apache. Below is the shell script (attempt [3]) that I'm using to build Apache + PHP (w/Oracle & Easysoft OOB Server) however I receive an error message from Apache stating that the PHP DSO is garbled! Finally, when I remove the --with-oci8=$ORACLE_HOME and rebuild PHP everything is fine. By the way I have built "statically" Apache + PHP + Oracle and successfully queried our Oracle Database. Works fine as PHP binary too. APACHE ERROR: Syntax error on line 243 of /usr/local/apache/conf/httpd.conf: API module structure `php4_module' in file /usr/local/apache/libexec/libphp4.so is garbled - perhaps this is not an Apache module DSO? ./apachectl start: httpd could not be started # # Apache/PHP4/Oracle/Easysoft/WDDX INSTALL Script # echo "Removing old installation..." rm -fR /usr/local/apache rm -fR /oz_devel/downloads/Apache/apache_1.3.12 rm -fR /oz_devel/downloads/PHP/php-4.0.0 echo "Unpacking source files..."; cd /oz_devel/downloads/Apache tar -xvzf apache_1.3.12.tar.gz cd /oz_devel/downloads/PHP tar -xvzf php-4.0.0.tar.gz echo "Setting up enviroment..." export ORACLE_SID=iwdbdev export ORACLE_BASE=/oz_devel/downloads/Oracle export ORACLE_TERM=vt100 export ORACLE_HOME=/oz_devel/downloads/Oracle export LD_LIBRARY_PATH=/oz_devel/downloads/Oracle/lib export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bi n/X11:/usr/X11R6/bin:/root/bin:/root/bin:/oz_devel/downloads/Oracle:/oz_deve l/do wnloads/Oracle/lib export INCLUDE_PATH=/oz_devel/downloads/Oracle:/usr/local/include:/usr/include export LIBS="-lpthread" export OPTIM="-g -O2" echo "Building Apache as DSO..." cd /oz_devel/downloads/Apache/apache_1.3.12 ./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max make make install echo "Building PHP/Oracle DSO..." cd /oz_devel/downloads/PHP/php-4.0.0 ./configure --with-esoob --with-config-file-path=/usr/local/apache/conf --enable-track-vars --disable-magic-quotes --nable-xml --enable-wddx --with-apxs=/usr/sbin/apxs --enable-sigchild --enable-inline-optimization --disable-pear --disable-pic make make install -----Original Message----- From: thies@digicol.de [mailto:thies@digicol.de] Sent: Monday, June 19, 2000 6:27 AM To: Martin Horak Cc: php4beta@lists.php.net; MichaelANino@netscape.net Subject: Re: [PHP4BETA] RE: PHP/Oracle Silent Apache Crash On Mon, Jun 19, 2000 at 03:21:16PM +0002, Martin Horak wrote: > Hi, > I have exactly the same problem. Did you solved it yet? > I've tried to compile with this LDFLAGS="-lpthread", but this does'n > work for me. than you're not doing it correct! in apache-1.3.12/src/Makefile add -lpthread to LIBS1 than recompile your httpd: cd apache-1.3.12 rm src/httpd make this *will* solve your problem! tc > Apache keeps silently crashing. > > I use dirty trick: > 1. Comment out > Loadmodule php4_module > Addmodule mod_php4.c > from http.conf. > 2. Start httpd (apachectl startssl). > 3. Uncomment them again and restart httpd (apachectl restart). > > Martin > > > Hi, > > I apologize for my ignorance-- I'm not much of a sysadmin type. > > Could elaborate a little further on how you would "relink" Apache > > using pthread. This is what I understand your saying: > > Establish the environment variable LDFLAGS="-lpthread" for Apache > > then I go throught configure, make and make install for Apache. > > Next, using the same enviroment, go through configure, make and > > make install for PHP as outlined in INSTALL for Quick Installation > > for DSO? > > I think what your saying is that Apache needs to be pthread because > > PHP is clntsh and linked to Oracle client libs as pthread. Correct? > > Again thank you for you're help. I'm glad this was an easy > > question. > > Sincerely, > > Michael =) > > > > -----Original Message----- > > From: Michael Nino > > Sent: Thursday, June 15, 2000 8:31 AM > > To: 'Kevin Hendrix'; Michael Nino > > Cc: 'php4beta@lists.php.net'; 'MichaelANino@netscape.net' > > Subject: RE: [PHP4BETA] PHP/Oracle Silent Apache Crash > > > > > > easy one;-) > > please relink your apache adding -lpthread to the LDFLAGS. > > > > the problem here is that a executable thats *not* linked > > agains -lpthread cannot load a shared library that is liked > > against -lpthread. (libphp4.so - linked against -lclntsh > > linked against -lpthread). > > > > this is a glibc-2.1 bug that supposed to be finxed in 2.2 (i > > heard). > > > > -----Original Message----- > > From: Kevin Hendrix [mailto:khendrix@pennypi.com] > > Sent: Thursday, June 15, 2000 6:20 AM > > To: Michael Nino > > Cc: 'php4beta@lists.php.net'; 'MichaelANino@netscape.net' > > Subject: Re: [PHP4BETA] PHP/Oracle Silent Apache Crash > > > > > > This has to do with pthreads. The Oracle libs > 8.0.5 for Linux > > use pthreads, > > so you must link your apache binary with pthread to get it to work > > properly. > > Add -lpthread to LDFLAGS and relink your apache binary. > > I struggled with this issue for a couple of weeks before Thies > > suggested this > > solution. I can't verify that it works since I use the RedHat > > prepackaged > > Secure Web Server and PHP as a .so extension, but the message > > thread sure > > died off fast when it was presented... ;) > > kevin > > -- > > Kevin Hendrix > > Programmer - PennyPI, LLC. > > khendrix@pennypi.com > > http://www.pennypi.com/ > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#16325) next »