0

Good day.

We have IIS7 and Windows Server 2008 R2

When we use php script in server we get error:

Error in query mainres enterres preparation/execution. 

Array ( 
    [0] => Array ( 
            [0] => 08S01 [SQLSTATE] => 08S01 
            [1] => 258 [code] => 258 
            [2] => [Microsoft][SQL Server Native Client 11.0]Shared Memory Provider: Timeout error [258]. [message] => [Microsoft][SQL Server Native Client 11.0]Shared Memory Provider: Timeout error [258]. 
            ) 
    [1] => Array ( 
            [0] => 08S01 [SQLSTATE] => 08S01 
            [1] => 258 [code] => 258 [2] => [Microsoft][SQL Server Native Client 11.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 11.0]Communication link failure 
            ) 
    [2] => Array ( 
            [0] => 08S01 [SQLSTATE] => 08S01 
            [1] => -2147467259 [code] => -2147467259 
            [2] => [Microsoft][SQL Server Native Client 11.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 11.0]Communication link failure 
            ) 
    )

As we can see Shared Memory Provider: Timeout error

Tell me please how to increase the time before timeout error ?

2 Answers2

1

This error may be related to the setting in your php.ini configuration file.

Search for the following items and change (INCREASE) their values, for example:

max_execution_time = 600  
max_input_time = 600
default_socket_timeout = 60

And, if you use MSSQL Server:

mssql.connect_timeout = 60
mssql.timeout = 60

If you use MySQL server:

mysql.connect_timeout = 60
Bud Damyanov
  • 30,171
  • 6
  • 44
  • 52
  • it not work. i have timeout after 2 minutes... where can be problem? –  Mar 26 '14 at 09:21
0

php.ini:

max_execution_time = 300
max_input_time = 300
default_socket_timeout = 300

MSSQL Server:

mssql.connect_timeout = 300
mssql.timeout = 300

IIS7:

enter image description here

P.S.: config php.ini also you can change in manager iis7

Leo Loki
  • 2,457
  • 6
  • 24
  • 29