Jump to content

djclaux

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

djclaux's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. check if you have the latest version of the ntwdblib.dll library (2000.80.194.0) i have some ms sql connections problems that i solved with this! download the library here (http://www.dlldll.com/ntwdblib.dll_download.html)
  2. Problem solved! I upgrade the ntwdblib.dll lib (http://www.dlldll.com/ntwdblib.dll_download.html) to the 2000.80.194.0 version and it starts to work fine thanks
  3. Yes the ini file is the same. I try with connect and pconnect. I also try php.exe and php-win.exe e non works
  4. Hi everybody, I am migranting a website from php4/Win 2000 Server to php5/Win 2003 Server. Using the IIS as webserver. The website has 2 parts: 1) Some feeding and cleaning database processes that are scheduled to run using the schedule task tool. For this i use the php-cgi.exe executable with the -f option (filepath). 2) The admistrative and user interface (Normal website) working in IIS 6.0. Both parts share alot of classes and code functions and variable initializations. But i have notice that some tasks stop working in PHP5. After some debbuging i found the problema was related to the MS SQL connection: The mssql_connection() code get allways a can't connect to the database error when running as a task but works fine when executing in a browser context (IIS). To test this i have done a small program that get completly diferent results when running as a task or as a php webpage: if ($con = mssql_pconnect("SERVER","USER","PASSWORD")){ print("YES");} else{ print("NO")} Outputs "YES" in the browser but a "Warning: mssql_pconnect(): Unable to connect to server: SERVER in PATH_TO_SCRIPT on line codeline" in the task The connection strings are 100% correct. More interesting is that i have found that if i use the odbc_connect() function it works just fine for both task and browser: if ($con = odbc_connect("Driver={SQL Server};Server=SERVER;Database=DB;","USER","PASSOWORD")){ print("YES");} else{ print("NO")} => Works allways well!!! The problem is that tasks and website share alot of code, and changing from mssql_connect to odbc_connect is not something to do ligthly. Question: Why the mssql_connect stopped to work? Does anyone get this type of problem? What could be the problem? Some help appreciatted! My configuration Info: PHP-5.2.9-2 MS SQL SERVER SQL Server Enterprise Edition 8.00.2184(SP4) Microsoft Windows NT - 5.0(2195) Windows Server: MS Windows Server 2003 R2 SP2 php.ini [MSSQL] mssql.allow_persistent = On mssql.max_persistent = -1 mssql.max_links = -1 mssql.min_error_severity = 10 mssql.min_message_severity = 10 mssql.compatability_mode = Off thanks for your help, and sorry if my english are not mutch of a perfection... Claudio
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.