Skip to Content.
Sympa Menu

freetds - Re: [freetds] Re: MSSQL error on certain Tables [php]

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Robert Kruse <rkruse AT 2440media.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Re: MSSQL error on certain Tables [php]
  • Date: Wed, 26 May 2004 18:51:13 -0400

Hello, I was able to get cli php and gdb to work and have posted my results
for a script running a non-working table. I hope this might provide a clue.

Note: There are (2) errors that pop up "PHP Warning: Unknown(): Unable to
load dynamic library AND rld: Fatal Error: Cannot Successfully map soname"
I'm not sure why these arise, but when I test this script with a working
table, it still gives me table output.


================
CLI PHP gave me:
================

PHP Warning: Unknown(): Unable to load dynamic library
'/usr/local/apache2/modules/gettext.so' - 35406:/usr/local/php/bin/php: rld:
Fatal Error: Cannot Successfully map soname
'/usr/local/apache2/modules/gettext.so' under any of the filenames
/usr/local/apache2/modules/gettext.so in Unknown on line 0

Bus error (core dumped)


============
GDB gave me:
============

(gdb) run testcli2.php
Starting program: /usr/local/php/bin/php testcli2.php
(no debugging symbols found)...(no debugging symbols found)...PHP Warning:
Unknown(): Unable to load dynamic library
'/usr/local/apache2/modules/gettext.so' - 35390:/usr/local/php/bin/php: rld:
Fatal Error: Cannot Successfully map soname
'/usr/local/apache2/modules/gettext.so' under any of the filenames
/usr/local/apache2/modules/gettext.so in Unknown on line 0

Program received signal SIGSEGV, Segmentation fault.
0x10023d4c in zif_mssql_select_db ()
(gdb)

==========
My Script:
==========

#!/usr/local/php/bin/php -q
<?php
$dbproc = mssql_pconnect("fms:1433","username","password");
mssql_select_db ("FMS31", $dbproc) or die ("Could not select database:
".mssql_get_last_message());

if (! $dbproc) {
return;
}
$res = mssql_query("SELECT * FROM CLIENT WHERE CLIENT.CLIENT_ID =
1401",$dbproc);
if (! $res) {
return;
}
while ($arr = mssql_fetch_array($res)) {
print $arr["CLIENT_ID"] . " " . $arr["COMPANY"] . " " .
$arr["ENTRY_DATE"] . "<br>\n";
}
mssql_free_result($res);
?>


Thanks.





On 5/20/04 10:26 AM, "ZIGLIO, Frediano, VF-IT"
<Frediano.Ziglio AT vodafone.com> wrote:

> ...
>>
>> I can't seem to get a real error message. Netscape gives me a
>> pop-up "Page
>> contains no data". Safari errors, "Safari can't open the
>> page." Opera never
>> loads or errors.
>>
>> Apache gives me:
>> [Wed May 19 09:20:03 2004] [notice] child pid 1028 exit
>> signal Bus error
>> (10)
>>
>>
>>> 2. Set out to isolate the problem
>>>
>>> - Start with the single most effective step: try the same php script
>>> using the command-line cli php interpreter to get Apache out of the
>>> picture. One less variable to care about. You most likely
>> already have
>>> the cli version of php installed even if you aren't aware of it. In
>>> recent versions of PHP such as yours, it's automatically built
>>> alongside the Apache module.
>>
>> Whenever I run a php page that works fine in the browser from
>> cli php on the
>> command line it always errors "Call to undefined function:
>> mssql_connect()
>> ... Segmentation fault (core dumped)". So I haven't been successful in
>> getting cli php to work.
>>
>> Thanks for your help.
>>
>>> On the whole, I suspect a 64-bit or IRIX issue somewhere.
>>>
>
>
> Did you notice any difference from others tables? For example do they
> contain some strange data (like bigint) ?
> I don't know if there's a gdb equivalent in IRIX (there should be)
> however knowing where the program core would be very helpful..
>
> freddy77

The data types seem pretty normal (just int, varchar, text, datetime, float,
smallint). We compared the working tables and the non-working tables and
their aren't any strange data types in a non-working table that can't be
found in a working table. We also made sure that SQL7 was patched when we
discovered that it may be a float or datetime issue, but it wasn't.

We have GDB and tried running it according to the freetds userguide. But I
always get:

"Program received signal SIGSEGV, Segmentation fault.
warning: Warning: GDB can't find the start of the function at 0xacceb80."

No matter if the file is trying to query a working or non-working table.

Thanks




> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>





Archive powered by MHonArc 2.6.24.

Top of Page