php-windows Digest 23 Feb 2010 00:41:29 -0000 Issue 3765

Topics (messages 29920 through 29927):

Re: Comparing large arrays
        29920 by: Pierre Joye

Re: What about php 5.3 and printers or PHP_PRINTER.DLL ?
        29921 by: Robert
        29922 by: Pierre Joye
        29923 by: Keith Davis
        29926 by: Venkat Raman Don

Unable to load php_apc.dll on IIS6
        29924 by: Jeff
        29925 by: Jeff
        29927 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 ---
hi,

You can disable the time limit, or use a database, which may be a much
better tool for that.

Cheers,

On Mon, Feb 22, 2010 at 1:33 PM, Murray R. Summers
<msumm...@great-web-sights.com> wrote:
> I have two arrays, generated from even larger text source files (one is
> ~50K elements and the other is about 90K elements).  I need to compare the
> two, and produce a result array that contains only the elements of array 1
> that are not also in array 2.  It seems like array_diff() is exactly the
> tool needed, but it times out.  So my questions are -
>
> 1.  Should I be getting a time out with this size job (I don't have a good
> feel for this - although 5x10^9 comparisons certainly sounds like lots!)?
> 2.  Is there a better way to do this?
>
> Thanks,
>
> --
>
> Murray
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
About no chance to print on a shared printer from windows server 2008.

Please note that for some unknown reason, it is either impossible to mount a 
shared printer on windows server 2008. Maybe that errors and issues printing 
from php are connected to this issue.

The only chance we had found to print on a shared printer from windows 2008, 
is to mount the printer as local printer and as port, to give the full 
tcp/ip path + the shared name for the shared printer.

Hope this can help anybody that have the same issue.

Kind regards


""Keith Davis"" <keithda...@pridedallas.com> ha scritto nel messaggio 
news:b0baccaa54a7cc479fb67d9494fb018a8cc...@dc01.pridedallas.com...
How is that user specified?



Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre....@gmail.com]
Sent: Friday, February 05, 2010 3:26 PM
To: Keith Davis
Cc: Robert; php-wind...@lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
<keithda...@pridedallas.com> wrote:
> I found a post that said to set fastcgi.impersonate = 0 to fix this
> problem. It did.
>
> Can someone clarify what that setting does?

It allows a server to run php-cgi under a given user. But that should
not affect printer at all, except if the user does not have the
permission to use this printer.

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

This message (including any attachments) may contain confidential or 
otherwise privileged information and is intended only for the individual(s) 
to which it is addressed. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secured or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message or that arise as a result of e-mail transmission. 
If verification is required please request a hard-copy version from the 
sender.

www.pridedallas.com



--- End Message ---
--- Begin Message ---
hi,

It works just fine here, did you install the print server?

Cheers,

On Mon, Feb 22, 2010 at 3:03 PM, Robert <effe....@virgilio.it> wrote:
> About no chance to print on a shared printer from windows server 2008.
>
> Please note that for some unknown reason, it is either impossible to mount a
> shared printer on windows server 2008. Maybe that errors and issues printing
> from php are connected to this issue.
>
> The only chance we had found to print on a shared printer from windows 2008,
> is to mount the printer as local printer and as port, to give the full
> tcp/ip path + the shared name for the shared printer.
>
> Hope this can help anybody that have the same issue.
>
> Kind regards
>
>
> ""Keith Davis"" <keithda...@pridedallas.com> ha scritto nel messaggio
> news:b0baccaa54a7cc479fb67d9494fb018a8cc...@dc01.pridedallas.com...
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre....@gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-wind...@lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
> <keithda...@pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should
> not affect printer at all, except if the user does not have the
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or
> otherwise privileged information and is intended only for the individual(s)
> to which it is addressed. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and delete
> this e-mail from your system. E-mail transmission cannot be guaranteed to be
> secured or error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message or that arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version from the
> sender.
>
> www.pridedallas.com
>
>
>
> --
> 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 ---
Well, I'm on Server 2003, and I still cannot print. It only works with
impersonate turned off, and that is not a solution, as I need to connect
to remote files. 



Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre....@gmail.com] 
Sent: Monday, February 22, 2010 8:11 AM
To: Robert
Cc: php-wind...@lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

