named pipes, TCP/IP, and insert problem
| From: | Digital Hit Entertainment | Date: | Sun, 13 Aug 2000 04:34:21 +0000 |
| Subject: | named pipes, TCP/IP, and insert problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2002@lists.php.net to get a copy of this message | ||
Host's setup:
PHP Version 3.0.6, IIS4, NT4, ODBC connection to an MS SQL 7 database --
we have no access to php.ini
Our site's database insert form was working fine and despite our
inability to access the php.ini to make changes to magic quotes for
better MS SQL integration, we were able to insert stuff like <a
href="page.html">page<a/> and words with apostrophes by using the
following two lines:
$sql = str_replace("\'","''",$sql);
$sql = stripslashes($sql);
That kludge was able to get us around the way our host has the php.ini
set and we were able to insert news stories with links into our database
just fine for over a month.
Our host started having some problems with the connection to the SQL
Server machine and we weren't able to submit stories but got nice error
messages that were helpful. The techs restarted our connection to the
SQL Server, but changed the connection method from named pipes to
TCP/IP. Suddenly we couldn't submit stories and not only didn't we get
error messages, but the submit form wouldn't reload, it would just come
back blank.
This has befuddled them for a week. I finally went in and tested every
type of story submission and realized it only happened when there was a
link in the story.
Okay, so the above serves as a possible solution if any of you ever face
this. My question is this: Does the changing of the connection from
named pipes to TCP/IP have any affect on what SQL Server 7 expects from
PHP's handling of double quotations?
--
Ian Evans