RE: [PHP] Why does this work on one server, but not another?
| From: | tedd | Date: | Fri, 24 Mar 2006 00:42:23 +0000 |
| Subject: | RE: [PHP] Why does this work on one server, but not another? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232487@lists.php.net to get a copy of this message | ||
Hi gang:
Okay, another update:
I tried all sorts of combinations of assorted functions as well as reading every source I could find. I won't bore you with the details -- but, this is as far as I've gotten.
For storing an image into MySQL I simply used:
$image_large = mysql_real_escape_string($buffer);
Then for displaying the image, I use:
if (get_magic_quotes_gpc())
{
$fileContent = stripslashes($fileContent);
}
This now works for the server that didn't work before. However, the other server now doesn't show an image unless I comment out stripslashes($fileContent) statement -- and then it works. So, I have found solutions for both servers, just not one solution that works for both servers.
Remember, both servers show "magic_quotes_gpc" as ON. The only difference I see between them is that "magic_quotes_runtime" is ON for one server and is OFF for the other -- would that make a difference?
What say you now?
tedd
--
--------------------------------------------------------------------------------
http://sperling.com