Skip to Content.
Sympa Menu

freetds - Re: [freetds] Fwd: connect to SQL server 2005

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jwan AT ea.ucla.edu
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Fwd: connect to SQL server 2005
  • Date: Tue, 25 May 2010 11:19:53 -0700

Thanks. My freetds does installed at different path with PHP.

I somehow play with the mbstring and do this, export USE_ZEND_ALLOC=0
make it work from my terminal running
php odbctest.php and retrieve data fine. however, it still did not
run on the browser, guess I need to put the above variable in the
server?

another question is, I can read data fine from the table, but return
zero rows from the stored procedure, even though the same sql
statement return rows from the isql and tsql etc.

below are the code
1) read from table, fine
$query = "select * from sys.objects where name like 'test%' and type='p'";
$result = odbc_exec($connect, $query) or die ("can not query");

2) read from stored procedure, return zero rows?
$query = "execute getClasses '10S'";
$result = odbc_exec($connect, $query) or die("can not execute");

sorry, our server did not installed the mssql, I kind of stuck here.

Thanks




On Sat, May 22, 2010 at 6:14 PM, Robert Gonzalez
<robert AT robert-gonzalez.com> wrote:
> Have you considered building the mssql extension and using that instead of
> ODBC? Aside from that, are your environment vars set properly? One of the
> things that had tripped me up in the past was an environment variable called
> FREETDSCONF that was not set but was expected by PHP. When it didn't find it
> PHP gave its best shot at finding but the PHP path that is checked is not
> the same as the installation path of FreeTDS so I was getting a crapped out
> connection.
>
> On Wed, May 19, 2010 at 9:29 PM, <jwan AT ea.ucla.edu> wrote:
>
>> Hi,
>>
>> SQL Server version : SQL 2005
>> FreeTDS version (or snapshot date, if not a release) : freetds-0.82
>> which client library you are using : unixODBC (libtdsodbc.so)
>> what language or Perl module, as appropriate, you're using : php (
>> built in odbc module)
>> your client OS and hardware architecture (red hat x64)
>>
>> I can connect through isql and tsql fine.  but having trouble when
>> connect using php.  I have made sure that I set the mbstring in
>> php.ini correctly to take UTF-8. but looks like the 4th
>> tds_process_tokens()   get halt in the middle the process and did not
>> receive the packet I should receive and when I run the php script, it
>> gets "segmentation fault"
>>
>> can someone help please?
>>
>> Thanks
>>
>> Jun
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
>
>
> --
> Robert Gonzalez
> http://www.robert-gonzalez.com
> http://twitter.com/RobertGonzalez
> http://www.linkedin.com/in/robertanthonygonzalez
> _______________________________________________
> 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