[PHP] COM objects

2004-01-27 Thread C C
Hi,

I am running PHP 4.3.4 on Windows 2000 server with
Apache 2.0.48. I am using COM objects in some of the
pages. My question is, how do I release them when I'm
done? Right now, I'm unsetting them, but after a few
days I get COM+ Errors in the Event Viewer:

The COM+ Services DLL (comsvcs.dll) was unable to load
because allocation of thread local storage failed. 

Process Name: Apache.exe
Error Code = 0x80070008 : Not enough storage is
available to process this command.
COM+ Services Internals Information:
File: .\comsvcs.cpp, Line: 289

Anyone have any suggestions? Thanks,

CC

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] odbc functions - not binary safe?

2004-01-26 Thread C C
Hi,

I'm trying to insert binary data into a MS SQL Server
database. Text files are added fine, but binary files
with null bytes are not. The field I'm adding the
binary data to is image type. I get an error about
unclosed quotation marks at the null byte, but I've
replaced ' with ''.

I tried escaping the null byte with a backslach, but
it just changes it to the string \0 when I download
it.

Anyone have any ideas about this?

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] binary POST data

2004-01-23 Thread C C
Hello,
 
I am trying to process POST data sent from a device. Here is a capture of what is 
being sent from the device (with the file data replaced by File Contents):
 
 
POST file.php HTTP/1.1
Host: ---.---.---.---
Connection: Keep-Alive
Content-Type: multipart/form-data; boundary=BC368B1E
Content-Length: 4841
--BC368B1E
Content-Disposition: form-data; name=ID
50
--BC368B1E
Content-Disposition: form-data; name=FName
File.doc
--BC368B1E
Content-Disposition: form-data; name=FileLength
4096
--BC368B1E
Content-Disposition: form-data; name=FileData
File Contents
BC368B1E--
 
 
 

The FileData contains the contents of a file being sent to the script. It works for 
sending text files, but when sending binary files, it stops at the first null byte. I 
tried parsing it using php://input and $HTTP_RAW_POST_DATA 
(always_populate_raw_post_data is On in php.ini), but neither of these are set. Is it 
possible to get the contents of binary files POSTed this way in PHP? I can't change 
how the data is sent from the device. Our ASP page is able to do this with the same 
POST.

Also, inserting binary data using odbc into a MS SQL Server database fails if the data 
has null bytes. We are using Apache + PHP on Windows.

Thanks,

CC



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!