php-general Digest 5 Jan 2012 18:16:40 -0000 Issue 7636

Topics (messages 316175 through 316188):

Re: Date function kill lots time !
        316175 by: Adam Richardson
        316176 by: xucheng

Re: debugging PHP memory corruption
        316177 by: Andrew Morum

Implicit FTPS
        316178 by: Todd Nelson
        316181 by: Todd Nelson
        316182 by: Nilesh Govindarajan
        316188 by: Matijn Woudt

Printing
        316179 by: Jim Giner
        316180 by: Nilesh Govindarajan
        316183 by: Jim Giner
        316184 by: Nilesh Govindarajan
        316185 by: Nilesh Govindarajan
        316186 by: Jim Giner
        316187 by: Jim Giner

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Wed, Jan 4, 2012 at 11:07 PM, xucheng <helloworldje...@gmail.com> wrote:

> hi all,
>   I have a webapp which track visitors, and use xhprof for profiling my
> codes .
>   After reading some reports produced by xhprof, i found that function
> Date() kills most time of my app !
>   how can this happen ? Is this function has some internal issue that i
> should kown ?
>   Any comment appreciate ! thanks !
>
> --
> RTFSC - Read The F**king Source Code :)!
>


Did you set the timezone? If not, PHP raises a notice, which causes
terrible performance (see the comment at the bottom):
https://bugs.php.net/bug.php?id=39968

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
yes,it is set in php.ini .

2012/1/5 Adam Richardson <simples...@gmail.com>

> On Wed, Jan 4, 2012 at 11:07 PM, xucheng <helloworldje...@gmail.com>wrote:
>
>> hi all,
>>   I have a webapp which track visitors, and use xhprof for profiling my
>> codes .
>>   After reading some reports produced by xhprof, i found that function
>> Date() kills most time of my app !
>>   how can this happen ? Is this function has some internal issue that i
>> should kown ?
>>   Any comment appreciate ! thanks !
>>
>> --
>> RTFSC - Read The F**king Source Code :)!
>>
>
>
> Did you set the timezone? If not, PHP raises a notice, which causes
> terrible performance (see the comment at the bottom):
> https://bugs.php.net/bug.php?id=39968
>
> Adam
>
> --
> Nephtali:  A simple, flexible, fast, and security-focused PHP framework
> http://nephtaliproject.com
>



-- 
RTFSC - Read The F**king Source Code :)!

--- End Message ---
--- Begin Message ---
>Hi Andy,
>Have you tried running it with valgrind? (See [1] for tips).
>Otherwise, you might have more luck at php-internals mailing list,
>since it is related to PHP development if you intend to fix either PHP
>or the plugin.
>
>Matijn
>[1] https://bugs.php.net/bugs-getting-valgrind-log.php

Thanks Matijn,

We have tried running Valgrind against it, but there is nothing obvious
(to us at least) in the output.

I'll try the Internals mailing list.

Andy


The information contained in this email is intended for the personal and 
confidential use
of the addressee only. It may also be privileged information. If you are not 
the intended
recipient then you are hereby notified that you have received this document in 
error and
that any review, distribution or copying of this document is strictly 
prohibited. If you have
received  this communication in error, please notify Brendata immediately on:

+44 (0)1268 466100, or email 'techni...@brendata.co.uk'

Brendata (UK) Ltd
Nevendon Hall, Nevendon Road, Basildon, Essex. SS13 1BX  UK
Registered Office as above. Registered in England No. 2764339

See our current vacancies at www.brendata.co.uk

--- End Message ---
--- Begin Message ---
My apologies if I'm in the wrong place, but I'm looking to discuss having 
PHP support implicit FTPS (currently only supports explicit.)  I'd like to 
find the author(s) of the 'ftp_ssl_connect' function to discuss if this 
has already been considered and offer assistance if desired.  Thank you.


Todd Nelson

--- End Message ---
--- Begin Message ---
Thank you Nilesh, but ftp_ssl_connect is my problem!  I know what it does 
now - I'd like to extend it.  From that manual page:

     "ftp_ssl_connect() opens an explicit SSL-FTP connection to the 
specified host."


Todd


From:   Nilesh Govindarajan <cont...@nileshgr.com>
To:     Todd Nelson <tnel...@mail.unomaha.edu>
Cc:     php-gene...@lists.php.net
Date:   01/05/2012 09:06 AM
Subject:        Re: [PHP] Implicit FTPS
Sent by:        nilesh...@gmail.com



