visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MS SQL Server :: problems accessing SQL-Server from PHP on a Debian box


By: Bernard France  Date: 05/04/2005 09:03:53  English  Points: 50 Status: Answered
Quality : Excellent
Hello,

I can connect to an SQL-Server "instance" with no problem, using mssql_connect() and the like, but each time I try to issue a simple query (SELECT...), I keep on getting browser errors like "this page could not be found"...

When I stop the script before the query, I get correct output, so how can a script be "there" and "not there" at the same time ?!?? Is this an Apache bug ?

I'm using freeTDS on this Debian linux machine.

When I use the same set of scripts from a Windows box - using the provided lib_mssql.dll - , it works fine, and there is no IP connectivity/firewalling issue - as I can connect, obviously -

Any ideas what's going wrong ?
By: VGR Date: 06/04/2005 08:53:21 English  Type : Comment
I searched a bit and I found some tracks to follow :

http://bugs.php.net/bug.php?id=12250

http://lists.ibiblio.org/pipermail/freetds/2002q2/006803.html

http://www.imdat.de/php/sybase_php_freetds_bug.txt

By: VGR Date: 06/04/2005 08:58:14 English  Type : Answer
in a word as in one hundred :

1) install the latest FreeTDS 0.61 from SOURCE, compile with --enable-msdblib
2) configure the PHP SAPI module with :
./configure --with-openssl --with-gd --with-oci8=/home/finance/Oracle --with-mssql --with-mysql --disable-cgi --with-apxs=/usr/local/apache/bin/apxs --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/lib (this is an example, use phpinfo() to get your current config ;-)

so you should add --enable-debug at the end, and why not also something like --with-mssql=/usr/local/freetds depending on where will be the freeTDS library after compiling.

3) install or check that you have gdb

4) run your crashing PHP script in CLI mode (using the php executable)

5) follow instructions about analysing your "core dump"

Do register to be able to answer

EContact
browser fav
page generated in 338.500980 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page