RE: [PHP4BETA] RE: PHP/Oracle Silent Apache Crash
[email protected] (Michael Nino) Mon, 19 Jun 2000 12:13:54 -0700
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <48845550BDD0D211B7580008C7A42DD3131B3A26@HQEXCH1> |
------_=_NextPart_001_01BFDA22.6869949A Content-Type: text/plain; charset="iso-8859-1" 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: [email protected] [mailto:[email protected]] Sent: Monday, June 19, 2000 6:27 AM To: Martin Horak Cc: [email protected]; [email protected] 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: '[email protected]'; '[email protected]' > > 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:[email protected]] > > Sent: Thursday, June 15, 2000 6:20 AM > > To: Michael Nino > > Cc: '[email protected]'; '[email protected]' > > 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. > > [email protected] > > http://www.pennypi.com/ > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > To contact the list administrators, e-mail: [email protected] -- 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: [email protected] For additional commands, e-mail: [email protected] To contact the list administrators, e-mail: [email protected] ------_=_NextPart_001_01BFDA22.6869949A Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12"> <TITLE>RE: [PHP4BETA] RE: PHP/Oracle Silent Apache Crash</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>Actually, no I haven't. Basically, Thies has passed = on to me three individual attempts to do this:</FONT> </P> <P><FONT SIZE=3D2>[1] Export -lpthread in LDFLAGS before configuring = Apache.</FONT> <BR><FONT SIZE=3D2>[2] Add -lpthread to LIBS1 line in src/Makefile for = Apache.</FONT> <BR><FONT SIZE=3D2>[3] Export -lpthread in LIBS before configuring = Apache.</FONT> </P> <P><FONT SIZE=3D2>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=3D$ORACLE_HOME and = rebuild PHP everything is fine.</FONT></P> <P><FONT SIZE=3D2>By the way I have built "statically" Apache = + PHP + Oracle and successfully queried our Oracle Database. Works fine = as PHP binary too.</FONT></P> <BR> <P><FONT SIZE=3D2>APACHE ERROR:</FONT> </P> <P> <FONT SIZE=3D2>Syntax = error on line 243 of /usr/local/apache/conf/httpd.conf:</FONT> <BR> <FONT SIZE=3D2>API = module structure `php4_module' in file = /usr/local/apache/libexec/libphp4.so</FONT> <BR> <FONT SIZE=3D2>is = garbled - perhaps this is not an Apache module DSO?</FONT> <BR> <FONT = SIZE=3D2>./apachectl start: httpd could not be started</FONT> </P> <BR> <BR> <BR> <P><FONT SIZE=3D2>#</FONT> <BR><FONT SIZE=3D2># Apache/PHP4/Oracle/Easysoft/WDDX INSTALL = Script</FONT> <BR><FONT SIZE=3D2>#</FONT> </P> <P><FONT SIZE=3D2>echo "Removing old installation..."</FONT> <BR><FONT SIZE=3D2>rm -fR /usr/local/apache</FONT> <BR><FONT SIZE=3D2>rm -fR = /oz_devel/downloads/Apache/apache_1.3.12</FONT> <BR><FONT SIZE=3D2>rm -fR /oz_devel/downloads/PHP/php-4.0.0</FONT> </P> <P><FONT SIZE=3D2>echo "Unpacking source files...";</FONT> <BR><FONT SIZE=3D2>cd /oz_devel/downloads/Apache</FONT> <BR><FONT SIZE=3D2>tar -xvzf apache_1.3.12.tar.gz</FONT> <BR><FONT SIZE=3D2>cd /oz_devel/downloads/PHP</FONT> <BR><FONT SIZE=3D2>tar -xvzf php-4.0.0.tar.gz</FONT> </P> <P><FONT SIZE=3D2>echo "Setting up enviroment..."</FONT> <BR><FONT SIZE=3D2>export ORACLE_SID=3Diwdbdev</FONT> <BR><FONT SIZE=3D2>export = ORACLE_BASE=3D/oz_devel/downloads/Oracle</FONT> <BR><FONT SIZE=3D2>export ORACLE_TERM=3Dvt100</FONT> <BR><FONT SIZE=3D2>export = ORACLE_HOME=3D/oz_devel/downloads/Oracle</FONT> <BR><FONT SIZE=3D2>export = LD_LIBRARY_PATH=3D/oz_devel/downloads/Oracle/lib </FONT> <BR><FONT SIZE=3D2>export = PATH=3D/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr= /bi</FONT> <BR><FONT = SIZE=3D2>n/X11:/usr/X11R6/bin:/root/bin:/root/bin:/oz_devel/downloads/Or= acle:/oz_devel/do</FONT> <BR><FONT SIZE=3D2>wnloads/Oracle/lib</FONT> <BR><FONT SIZE=3D2>export = INCLUDE_PATH=3D/oz_devel/downloads/Oracle:/usr/local/include:/usr/includ= e</FONT> <BR><FONT SIZE=3D2>export LIBS=3D"-lpthread"</FONT> <BR><FONT SIZE=3D2>export OPTIM=3D"-g -O2"</FONT> </P> <P><FONT SIZE=3D2>echo "Building Apache as DSO..."</FONT> <BR><FONT SIZE=3D2>cd /oz_devel/downloads/Apache/apache_1.3.12</FONT> <BR><FONT SIZE=3D2>./configure --prefix=3D/usr/local/apache = --enable-module=3Dmost --enable-shared=3Dmax</FONT> <BR><FONT SIZE=3D2>make</FONT> <BR><FONT SIZE=3D2>make install</FONT> </P> <P><FONT SIZE=3D2>echo "Building PHP/Oracle DSO..."</FONT> <BR><FONT SIZE=3D2>cd = /oz_devel/downloads/PHP/php-4.0.0 </FONT> <BR><FONT SIZE=3D2>./configure --with-esoob = --with-config-file-path=3D/usr/local/apache/conf --enable-track-vars = --disable-magic-quotes --nable-xml --enable-wddx = --with-apxs=3D/usr/sbin/apxs --enable-sigchild = --enable-inline-optimization --disable-pear --disable-pic</FONT></P> <P><FONT SIZE=3D2>make</FONT> <BR><FONT SIZE=3D2>make install</FONT> </P> <BR> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: [email protected] [<A = HREF=3D"mailto:[email protected]">mailto:[email protected]</A>]</FONT> <BR><FONT SIZE=3D2>Sent: Monday, June 19, 2000 6:27 AM</FONT> <BR><FONT SIZE=3D2>To: Martin Horak</FONT> <BR><FONT SIZE=3D2>Cc: [email protected]; = [email protected]</FONT> <BR><FONT SIZE=3D2>Subject: Re: [PHP4BETA] RE: PHP/Oracle Silent Apache = Crash</FONT> </P> <BR> <P><FONT SIZE=3D2>On Mon, Jun 19, 2000 at 03:21:16PM +0002, Martin = Horak wrote:</FONT> <BR><FONT SIZE=3D2>> Hi,</FONT> <BR><FONT SIZE=3D2>> I have exactly the same problem. Did you solved = it yet?</FONT> <BR><FONT SIZE=3D2>> I've tried to compile with this = LDFLAGS=3D"-lpthread", but this does'n </FONT> <BR><FONT SIZE=3D2>> work for me.</FONT> </P> <P><FONT SIZE=3D2> than you're not doing it = correct!</FONT> </P> <P><FONT SIZE=3D2> in apache-1.3.12/src/Makefile add = -lpthread to LIBS1</FONT> <BR><FONT SIZE=3D2> than recompile your httpd:</FONT> </P> <P><FONT SIZE=3D2> cd apache-1.3.12</FONT> <BR><FONT SIZE=3D2> rm src/httpd</FONT> <BR><FONT SIZE=3D2> make</FONT> </P> <P><FONT SIZE=3D2> this *will* solve your = problem!</FONT> </P> <P><FONT SIZE=3D2> tc</FONT> </P> <P><FONT SIZE=3D2>> Apache keeps silently crashing.</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> I use dirty trick:</FONT> <BR><FONT SIZE=3D2>> 1. Comment out</FONT> <BR><FONT SIZE=3D2>> Loadmodule php4_module</FONT> <BR><FONT SIZE=3D2>> Addmodule mod_php4.c</FONT> <BR><FONT SIZE=3D2>> from http.conf.</FONT> <BR><FONT SIZE=3D2>> 2. Start httpd (apachectl startssl).</FONT> <BR><FONT SIZE=3D2>> 3. Uncomment them again and restart httpd = (apachectl restart).</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> Martin</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> > Hi,</FONT> <BR><FONT SIZE=3D2>> > I apologize for my ignorance-- I'm not = much of a sysadmin type.</FONT> <BR><FONT SIZE=3D2>> > Could elaborate a little further on how = you would "relink" Apache</FONT> <BR><FONT SIZE=3D2>> > using pthread. This is what I understand = your saying:</FONT> <BR><FONT SIZE=3D2>> > Establish the environment variable = LDFLAGS=3D"-lpthread" for Apache</FONT> <BR><FONT SIZE=3D2>> > then I go throught configure, make and = make install for Apache.</FONT> <BR><FONT SIZE=3D2>> > Next, using the same enviroment, go = through configure, make and</FONT> <BR><FONT SIZE=3D2>> > make install for PHP as outlined in = INSTALL for Quick Installation</FONT> <BR><FONT SIZE=3D2>> > for DSO?</FONT> <BR><FONT SIZE=3D2>> > I think what your saying is that Apache = needs to be pthread because</FONT> <BR><FONT SIZE=3D2>> > PHP is clntsh and linked to Oracle client = libs as pthread. Correct?</FONT> <BR><FONT SIZE=3D2>> > Again thank you for you're help. I'm glad = this was an easy</FONT> <BR><FONT SIZE=3D2>> > question.</FONT> <BR><FONT SIZE=3D2>> > Sincerely,</FONT> <BR><FONT SIZE=3D2>> > Michael =3D)</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > -----Original Message-----</FONT> <BR><FONT SIZE=3D2>> > From: Michael Nino </FONT> <BR><FONT SIZE=3D2>> > Sent: Thursday, June 15, 2000 8:31 = AM</FONT> <BR><FONT SIZE=3D2>> > To: 'Kevin Hendrix'; Michael Nino</FONT> <BR><FONT SIZE=3D2>> > Cc: '[email protected]'; = '[email protected]'</FONT> <BR><FONT SIZE=3D2>> > Subject: RE: [PHP4BETA] PHP/Oracle Silent = Apache Crash</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > easy one;-)</FONT> <BR><FONT SIZE=3D2>> > please relink your apache adding -lpthread = to the LDFLAGS.</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > the problem here is that a executable = thats *not* linked</FONT> <BR><FONT SIZE=3D2>> > agains -lpthread cannot load a shared = library that is liked</FONT> <BR><FONT SIZE=3D2>> > against -lpthread. (libphp4.so - linked = against -lclntsh</FONT> <BR><FONT SIZE=3D2>> > linked against -lpthread).</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > this is a glibc-2.1 bug that supposed to = be finxed in 2.2 (i</FONT> <BR><FONT SIZE=3D2>> > heard).</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > -----Original Message-----</FONT> <BR><FONT SIZE=3D2>> > From: Kevin Hendrix [<A = HREF=3D"mailto:[email protected]">mailto:[email protected]</A>]</F= ONT> <BR><FONT SIZE=3D2>> > Sent: Thursday, June 15, 2000 6:20 = AM</FONT> <BR><FONT SIZE=3D2>> > To: Michael Nino</FONT> <BR><FONT SIZE=3D2>> > Cc: '[email protected]'; = '[email protected]'</FONT> <BR><FONT SIZE=3D2>> > Subject: Re: [PHP4BETA] PHP/Oracle Silent = Apache Crash</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > This has to do with pthreads.=0E The = Oracle libs > 8.0.5 for Linux</FONT> <BR><FONT SIZE=3D2>> > use pthreads,</FONT> <BR><FONT SIZE=3D2>> > so you must link your apache binary with = pthread to get it to work</FONT> <BR><FONT SIZE=3D2>> > properly.</FONT> <BR><FONT SIZE=3D2>> > Add -lpthread to LDFLAGS and relink your = apache binary.</FONT> <BR><FONT SIZE=3D2>> > I struggled with this issue for a couple = of weeks before Thies</FONT> <BR><FONT SIZE=3D2>> > suggested this </FONT> <BR><FONT SIZE=3D2>> > solution.=0E I can't verify that it works = since I use the RedHat</FONT> <BR><FONT SIZE=3D2>> > prepackaged </FONT> <BR><FONT SIZE=3D2>> > Secure Web Server and PHP as a .so = extension, but the message</FONT> <BR><FONT SIZE=3D2>> > thread sure </FONT> <BR><FONT SIZE=3D2>> > died off fast when it was presented... = ;)</FONT> <BR><FONT SIZE=3D2>> > kevin</FONT> <BR><FONT SIZE=3D2>> > -- </FONT> <BR><FONT SIZE=3D2>> > Kevin Hendrix</FONT> <BR><FONT SIZE=3D2>> > Programmer - PennyPI, LLC.</FONT> <BR><FONT SIZE=3D2>> > [email protected]</FONT> <BR><FONT SIZE=3D2>> > <A HREF=3D"http://www.pennypi.com/" = TARGET=3D"_blank">http://www.pennypi.com/</A></FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> -- </FONT> <BR><FONT SIZE=3D2>> PHP 4.0 Beta Mailing List <<A = HREF=3D"http://www.php.net/version4/" = TARGET=3D"_blank">http://www.php.net/version4/</A>></FONT> <BR><FONT SIZE=3D2>> To unsubscribe, e-mail: = [email protected]</FONT> <BR><FONT SIZE=3D2>> For additional commands, e-mail: = [email protected]</FONT> <BR><FONT SIZE=3D2>> To contact the list administrators, e-mail: = [email protected]</FONT> </P> <P><FONT SIZE=3D2>-- </FONT> </P> <P><FONT SIZE=3D2>Thies C. = Arntzen  = ; "One Big-Mac, Small Fries and a = Coke!"</FONT> <BR><FONT SIZE=3D2>Digital = Collections &= nbsp; Phone +49 40 235350 Fax +49 40 23535180</FONT> <BR><FONT SIZE=3D2>Hammerbrookstr. = 93 &nbs= p; &nbs= p; 20097 Hamburg / Germany</FONT> </P> <P><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>PHP 4.0 Beta Mailing List <<A = HREF=3D"http://www.php.net/version4/" = TARGET=3D"_blank">http://www.php.net/version4/</A>></FONT> <BR><FONT SIZE=3D2>To unsubscribe, e-mail: = [email protected]</FONT> <BR><FONT SIZE=3D2>For additional commands, e-mail: = [email protected]</FONT> <BR><FONT SIZE=3D2>To contact the list administrators, e-mail: = [email protected]</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01BFDA22.6869949A--