hi,

It works just fine here, did you install the print server?

Cheers,

On Mon, Feb 22, 2010 at 3:03 PM, Robert <effe....@virgilio.it> wrote:
> About no chance to print on a shared printer from windows server 2008.
>
> Please note that for some unknown reason, it is either impossible to 
> mount a shared printer on windows server 2008. Maybe that errors and 
> issues printing from php are connected to this issue.
>
> The only chance we had found to print on a shared printer from windows

> 2008, is to mount the printer as local printer and as port, to give 
> the full tcp/ip path + the shared name for the shared printer.
>
> Hope this can help anybody that have the same issue.
>
> Kind regards
>
>
> ""Keith Davis"" <keithda...@pridedallas.com> ha scritto nel messaggio 
> news:b0baccaa54a7cc479fb67d9494fb018a8cc...@dc01.pridedallas.com...
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre....@gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-wind...@lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or 
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis 
> <keithda...@pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this 
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should 
> not affect printer at all, except if the user does not have the 
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or 
> otherwise privileged information and is intended only for the 
> individual(s) to which it is addressed. If you are not the named 
> addressee you should not disseminate, distribute or copy this e-mail. 
> Please notify the sender immediately by e-mail if you have received 
> this e-mail by mistake and delete this e-mail from your system. E-mail

> transmission cannot be guaranteed to be secured or error-free as 
> information could be intercepted, corrupted, lost, destroyed, arrive 
> late or incomplete, or contain viruses. The sender therefore does not 
> accept liability for any errors or omissions in the contents of this
message or that arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version from 
> the sender.
>
> www.pridedallas.com
>
>
>
> --
> 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

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


--- End Message ---
--- Begin Message ---
Hi,

I did some test on Windows7 as well as Windows Server 2008. I used 
fastcgi.impersonate=1 in both the cases. On Windows 7 everything is fine. From 
Windows Server 2008 I am getting below error:

Fatal error: Out of memory (allocated 524288) (tried to allocate 4294967295 
bytes) in C:\inetpub\wwwroot\phptest\print.php on line 2

The test file 'print.php' is a simple PHP file where I am making one call to 
printer_open.

