Quantcast
Channel: Microsoft Drivers for PHP for SQL Server forum
Viewing all 391 articles
Browse latest View live

MVC CodeIgniter send data from model to view

$
0
0

Hello everyone! :-)

I'm working with CodeIgniter (PHP Framework MVC) and SQLSRV drivers on a WAMP environment. I have a problem when I try to send sqlsrv_fetch_array() to my view...

After installing the drivers (etc.) I had to leave the "database" configuration file included with codeIgniter and to created a new helper named "database_helper". I created this function:

function DBconnect()
	{
	$serverName = 'Server\sql';
	$connectionInfo = array('Database'=>'DBname');
	
	$conn = sqlsrv_connect( $serverName, $connectionInfo);
	return $conn;}

Then, I added a model "UsersMod". This model should let me display data from a database.

function Accounts()
{
$this->load->helper('database');
$conn = DBconnect();
$tsql=  "SELECT * FROM accounts";		

$objQuery = sqlsrv_query( $conn, $tsql );       
     
while($data = sqlsrv_fetch_array($objQuery))
        {
             $tab[] = array(
			   $data["DN"],			   
			    $data["Login"]);
        }
        return $tab;
}
// I tried to fill a table with my data...

And then I can call the UsersMod in my controller, to send the result's query to my view to display a table.

function index()
{
$this->load->helper('database');		
$this->load->model("UsersMod");
$tab["Users"] = $this->UsersMod->Accounts();
$this->load->view('GP/obsoleteAdm',$tab); 
}

But in my view, it does not understand what my data 'Users' is:

foreach($Users as $item) {
echo $tr."<td>".$item["Name"]."</td>								<td>".$item[0]."</td>							<td><input type='checkbox' onClick='php_funtion()');' name='exclude'></td>							</tr>";}

That's not a secret, PHP don't get what I'm trying to do. I am very confused with HOW to put my query result in a table without overwriting everytime the data in the "While". I think my problem comes from "How to manage the query result"...

Thank you in advance for your time!!

Please note that when I put all my code in the view, I got a great table ;-) but I can't use an 

<input type='checkbox'

like if it can't know which row is which row.

Sorry for my english... I did my best!


Asked connection sql server with php

$
0
0
Hello I have a php version 5.2.4, install and enable SQLSRV20.EXE and the library in php.ini, but not if I am allowed to connect to sql server that is on another computer, the wampserver I have it on my computer, but the sql database server is on another computer, I have installed WampServer 1.7.3, but I managed to make the connection, I have disabled the firewall on both computers, but does not connect
They know they could be!
thanks

sqlsrv_errors() function does not get all errors/warnings

$
0
0

Hi.

I´m using version 2.0  of the driver, PHP 5.2.6 version on Apache 2.2.8 version and SQL Server 2008 Standard Edition

I was testing the sqlsrv_errors() function to get the next result:

I have developed a stored procedure that outputs some messages using RAISERROR with severity = 10 and state = 1.

The application must get these warnings with sqlsrv_errors(SQLSRV_ERR_WARNINGS) and display them in the page.

Unfortunately i won´t get the results i was expected. Instead of receive all the messages i just received the first that the procedure throw.

So i decided to test with the following code:

CREATE PROCEDURE [dbo].[uspWarningsTest]
AS
BEGIN
    RAISERROR('Warning 1', 1, 1);
    RAISERROR('Warning 2', 1, 1);
    RAISERROR('Warning 3', 1, 1);
    RAISERROR('Warning 4', 1, 1);
END

When executed with SSMS the output is as follows:

Warning 1
Msg 50000, Level 1, State 1
Warning 2
Msg 50000, Level 1, State 1
Warning 3
Msg 50000, Level 1, State 1
Warning 4
Msg 50000, Level 1, State 1

Then this is the PHP code to test

sqlsrv_configure("WarningsReturnAsErrors", 0);

$conn = sqlsrv_connect("(local)");

$tsql = "{call [dbo].[uspWarningsTest]}";

$stmt = sqlsrv_query($conn, $tsql);

$warnings = sqlsrv_errors(SQLSRV_ERR_WARNINGS);

print_r($warnings);

sqlsrv_close($conn);

When i run this script the output is as follows:

Array (

            [0] => Array (

                    [0] => 42000

                    [SQLSTATE] => 42000

                    [1] => 50000

                    [code] => 50000

                    [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning 1

                    [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Warning 1

             )

)

Here the driver is getting only the first warning.

What happened to the other warnings?

I would apreciate your help with this issue.

Thanks


Uziel Bueno SQL Server MCTS

Author Missing from query and pagination incorrect

$
0
0

Hi, for the most part everything has been working wonderfully, but recently I found three issues.

Configuration:

  • IIS 7.5
  • PHP 5.3.14 VC9 x86
  • SQL Server 2008 R2 (different server)
  • SQL 2008 Native Client
  • WordPress DB Abstraction 1.1.4
  • Microsoft Drivers 2.0 for PHP for SQL server (php_sqlsrv_53_nts_vc9.dll)

Issues:

  1. inserting two backslashes (\\) in the body of a post breaks the php code which replaces ticks (`).
     - used SQL profile to see the broken query
     - not an issue for me I can work around this
     - logged here too (http://wordpress.org/support/topic/plugin-wp-db-abstraction-tick-symbol-showing-in-sql-queries)
  2. clicking on an author's name shows their posts but the title of the page says "Posts By:" with no author name after
  3. clicking on page 2 of a blog listing more than 10 posts takes me to the same exact page as page 1, pages 3 and 4 show different posts, but I'm curious if the last page is missing

Just remember, I have applied the following fix to resolve an issue where none of my posts were showing in the admin section. I'm curious if this change is causing the new issues. I will report back if this change is the cause of the pagination or author issues listed above.

UPDATE: after resetting the translations.php file to the original I get an error on the home page saying "Something is Missing" and no posts show.


Unable to load Library

$
0
0

Hi,

I've got Apache 2.2.22 with PHP 5.4.5 and want to load the "php_sqlsrv" library.

But if I start the Apache Deamon I've got an error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_sqlsrv_54_ts.dll' - Das angegebene Modul wurde nicht gefunden.\r\n in Unknown on line 0

Here the part of the php.ini file

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

extension=php_exif.dll
extension=php_gd2.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_sqlsrv_54_ts.dll
extension=php_tidy.dll

The System is running on Windows Server 2003 R2 Service Pack 2

Did someone know why I get this error?

yours sincerely

HyP3r92

PHP SQLSERVER database project every few days interface cannot access!

$
0
0
PHP SQLSERVER database project every few days interface cannot access, access interface error 502 Bad Gateway.
The start is a database connection interface can not access, a static page cannot be visited, then http://127.0.0.1:8089/status  cannot access. To view the Apache display open.
   Then restart the Apache still cannot access, but can be visited after Server restart. about two or three days, also cannot  access.
   Made several tests found that when there is a procedure frequently invoked when accessing a database will soon appear on  this problem
   Server operating system is windows2003
   Database connection using PDO, the code is as follows:

class dbUtil{

private $dbh;

function __construct() {
$this->dbh = new PDO ( DB_DSN, DB_USERNAME, DB_PASSWORD, array (PDO::SQLSRV_ATTR_DIRECT_QUERY => true,  "CharacterSet" => PDO::SQLSRV_ENCODING_SYSTEM,PDO::ATTR_TIMEOUT =>3) );
}

function __destruct() {
$this->dbh=null;
}
function queryAgent() {
$md5key=null;
$password = null;
$balance = null;
$ipflag = null;
$ip = null;
$trustflag = null;
$channel = null;
$ret = null;
$sql="{call Query_Agent(?,?,?,?,?,?,?,?,?)}";
$stmt =  $this->dbh->prepare($sql);   
$stmt->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_SYSTEM);
$stmt->bindParam(1,$agentId,PDO::PARAM_STR);
$stmt->bindParam(2,$md5key,PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT,50);
$stmt->bindParam(3,$password,PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT,40);
$stmt->bindParam(4,$balance,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,10);
$stmt->bindParam(5,$ipflag,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,10);
$stmt->bindParam(6,$ip,PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT,320);
$stmt->bindParam(7,$trustflag,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,10);
$stmt->bindParam(8,$channel,PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT,50);
$stmt->bindParam(9,$ret,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,10);
if ($stmt->execute ()) {  
return ;
} else {
$error = $stmt->errorInfo ();
Logger::getLogger('mail')->error("queryAgent($agentId)".$error[2]);
}
}
}
Call mode:
$dbUtil = new dbUtil();
$dbUtil->queryAgent();

Strange behaviour - differences between http://localhost and http://servername/ (on IIS)

$
0
0

Hello together,

the SQL Server Driver for PHP drives me crazy. I've got a Windows Server 2003 and a IIS6.0 running on it.

My Server connects to a SQL Server 2005. I've got the Native Client 2008 installed on my IIS Server. I connect to the server via sqlsrv_connect('SERVERNAME',array('DB'=>'mygreatdb'));

The code should use the worker process domain account to connect to the sql server. This works actually, but only when I'm on the IIS server via Remotedesktop and open the webpage as http://localhost/.

When I open the page on my client computer via http://servername/ I'm getting the following sqlsrv_error Array:

Array
(
  [0] => Array
    (
      [0] => 28000
      [SQLSTATE] => 28000
      [1] => 18456
      [code] => 18456
      [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
      [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    )

  [1] => Array
    (
      [0] => 28000
      [SQLSTATE] => 28000
      [1] => 18456
      [code] => 18456
      [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
      [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    )

)

I don't know why this happens. It's so strange. I tried to find a configuration tool for the native client or some configuration option in the driver for php, but I couldn't find anything.

I'd be very happy if anyone could help me somehow to fix this error.

Greetings

-Thomas

SQLSTATE[07002]: [Microsoft][SQL Server Native Client 10.0]COUNT field incorrect or syntax error

$
0
0

Hi,

The problem comes from using a placeholder multiple times in a query...

I never had this with other DB systems.

Here is an example to reproduce the error :

This code finds any reservation in conflict with (:begin,:end).

$sql="
    Select * from Reservation WHERE (
                        (Hour_Begin<=:Begin and Hour_End>=:Begin) or
                        (Hour_Begin<=:Begin and Hour_End>=:End) or
                        (Hour_Begin>=:Begin and Hour_End<=:End)or
                        (Hour_Begin<=:Begin and Hour_End>=:End)
                        )";
$db= new PDO ( "sqlsrv:server=xxx;Database=xxx","xxx","xxx", array () );
$sth=$db->prepare($sql);
$sth->bindValue(':Begin','30-07-2012 08:00');
$sth->bindValue(':End','30-07-2012 17:30');
$ex=$sth->execute();
$arr = $sth->errorInfo();
print_r($arr);
$dr=$sth->fetchAll();
var_dump($dr);
exit;


Best way to handle large result set (+400 000 rows)

$
0
0

Hi,

I started to migrate our old components from the old php_mssql.dll driver to SQLSRV 3.

I've a lot of large result set (~400 000 rows output to CSV file). With the old driver I was using the batch_size parameter of mssql_query function to improve the query speed. This procedure takes 49s with the old driver.

With the new driver, this parameter is not available anymore. I tried both PDO and non-PDO versions and here are my conclusion. The faster way to get my 400 000 rows is to prepare, execute and fetch my rows as object (using the default stdClass). It takes approximately 52 second.

Am I right ? Is there any better solution to improve speed ? is there any hidden parameter to improve speed ?  (buffer size or something else)


php no mssql. Couldn't connect sqlsrv_connect with PHP 5.4.5

$
0
0
Good morning,

I have installed Windows 2008 Server with IIS 7.5 and PHP Version 5.4.5. This compiled with VC9. On this server I have also installed Sharepoint connecting to SQL Server 2008 on another server.

I have to connect to a database on another server, which is in SQL Server 2000.

In the code I had connected with mssql in php, but I think it is no longer in use and replaced by sqlsrv.

I downloaded the dll and I put in php.ini. The extension_dir path I have it right.

For the connection does not work, the browser tells me:
"PHP Fatal error: Call to undefined function sqlsrv_connect () in ...."

What can be happening?

thanks

PDOException: SQLSTATE[IMSSP]: error occurred translating string to UCS-2, using drupal 7 at azure and sql azure backend

$
0
0

Greetings,

I recently started setting up a drupal 7 website on Azure cloud using a web role and SQL azure backend. I was very much pleased until I hit a character set brickwall.

I have a virtual machine with Windows Server 2008 R2, IIS 7.5, SQL Server 2008 R2 as a development server, trying changes before I upload them to the cloud. I have some extra tables in drupal database to support my custom module for the application. Among others, at some point I need to run some code like that:

$r = db_select('my_creators', 'c') ->fields('c') ->condition('my_url', $creator_url) ->execute() ->fetchAll(PDO::FETCH_ASSOC); $creator = $r[0]; foreach ($creator as $k => $vv) $s.= t('@key -->> @value<br>', array('@key' => $k, '@value' => $v));

print $s;

I have cut out a lot of extra code, but this is the code having the problem, when $creator_url has a value with some special character (e.g. André_Breton).

This runs perfectly on my development machine, fetching the record and displaying the data so I was very surprised when I uploaded to the cloud and got this error

PDOException: SQLSTATE[IMSSP]: An error occurred translating string for input param 7 to UCS-2: No mapping for the Unicode character exists in the target multi-byte code page. in dblog_watchdog() (line 157 ofE:\sitesroot\0\modules\dblog\dblog.module).

The underlying databases are identical, actually I data-sync the sql azure database to the development sql server database daily. All character data fields are nvarchar.

I cross-checked all versions of IIS, php, php extensions, php.ini and all are identical.

I managed to kind of work around this by adding

Database::getConnection()->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_SYSTEM);

$creator_url = iconv('UTF-8', 'UCS-2', $creator_url);

before the select, and then for the print

foreach ($creator as $k => $vv) {
    $v=iconv('ISO8859-1', 'UTF-8', $vv);

    $s.= t('@key -->> @value<br>', array('@key' => $k, '@value' => $v));
}

Using this workaround the select goes through, the correct record is selected and displayed, but then I get several warnings

  • Warning: htmlspecialchars(): Invalid multibyte sequence in argument in check_plain() (line 1572 ofE:\sitesroot\0\includes\bootstrap.inc).
  • Warning: htmlspecialchars(): Invalid multibyte sequence in argument in check_plain() (line 1572 ofE:\sitesroot\0\includes\bootstrap.inc).

which makes sense since usually drupal functions expect all strings to be UTF-8.

I am hitting my head against a wall for a couple of days now, any help will be deeply appreciated.

Thank you!


Fistix


Install SQL Server Native Client 2012 on SQL Server 2005

$
0
0

I download the drivers for SQL Server to connect with PHP form this link:

http://www.microsoft.com/en-us/download/details.aspx?id=20098

It says that I need SQL Server 2012 Native Client, so I went to this link

http://www.microsoft.com/en-us/download/details.aspx?id=16978 and download SQL Server 2012 Native Client but when I try to install it launch an error that cannot be installed because there is an older imcompatible version.

I'm confuse because the specification says that it can be installed on any version of SQL Server 2005.

I some knows the problem I'll appreciate the help.


Ernest5HN

PHP 5.4.5 on Win 2008 R2 and SQL Server 2000

$
0
0

Hi,

We are planning to move quite a bit system (about 700K lines) working on PHP 5.1.6 with Frank Kromann php_dblib.dll on Win 2000 and SQL 2000 to Win 2008 R2. Later planning to switch DB from 2000 to 2005 or 2008 (will depend on a client). Frank's dll saved us from buggy ntwdblib.dll used by PHP MSSQL driver back in 2005-2006.

My question is - PHP 5.4.5 on Win 2008 R2 and SQL Server 2000.

Will it work with SQLSRV 3.0? Will it work at all? If it is not stable please suggest what PHP, MS PHP driver combo would be the best.

Thank you

Igor


-- Partner at Deep Shift Labs. We are building Nerrvana - Selenium cloud at your fingertips and Startyco - pluggable web apps for start-ups.

HELP WITH CODEIGNITER AND SQL SERVER

$
0
0

I wanna conect to a diferents servers with a data base in sql server, and i'm trying to conect php(CodeIgniter) + (sql server 2000 and 2005) in my pc 

I'm using "CodeIgniter_2.1.0" + "SQL Server Management Studio Express 2005" (sqlsrv driver) but i can't conect I don't know If I do anythink bad, but I have 2 days trying to read a simple data but I can't help please I want you to give me somes advices to start again all, from installing 

I tried using scaffolding and Iscaffold and nothing :(

I update this >>>> ntwdblib.dll and nothing T_T 

PD: I download "Microsoft Drivers 3.0 for PHP for SQL Server" install (copy to the php/ext) edit the php ini do all configuration  and then try to conect but nothing :( 

SOME HELP PLEASE.


SQL Server Connection timing out

$
0
0

Just installed PHP/IIS on a fresh 2008 server installation.  However, I'm having trouble connecting to my SQL2005 database server.  I have good connectivity, and can connect via the Management Studio.  Substituting the IP address for the hostname has no effect.

This is the error I get:

 

Unable to connect.
Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [2]. [message] => [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [2]. ) [1] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired [message] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [message] => [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. ) )

 

 

 

My code is as follows:

 

 

 

<html><body>

<?php
$server = "dbserver"

;
echo $server;
$connectionInfo = array("Database"
=>"database"
,"UID"
=>"sa"
,"PWD"
=>"dbpassword"
);

/* Connect using SQL Server Authentication. */


$conn = sqlsrv_connect( $serverName, $connectionInfo);
if

( $conn === false

 )
{
     echo "Unable to connect.</br>"

;
     die( print_r( sqlsrv_errors(), true

));
}

sqlsrv_close( $conn);
?>

</body></html>

 

 

Any help?  I'm genuinely stumped.


sqlsrv_errors contain invalid type -> Using PHP custom session handling

$
0
0
Hi.

PHP spits out this if I try to connect to a SQL Server 2005 server in session handling functions:
PHP Fatal error: sqlsrv_errors contains an invalid type in (path)/session.php on line 29

Line 29 is wherre sqlsrv_connect is

When I use that OUTSIDE the session handling functions, it works fine, there are no problems what so ever.

Code to reproduce the problem:
function sess_open($save_path, $session_name)
{
return true;
}

function sess_close()
{
return true;
}

function sess_read($id)
{
return '';
}

function sess_write($id, $sess_data)
{ 
$connectionInfo = array( 
"UID"=>"MyUser",
"PWD"=>"MyPassword",
"Database"=>"MyDB" 
);

$conn = sqlsrv_connect("mySQLServer", $connectionInfo);

sqlsrv_query($conn,"SELECT 1 FROM sessions");

return true;
}

function sess_destroy($id)
{
return true;
}

function sess_gc($maxlifetime)
{
return true;
}

session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy', 'sess_gc');
session_start();

Instal PHP 5.4.6 on IIS 7 to work with MS SQL 2008

$
0
0

Many people are asking here for a help how to install this combination. As an appreciation for a help I received in this forum I decided to describe our way and I hope it will help others.

Additional twist is a use of ADODB (http://adodb.sourceforge.net/) with 'mssqlnative' driver which uses new MS SQL PHP driver to connect to database.

Instal PHP 5.4.6 on IIS 7 to work with MS SQL 2008

Regards,

Igor


-- Partner at Deep Shift Labs. We are building Nerrvana - Selenium cloud at your fingertips and Startyco - pluggable web apps for start-ups.



recuperando parametros OUT

$
0
0

hola estoy usando el driver de microsof  en codeignaiter y no puedo recuperar el valor del parametro de salida

$error = "hola";
        $query = $this->db->query("USP_CODEIGNITER_DEMO ?,?,?", array(
            $nAreId,
            $cAreDescripcion,
            $error
                ));
        
        return $error;
CREATE PROCEDURE [dbo].[USP_CODEIGNITER_DEMO]         
	@nAreId INT,
	@cAreDescripcion VARCHAR(100),
	@error VARCHAR(100) OUTPUT         
AS        
BEGIN TRANSACTION           
	BEGIN TRY 
		BEGIN 		         
			UPDATE AREA SET cAreDescripcion=@cAreDescripcion WHERE nAreId=@nAreId          
		END
	           
		SET @error ='exito'          
		COMMIT TRANSACTION          
	END TRY          

BEGIN CATCH          
	ROLLBACK TRANSACTION          
	SET @error =ERROR_MESSAGE()          
END CATCH

la operacion se realiza con exito pero cuando imprimo la variable '$error' me sale el valor por defecto 'hola' y no lo que recupero de la BD


desarrollador .NET

An invalid parameter was passed to sqlsrv_query

$
0
0

Hi all,

I have installed php 5.3.13 on a Web Role (windows Azure) and it uses sql azure as database. Following is my code:

dbConnectDB.php
---------------------------

$uid = myid@myserver;
$pwd
= "mypassword";
$dbname = "mydbname";
$serverName = "tcp:myserver.database.windows.net,1433";

$connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database" => $dbname);
$conn = sqlsrv_connect($serverName, $connectionInfo);
if($conn == false){
     FatalError("Failed to connect...");
}

it seems that $conn is not false.

index.php
---------------------------
include_once 'dbConnectDB.php';
include_once 'session.php';
$login_query = "SELECT * FROM admins WHERE username = ? and password = ?"; 
 $params = array("theUsername", "thepassword");
 $login_result = sqlsrv_query($conn, $login_query,  $params);

 if ($login_result == false){
  die( print_r( sqlsrv_errors(), true));
 }
 
 $login_object = sqlsrv_fetch_object( $login_result);

Here everything works fine and I can fetch the resultset.
but If I execute same query in session.php it generates:
"An invalid parameter was passed to sqlsrv_query"
as you see on the top of index.php I have inclueded both dbConnectDB.php and session.php so it should work
in session.php as well.
Thanks for your advice.

Couldn't connect sqlsrv_connect with PHP 5.4.4

$
0
0

Hi,


I'm trying to configure the SQL Server driver to run on PHP 5.4.4, I downloaded the package Drivers 3.0 (my SQL Server is 2008).

I set up Apache and PHP.ini started properly, without generating any error, I set the sqlsrv_54_ts as an extension, but in my server when I try to make the connection to the database, nothing happens.

On another computer with version 5.3 of php, the connection string works, but in this server with version 5.4, no failures in the function was informed, but does not connect to the database.

Someone tell me what might be happening?
Viewing all 391 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>