PHP slow execution time

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jan 1, 2013
Messages
5
Reaction score
0
Hi there, my problem is the ODC_connection() function on php. The problem is, when using ODBC_connection, the answer from the server is strangly very slow. I tryed many other PHP versions, it didn't change anything. When i remove the ODBC_connection() from the configuration file, the load time is much faster, just like anyother site, but with a lot of mssql errors.

Specs:
OS: Windows Server 2012
Webserver: IIS8
PHP: 5.3.19
RAM: 4GB

Any help?
Thanks.
 
Tip dont use ODBC_conncetions or make it so that it will use less resource.

Example making connection without ODBC

$host = 'pc\SQLSERVER';
$user = 'sa';
$pass = 'Your password';

$mssql_con = mssql_connect($host, $user, $pass);
if(!mssql_con)
{
echo 'Cant connect to the server!';
}
else
{
function database($data)
{
$select_db = mssql_select_db($data);
if(!$select_db)
{
echo 'There is an problem with connection to the database';
echo mssql_get_last_message();
}
return $data;
}
}
 
Tip dont use ODBC_conncetions or make it so that it will use less resource.

Example making connection without ODBC

$host = 'pc\SQLSERVER';
$user = 'sa';
$pass = 'Your password';

$mssql_con = mssql_connect($host, $user, $pass);
if(!mssql_con)
{
echo 'Cant connect to the server!';
}
else
{
function database($data)
{
$select_db = mssql_select_db($data);
if(!$select_db)
{
echo 'There is an problem with connection to the database';
echo mssql_get_last_message();
}
return $data;
}
}

The website is working with odbc, and i have no time to recode it in mssql. Before i update to windows server 2012, and it working without problems.
 
Thats also what i was saying.

Most websites the are released here are terrible scripted with the use of odbc.
So just make it so that the odbc connections are setup correctly.

and the slowing down could be an indication that something else is wrong with the update to windows server 2012.
Well i am running 2012 to and i am not having any slow down.

So check your configurations and find the bottleneck.
 
Thats also what i was saying.

Most websites the are released here are terrible scripted with the use of odbc.
So just make it so that the odbc connections are setup correctly.

and the slowing down could be an indication that something else is wrong with the update to windows server 2012.
Well i am running 2012 to and i am not having any slow down.

So check your configurations and find the bottleneck.

I have double checked everything, and i have the same problem on my computer. Windows 7 x64
 
if both are having the same problems then something in your webserver files aint good.

So please check them to find where the bottleneck is.
As i said, the web files were working smoothly on ISS7 with Windows Server 2008 R2
I'm sure that it's a problem from the PHP version.
 
Status
Not open for further replies.
Back