On Thu, Jan 5, 2012 at 8:31 PM, Todd Nelson <tnel...@mail.unomaha.edu> 
wrote:
> My apologies if I'm in the wrong place, but I'm looking to discuss 
having
> PHP support implicit FTPS (currently only supports explicit.)  I'd like 
to
> find the author(s) of the 'ftp_ssl_connect' function to discuss if this
> has already been considered and offer assistance if desired.  Thank you.
>
>

http://www.php.net/manual/en/function.ftp-ssl-connect.php

-- 
Nilesh Govindarajan
http://nileshgr.com


--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 8:31 PM, Todd Nelson <tnel...@mail.unomaha.edu> wrote:
> My apologies if I'm in the wrong place, but I'm looking to discuss having
> PHP support implicit FTPS (currently only supports explicit.)  I'd like to
> find the author(s) of the 'ftp_ssl_connect' function to discuss if this
> has already been considered and offer assistance if desired.  Thank you.
>
>

http://www.php.net/manual/en/function.ftp-ssl-connect.php

-- 
Nilesh Govindarajan
http://nileshgr.com

--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 4:01 PM, Todd Nelson <tnel...@mail.unomaha.edu> wrote:
> My apologies if I'm in the wrong place, but I'm looking to discuss having
> PHP support implicit FTPS (currently only supports explicit.)  I'd like to
> find the author(s) of the 'ftp_ssl_connect' function to discuss if this
> has already been considered and offer assistance if desired.  Thank you.
>
>
> Todd Nelson

Hi Todd,

There's a special mailing list for PHP development (php-internals),
that's probably a better to ask. `svn blame` on php_ftp.c shows that
Stefan Esser (ses...@php.net) has written almost all lines of
ftp_ssl_connect, so he's probably the author.

Matijn

--- End Message ---
--- Begin Message ---
My first attempt to print something to a printer.
I actually just went ahead and tried this from my website:
$hdl = printer_open();
printer_write($hdl,"This is my printed page");
printer_write($hdl,"This is line 1");
printer_write($hdl,"This is line 2");
printer_write($hdl,"This is line 3");
printer_close($hdl);


The error I got was:  Fatal error: Call to undefined function printer_open() 
in .....

Reading in the manual I find the following conflicting statements:
 1) These functions are only available under Windows 9.x, ME, NT4 and 2000. 
They have been added in PHP 4.0.4.
2) No external libraries are needed to build this extension.

3) This » PECL extension is not bundled with PHP. Windows users must enable 
php_printer.dll inside of php.ini in order to use these functions. A DLL for 
this PECL extension is currently unavailable. See also the building on 
Windows section.

********

I'm not sure what all those tidbits of information are telling me.  Are they 
outdated?  Is there some other chapter in the manual  I should read?  I only 
looked in "Printer".

FWIW - I'm running windows xp on my client.  My host runs Apache and 2.2.21 
and PHP 5.3.6.

My question is:  Is there something I (me!) have to do to get printing to 
function in my domain's PHP install?





--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 8:35 PM, Jim Giner <jim.gi...@albanyhandball.com> wrote:
> My first attempt to print something to a printer.
> I actually just went ahead and tried this from my website:
> $hdl = printer_open();
> printer_write($hdl,"This is my printed page");
> printer_write($hdl,"This is line 1");
> printer_write($hdl,"This is line 2");
> printer_write($hdl,"This is line 3");
> printer_close($hdl);
>
>
> The error I got was:  Fatal error: Call to undefined function printer_open()
> in .....
>
> Reading in the manual I find the following conflicting statements:
>  1) These functions are only available under Windows 9.x, ME, NT4 and 2000.
> They have been added in PHP 4.0.4.
> 2) No external libraries are needed to build this extension.
>
> 3) This » PECL extension is not bundled with PHP. Windows users must enable
> php_printer.dll inside of php.ini in order to use these functions. A DLL for
> this PECL extension is currently unavailable. See also the building on
> Windows section.
>
> ********
>
> I'm not sure what all those tidbits of information are telling me.  Are they
> outdated?  Is there some other chapter in the manual  I should read?  I only
> looked in "Printer".
>
> FWIW - I'm running windows xp on my client.  My host runs Apache and 2.2.21
> and PHP 5.3.6.
>
> My question is:  Is there something I (me!) have to do to get printing to
> function in my domain's PHP install?
>