So went and debugged the code. In the function printer_open implementation, we 
make call to OpenPrinter and later to DocumentProperties. For some reason (I 
haven't figured it yet), OpenPrinter call is success whereas DocumentProperties 
fails and returns a negative number. Now look at the code below:

if (OpenPrinter(resource->name, &resource->handle, NULL) != 0) {
 
                resource->pi2 = (PRINTER_INFO_2 
*)emalloc(sizeof(PRINTER_INFO_2));
 
                resource->pi2->pDevMode = (DEVMODE 
*)emalloc(DocumentProperties(NULL, NULL, resource->name, NULL, NULL, 0));
 
                if (DocumentProperties(NULL, resource->handle, resource->name, 
resource->pi2->pDevMode, NULL, DM_OUT_BUFFER) == IDOK) {

Above the code tries to use Zend allocator to allocate memory assuming 
DocumentProperties returned a valid value (here the actual size). However 
DocumentProperties returned a negative value meaning failure and I believe this 
value is treated as unsigned integer leading to a huge value and thus the above 
message.

Regarding why DocumentProperties fails, I am not very sure. And this happens on 
Win2k3 too. Look at the bug reported at 
http://pecl.php.net/bugs/bug.php?id=12293 long time back.

Keith, you can try accessing the printer under a normal account and which is 
not part of administrator group and see if this helps. Ensure that the normal 
user has permission to access the printer.

Thanks,
Don.


-----Original Message-----
From: Keith Davis [mailto:keithda...@pridedallas.com] 
Sent: Monday, February 22, 2010 6:14 AM
To: Pierre Joye; Robert
Cc: php-wind...@lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?

Well, I'm on Server 2003, and I still cannot print. It only works with 
impersonate turned off, and that is not a solution, as I need to connect to 
remote files. 



Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre....@gmail.com]
Sent: Monday, February 22, 2010 8:11 AM
To: Robert
Cc: php-wind...@lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?

hi,

It works just fine here, did you install the print server?

Cheers,

On Mon, Feb 22, 2010 at 3:03 PM, Robert <effe....@virgilio.it> wrote:
> About no chance to print on a shared printer from windows server 2008.
>
> Please note that for some unknown reason, it is either impossible to 
> mount a shared printer on windows server 2008. Maybe that errors and 
> issues printing from php are connected to this issue.
>
> The only chance we had found to print on a shared printer from windows

> 2008, is to mount the printer as local printer and as port, to give 
> the full tcp/ip path + the shared name for the shared printer.
>
> Hope this can help anybody that have the same issue.
>
> Kind regards
>
>
> ""Keith Davis"" <keithda...@pridedallas.com> ha scritto nel messaggio 
> news:b0baccaa54a7cc479fb67d9494fb018a8cc...@dc01.pridedallas.com...
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre....@gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-wind...@lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or 
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis 
> <keithda...@pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this 
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should 
> not affect printer at all, except if the user does not have the 
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or 
> otherwise privileged information and is intended only for the
> individual(s) to which it is addressed. If you are not the named 
> addressee you should not disseminate, distribute or copy this e-mail.
> Please notify the sender immediately by e-mail if you have received 
> this e-mail by mistake and delete this e-mail from your system. E-mail

> transmission cannot be guaranteed to be secured or error-free as 
> information could be intercepted, corrupted, lost, destroyed, arrive 
> late or incomplete, or contain viruses. The sender therefore does not 
> accept liability for any errors or omissions in the contents of this
message or that arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version from 
> the sender.
>
> www.pridedallas.com
>
>
>
> --
> 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

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


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



--- End Message ---
--- Begin Message ---
I am unable to get APC (php_apc.dll) to load on my Windows 2003 IIS6 webserver 
running PHP Version 5.2.5, PHP running in ISAPI mode (not cgi mode).

Please advise,

Thank you


--- End Message ---
--- Begin Message ---
Jeff <jeff_j_dunlap <at> yahoo.com> writes:

> 
> I am unable to get APC (php_apc.dll) to load on my Windows 2003 IIS6 
webserver 
> running PHP Version 5.2.5, PHP running in ISAPI mode (not cgi mode).
> 
> Please advise,
> 
> Thank you
> 

Please note that I tried each of the dlls located here:

http://downloads.php.net/pierre/

And of course, I included this in the 'Windows Extension' section:

extension=php_apc.dll

and at the bottom tried different setting such as:

[APC]
apc.cache_by_default = On
apc.enable_cli = Off
apc.enabled = On
apc.file_update_protection = 2
apc.filters = 
apc.gc_ttl = 3600
apc.include_once_override = Off
apc.max_file_size = 1M
apc.num_files_hint = 1000
apc.optimization = Off
apc.report_autofilter = Off
apc.shm_segments = 1
apc.shm_size = 30
apc.slam_defense = 0
apc.stat = On
apc.ttl = 0
apc.user_entries_hint = 100
apc.user_ttl = 0
apc.write_lock = On

The problem though is that the dll does not load.


--- End Message ---
--- Begin Message ---
hi,

On Mon, Feb 22, 2010 at 10:47 PM, Jeff <jeff_j_dun...@yahoo.com> wrote:
> Jeff <jeff_j_dunlap <at> yahoo.com> writes:
>
>>
>> I am unable to get APC (php_apc.dll) to load on my Windows 2003 IIS6
> webserver
>> running PHP Version 5.2.5, PHP running in ISAPI mode (not cgi mode).

Please update to a decent PHP 5.2 version and it will work. 5.2.5
won't work with any of the binaries we provide and it is also strongly
recommended to update.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---

Reply via email to