In Progress

PHP Error after starting and stopping sql server

I have an intranet using php 5.3.8 on Server 2003 using IIS 6.0 and SQL 2005.

I run a command to call a batch file that starts and stops sql server and then calls a stored procedure to delete records from a table Items and then refreshes the records from the MAS90. I need to stop and start because the connection to a MAS90 system occasionally fails.

When the refresh is complete, when I go to any of the pages that connect to the database, I get the errors like what is in the code box below. If I go from the [url removed, login to view] page to the [url removed, login to view] to and back to [url removed, login to view] the values come up without errors.

I can also F5 three times (depending on the page) to get the page to refresh properly.

is there another way to do this. Javascript...Page Refresh code...Magic

Some of the page errors are:

Error in query preparation/execution. Array ( [0] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 233 [code] => 233 [2] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: No process is on the other end of the pipe. [message] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: No process is on the other end of the pipe. ) [1] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 233 [code] => 233 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) )

---------------

Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in C:\Inetpub\wwwroot\queries\[url removed, login to view] on line 13 Error in query preparation/execution. qry_recipeList_count

SELECT TOP 100 PERCENT Count(dbo.recipes.recipe_id) AS NbrOfRecipes FROM [url removed, login to view] LEFT OUTER JOIN [url removed, login to view] ON dbo.recipes.recipe_code = dbo.items.item_code AND dbo.recipes.recipe_company_code = dbo.items.item_company_code WHERE recipe_company_code = 'GAM' AND (dbo.items.item_prod_type = 'F')

Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -14 [code] => -14 [2] => An invalid parameter was passed to sqlsrv_fetch_array. [message] => An invalid parameter was passed to sqlsrv_fetch_array. ) )

---------------

Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in C:\Inetpub\wwwroot\queries\[url removed, login to view] on line 13 Error in query preparation/execution. qry_recipeList_count

SELECT TOP 100 PERCENT Count(dbo.recipes.recipe_id) AS NbrOfRecipes FROM [url removed, login to view] LEFT OUTER JOIN [url removed, login to view] ON dbo.recipes.recipe_code = dbo.items.item_code AND dbo.recipes.recipe_company_code = dbo.items.item_company_code WHERE recipe_company_code = 'GAM' AND (dbo.items.item_prod_type = 'F')

Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -14 [code] => -14 [2] => An invalid parameter was passed to sqlsrv_fetch_array. [message] => An invalid parameter was passed to sqlsrv_fetch_array. ) )

----------------

Error in query preparation/execution.

SELECT Count(wo_id) AS NbrOfWorkOrders FROM [url removed, login to view] RIGHT OUTER JOIN [url removed, login to view] ON dbo.items.item_code = dbo.recipes.recipe_code AND dbo.items.item_company_code = dbo.recipes.recipe_company_code RIGHT OUTER JOIN [url removed, login to view] ON dbo.recipes.recipe_code = dbo.workorders.wo_recipe_code WHERE dbo.workorders.wo_company_code = 'GAM' AND (month(wo_date_started) = '10' AND year(wo_date_started) = '2011' or wo_date_started is null)

Array ( [0] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 233 [code] => 233 [2] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: No process is on the other end of the pipe. [message] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: No process is on the other end of the pipe. ) [1] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 233 [code] => 233 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) )

Skills: PHP, SQL

See more: sqlstate 08s01 code 233, top query, execution table, 233, message error, error 0, php 5, sql queries, sql microsoft, sql code, server 2003, pipe, php command, microsoft sql server, gam, database microsoft sql, boolean, after 8, php connection, sql javascript, php file array, pipe error, php sql code, php connection select, microsoft query top

About the Employer:
( 3 reviews ) Brookfield, United States

Project ID: #1264441

Awarded to:

dracco

hello, I can fix that for you. I have a lot of experience in php as you can see in my reviews and I'm ready to start right away. Best regards.

$70 USD in 0 days
(127 Reviews)
5.8

2 freelancers are bidding on average $45 for this job

uniquecode1

Please see PMB for right solution.

$40 USD in 5 days
(3 Reviews)
3.1
programer22

Hi it could be solved probably your php script conection use some as permanent conection I will check code and fix (this might be a bit more expensive since I need to change any page that use data base) or I have added More

$50 USD in 3 days
(3 Reviews)
1.0