Re: [PHP4BETA] iodbc crashing while connecting to MSSQL
| From: | Dave Goodrich | Date: | Sat, 20 May 2000 02:05:42 +0000 |
| Subject: | Re: [PHP4BETA] iodbc crashing while connecting to MSSQL | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-15278@lists.php.net to get a copy of this message | ||
This is not the top level makefile, the PHP makefile, correct?
I went to thinking (dangerous I know) and thought that this must be a issue
deep in PHP, like Zend deep. So I decided to try adding the -lc_r to the
LIBS line in the Zend makefile. It worked, here is my script.
# cd /usr/src/php-4.0.0
# ./configure\
--with-iodbc\
--with-openlink=/usr/local/openlink\
--with-apxs=/usr/local/apache/bin/apxs\
--with-ttf=/usr/local/lib\
--with-gd
# cd Zend
# vi Makefile
< changed LIBS= to LIBS=-lc_r >
# cd ../
# make
# make install
# cd ../apache-1.2.13
# cd src
# vi Makefile
< changed line 26 from EXTRALIBS= to EXTRALIBS=-lc_r
# cd ../
# make
# cp src/httpd /usr/local/apache/bin/httpd
restarted apache, and now I am executing stored procedures on MSSQL on an NT
box. Works great. I did not change anything in my top level makefile. This
may seem simple to C programmers but it wasn't to me until I thought hard
about it.
But it works, perfectly so far. It's a thing of beauty........ and stored
procedures are wicked fast, I'll never pass SQL again.
DAve.
Many thanks to Andrew at Openlink.
on 5/19/00 12:12 PM, Andrew Hill at ahill@openlinksw.com wrote:
> Dave,
>
> I have a section EXTRA_LIBS
> but also have a section titled LIBS
>
> in my php40b3 makefile.
>
> What version of php?
>
> Best regards,
> Andrew
>
>
> -----Original Message-----
> From: Dave Goodrich [mailto:daveg@rblc.com]
> Sent: Friday, May 19, 2000 2:45 PM
> To: Php4beta@Lists. Php. Net
> Subject: Re: [PHP4BETA] iodbc crashing while connecting to MSSQL
>
>
> Maybe I'm just not seeing the light here.
>
> The only place I saw that this could be added was under the EXTRA_LIBS area.
>
> LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
>
> I changed to this;
>
> LTLIBRARY_LIBADD = -lc_r $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
>
> Which causes Apache to dump core when libphp4.so is loaded. What part of
> "add -lc_r to the libs" do I not understand? I should go ahead and learn C
> shouldn't I?
>
> <sheepish>
> Help an old scripter out, can someone hold my hand here?
> </sheepish>
>
> A straight build on Slackware works, no erros and php connects to MSSQL. How
> do I get this compiled with FBSD? I don't believe there is a problem with
> pthreads on Apache 1.3.12 with FBSD 3.2 (nothing on the maillist archives
> I've seen), but until I know I have php compiled correctly with "add -lc_r
> to the libs" I can't be certain.
>
> DAve.
>
>
> on 5/19/00 7:56 AM, Andrew Hill at ahill@openlinksw.com wrote:
>
>> Dave, you should have a section of the PHP makefile that reads
>>
>> LIBS =
>>
>> just add -lc_r to whatever else is there, instead of adding it to
>>
>> PROGRAM_LDFLAGS
>>
>>
>>
>> I believe you only need to do this in the PHP Makefile.
>>
>> Best regards,
>> Andrew
>>
>> -----Original Message-----
>> From: Dave Goodrich [mailto:daveg@rblc.com]
>> Sent: Friday, May 19, 2000 10:45 AM
>> To: ahill@openlinksw.com
>> Subject: Re: [PHP4BETA] iodbc crashing while connecting to MSSQL
>>
>>
>> I'm running Apache 1.3.12 on FBSD 3.2. While I've compiled many a piece
> of
>> software, patched, diffed, and modified. Generally it's the standard
>> Makefiles I've messed with. Humor this old scripter and throw me a clue
> what
>> "add -lc_r to the libs" means.
>>
>> For PHP I added the -lc_r at this point. I haven't a clue where to modify
>> the Apache Makefile.
>>
>> PROGRAM_LDFLAGS = -lr_c -export-dynamic
>>
>> make returned this;
>>
>> libtool: link: only absolute run-paths are allowed
>> *** Error code 1
>>
>> Thanks for the handholding, I'll make it up to you with a license PO ;^)
>>
>> DAve.
>> --
>> Dave Goodrich
>> Director of Interface Development
>> Reality Based Learning Company
>> 9521 NE Willows Road, Suite 100
>> Redmond, WA 98052
>> Toll Free 1-877-869-6603 ext. 237
>> Fax (425) 558-5655
>> daveg@rblc.com
>> Web Site www.rblc.com
>>
>>
>>
>> on 5/19/00 6:19 AM, Andrew Hill at ahill@openlinksw.com wrote:
>>
>>> Dave,
>>>
>>> Check if you got a compile error regarding undefined symbol
>>> pthread_mutex_lock
>>>
>>> If you did, adding -lc_r into the libs in the makefile should allow it to
>>> compile without errors. If you still receive the error when running,
> your
>>> apache build probably doesn't have -pthread support. What version of
>> Apache
>>> are you running, as I know that -pthread support came late into the
>> FreeBSD
>>> builds.
>>>
>>> We do not have a non-multi-threaded odbc client, so you need to resolve
>> this
>>> at the apache end.
>>>
>>> Hope this helps!
>>>
>>> Best regards,
>>> Andrew
>>> ----------------------------------------------------
>>> Andrew Hill
>>> Technical Support Consultant
>>> OpenLink Software
>>> http://www.openlinksw.com
>>> Universal Database Connectivity Technology Providers
>>>
>>>
>>> -----Original Message-----
>>> From: Dave Goodrich [mailto:daveg@rblc.com]
>>> Sent: Thursday, May 18, 2000 8:04 PM
>>> To: ahill@openlinksw.com; php4beta@lists.php.net
>>> Subject: Re: [PHP4BETA] iodbc crashing while connecting to MSSQL
>>>
>>>
>>> Well, I have everything running now. The ODBC admin (web tool) can test
>>> successfully to the MSSQL DB. I recompiled PHP with openlink support and
>> it
>>> compiled cleanly and restarted.
>>>
>>> Now when I try to make a connection I get the following in my apache
>>> error_log.
>>>
>>> /usr/libexec/ld-elf.so.1: /usr/local/openlink/lib/oplodbc.so.1.0:
>> Undefined
>>> symbol "pthread_mutex_lock"
>>>
>>> I've never seen problems with posix threads on any software I've compiled
>> on
>>> FreeBSD. Is this just a lib problem? am I not linking correctly?
>>>
>>> Any help would be appreciated.
>>>
>>> DAve
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>
>>
>
>
> --
> 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
>
>