php-windows Digest 18 May 2011 08:01:11 -0000 Issue 3949
Topics (messages 30622 through 30626):
Re: Using .Net assemblies with PHP
30622 by: Richard Quadling
30623 by: Trevor
30624 by: Pierre Joye
30625 by: Trevor
30626 by: Pierre Joye
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On 17 May 2011 18:42, Trevor <tre...@holyoak.com> wrote:
> Just in case anyone else needs to do this, I just spent a frustrating week
> figuring out how to make an assembly I created with PowerBuilder.Net work
> with PHP. The dotnet class in PHP doesn't work very well, and has apparently
> been abandoned. I ended up using this instead:
> http://universalccw.sourceforge.net/
>
> It's finally working great, and I am very happy. (The library also, of
> course, works with the regular Microsoft assemblies.)
>
> - Trevor
Hello Trevor.
It would be really useful to know what isn't working? I don't use any
.NET stuff, but I do use COM to talk to MS Word and Excel as well as
Crystal Reports (I generate reports into these different document
types all day - well, a process does).
>From memory, there is an issue if the .NET assembly has not
provided/exposed a COM layer/interface - I don't know the correct
terms, but I think this is the issue.
Regards,
Richard.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--- End Message ---
--- Begin Message ---
On 5/17/2011 1:44 PM, Richard Quadling wrote:
It would be really useful to know what isn't working? I don't use any
.NET stuff, but I do use COM to talk to MS Word and Excel as well as
Crystal Reports (I generate reports into these different document
types all day - well, a process does).
From memory, there is an issue if the .NET assembly has not
provided/exposed a COM layer/interface - I don't know the correct
terms, but I think this is the issue.
In researching to make this work, I found several bug reports filed at
php.net where things within mscorlib didn't even work (whereas other
things within the same assembly - such as the example given on the
dotnet man page - work fine), which I was able to replicate. That's what
led to my loss of confidence in the dotnet class, and to looking for
another way of doing it. (That, and a web page I found where one of the
dotnet class developers said he had completely given up on it.)
After getting my custom assembly working with the UniversalCCW library
(which provides a COM wrapper around any assembly), I tried it again
with the dotnet class. I get pretty inconsistent results - sometimes it
will return immediately, and sometimes it will sit for several minutes
before returning - if it returns at all before timing out. When I tried
the examples in the bug reports I referred to above, I got some generic
error messages back (the same ones that are in the bug reports).
- Trevor
--- End Message ---
--- Begin Message ---
hi,
Interesting but it is somehow poor in term of performance (not very
important in most cases).
As a somehow cleaner alternative (COM is such a pain), I use C++/CLI.
For example I wrote (early stage but works) an extension for the MS
Chart module, you can see it here
https://github.com/pierrejoye/php_mschart
Cheers,
On Tue, May 17, 2011 at 7:42 PM, Trevor <tre...@holyoak.com> wrote:
> Just in case anyone else needs to do this, I just spent a frustrating week
> figuring out how to make an assembly I created with PowerBuilder.Net work
> with PHP. The dotnet class in PHP doesn't work very well, and has apparently
> been abandoned. I ended up using this instead:
> http://universalccw.sourceforge.net/
>
> It's finally working great, and I am very happy. (The library also, of
> course, works with the regular Microsoft assemblies.)
>
> - Trevor
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
--- End Message ---
--- Begin Message ---
In my testing, I can load a browser page with 1,000
encryption/decryption operations in less than 2 seconds. Since I really
only need to do at most a couple at a time (which comes back instantly),
I can't really complain about the performance. And it certainly beats my
testing of dotnet (when it actually works).
I do see the advantage of how you did it, but I was looking for a more
generic solution that could be used for multiple assemblies, rather than
having to write a custom interface for each one. And, just to be clear,
I did not write the universalccw library. I actually stumbled upon it
when I was trying to figure out how to make the dotnet stuff work.
Apparently the author had similar frustrations and decided to do his own.
Anyway, I just thought I'd pass the info on in case it helps someone
else avoid the frustration that I've been going through for the last few
days. :)
- Trevor
On 5/17/2011 3:59 PM, Pierre Joye wrote:
hi,
Interesting but it is somehow poor in term of performance (not very
important in most cases).
As a somehow cleaner alternative (COM is such a pain), I use C++/CLI.
For example I wrote (early stage but works) an extension for the MS
Chart module, you can see it here
https://github.com/pierrejoye/php_mschart
Cheers,
On Tue, May 17, 2011 at 7:42 PM, Trevor<tre...@holyoak.com> wrote:
Just in case anyone else needs to do this, I just spent a frustrating week
figuring out how to make an assembly I created with PowerBuilder.Net work
with PHP. The dotnet class in PHP doesn't work very well, and has apparently
been abandoned. I ended up using this instead:
http://universalccw.sourceforge.net/
It's finally working great, and I am very happy. (The library also, of
course, works with the regular Microsoft assemblies.)
- Trevor
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Wed, May 18, 2011 at 12:34 AM, Trevor <tre...@holyoak.com> wrote:
> In my testing, I can load a browser page with 1,000 encryption/decryption
> operations in less than 2 seconds. Since I really only need to do at most a
> couple at a time (which comes back instantly), I can't really complain about
> the performance. And it certainly beats my testing of dotnet (when it
> actually works).
Btw, which encryption algorithms were you looking for? Using the
native PHP versions would be even faster and easier :)
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
--- End Message ---