It is PECL extension not bundled by default -
www.php.net/manual/en/printer.installation.php

-- 
Nilesh Govindarajan
http://nileshgr.com

--- End Message ---
--- Begin Message ---
Add extension=php_printer.dll in php.ini?

Will adding that line "install" the extension? 



--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 9:05 PM, Jim Giner <jim.gi...@albanyhandball.com> wrote:
> Add extension=php_printer.dll in php.ini?
>
> Will adding that line "install" the extension?
>
>
>

It will "enable" the extension. Install = compile + enable. It will
not work if you don't have the DLL.

-- 
Nilesh Govindarajan
http://nileshgr.com

--- End Message ---
--- Begin Message ---
On Thu, Jan 5, 2012 at 9:16 PM, Jim Giner <jim.gi...@albanyhandball.com> wrote:
> and where do I get the dll?  That was my original question.  The
> documentation didn't tell me anything other than it had to be enabled.
> ----- Original Message ----- From: "Nilesh Govindarajan"
> <cont...@nileshgr.com>
> To: "Jim Giner" <jim.gi...@albanyhandball.com>
> Cc: <php-gene...@lists.php.net>
> Sent: Thursday, January 05, 2012 10:42 AM
> Subject: Re: [PHP] Printing
>
>
>
>> On Thu, Jan 5, 2012 at 9:05 PM, Jim Giner <jim.gi...@albanyhandball.com>
>> wrote:
>>>
>>> Add extension=php_printer.dll in php.ini?
>>>
>>> Will adding that line "install" the extension?
>>>
>>>
>>>
>>
>> It will "enable" the extension. Install = compile + enable. It will
>> not work if you don't have the DLL.
>>
>> --
>> Nilesh Govindarajan
>> http://nileshgr.com
>>
>>
>
>

I can't tell you much on this, because I don't use windows. You have
to get the source at http://pecl.php.net/printer and compile it. I
don't know the procedure, etc.

-- 
Nilesh Govindarajan
http://nileshgr.com

--- End Message ---
--- Begin Message ---
"Nilesh Govindarajan" <cont...@nileshgr.com> wrote in message 
news:CAPo3nobqHPTH5V+0RqsRsQ0vDAne7V4s1Nc0dB12Gb=akws...@mail.gmail.com...
On Thu, Jan 5, 2012 at 9:16 PM, Jim Giner <jim.gi...@albanyhandball.com> 
wrote:
> and where do I get the dll? That was my original question. The
> documentation didn't tell me anything other than it had to be enabled.
> ----- Original Message ----- From: "Nilesh Govindarajan"
> <cont...@nileshgr.com>
> To: "Jim Giner" <jim.gi...@albanyhandball.com>
> Cc: <php-gene...@lists.php.net>
> Sent: Thursday, January 05, 2012 10:42 AM
> Subject: Re: [PHP] Printing
>
>
>
>> On Thu, Jan 5, 2012 at 9:05 PM, Jim Giner <jim.gi...@albanyhandball.com>
>> wrote:
>>>
>>> Add extension=php_printer.dll in php.ini?
>>>
>>> Will adding that line "install" the extension?
>>>
>>>
>>>
>>
>> It will "enable" the extension. Install = compile + enable. It will
>> not work if you don't have the DLL.
>>
>> --
>> Nilesh Govindarajan
>> http://nileshgr.com
>>
>>
>
>

I can't tell you much on this, because I don't use windows. You have
to get the source at http://pecl.php.net/printer and compile it. I
don't know the procedure, etc.

-- 
Nilesh Govindarajan
http://nileshgr.com

Now that is some new information!  Thanks for the pointer - I'll read up on 
it. 



--- End Message ---
--- Begin Message ---
>

I can't tell you much on this, because I don't use windows. You have
to get the source at http://pecl.php.net/printer and compile it. I
don't know the procedure, etc.

-- 
Nilesh Govindarajan
http://nileshgr.com

That was a short trip.  Clicked on the link for documentation and it takes 
me right back to the php manual pages that I'd already read.  Clicked on the 
link to download the latest and it's a dead link.

Does anyone print from their php websites?? 



--- End Message ---

Reply via email to