php-general Digest 3 Apr 2008 07:20:47 -0000 Issue 5383

Topics (messages 272457 through 272473):

Re: autoload with namespace
        272457 by: Ryan Panning
        272458 by: Colin Guthrie
        272459 by: Colin Guthrie
        272462 by: Ryan Panning
        272470 by: Larry Garfield

Memory usage very high under AMD64?
        272460 by: Ed W
        272461 by: Robert Cummings
        272463 by: Ed W

php + copy file
        272464 by: Emiliano Boragina
        272467 by: Chris

Get Free Information for Top twenty (20) online colleges and universities
        272465 by: steve_carpenter
        272466 by: admin.buskirkgraphics.com

PAM Authentication
        272468 by: Kyle Baczynski

pecl/PAM
        272469 by: Kyle Baczynski

Reading an xml file from a POST array
        272471 by: Michael Horowitz
        272473 by: Ilya Dyoshin

Re: MensHealth 12916
        272472 by: php-general.lists.php.net

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Richard Heyes wrote:
err-um sorry for the noise; actually the namespaces work w/ functions as well.

So not OO specific? Is there anything I can read that describes them?

Yes, it's on the docs site. Although this continues to change as I believe brackets {} are now the declaration method (but hasn't been implemented yet).

http://docs.php.net/manual/en/language.namespaces.php

--- End Message ---
--- Begin Message ---
Ryan Panning wrote:
> Jochem Maas wrote:
>> essentially it boils down to replacing '::' with '/' to determine the
>> path
>> from the namespace in your case - that is easy enough, your still
>> stuck with
>> finding out whether your being asked to load a namespace, class, or
>> function
>> (do namespaced functions even trigger an autoload, if not that
>> obviously makes
>> things simpler. maybe the autoloader can just match the path as deep
>> it can and
>> then load every file inside the determine path. e.g:
> 
> From my testing I've found the autoload function is called for any
> namespace related call, functions and constants.
> 
> Your idea for replacing '::' with '/' is good but I'd think it'll
> interfere with the arithmetic operator '/'. I'm sure they must have
> discussed such options.

He didn't mean doing that in the code syntax, just in the autoload
function to convert it to a filename :)

> Is this something I should bring up on the internals? I think it is an
> issue, autoload not being able to know if it's class or namespace related.
> 
> However, I think the call for namespace functions and constants is good,
> just need to know it's for namespaces... Gives you the opportunity to
> load the missing files.


If you look in the list archives there is a very thorough and detailed
writeup from Martin Alterisio just after xmas on this topic:

http://marc.info/?l=php-internals&m=119864555003877&w=2

This will perhaps make you think about discussing on internals.

Col


--- End Message ---
--- Begin Message ---
Ryan Panning wrote:
> Richard Heyes wrote:
>>> err-um sorry for the noise; actually the namespaces work w/ functions
>>> as well.
>>
>> So not OO specific? Is there anything I can read that describes them?
>>
> Yes, it's on the docs site. Although this continues to change as I
> believe brackets {} are now the declaration method (but hasn't been
> implemented yet).
> 
> http://docs.php.net/manual/en/language.namespaces.php

Also:

http://php.net/language.namespaces.rules is useful.

Col


--- End Message ---
--- Begin Message ---
Colin Guthrie wrote:
Ryan Panning wrote:
Your idea for replacing '::' with '/' is good but I'd think it'll
interfere with the arithmetic operator '/'. I'm sure they must have
discussed such options.

He didn't mean doing that in the code syntax, just in the autoload
function to convert it to a filename :)

Is this something I should bring up on the internals? I think it is an
issue, autoload not being able to know if it's class or namespace related.

However, I think the call for namespace functions and constants is good,
just need to know it's for namespaces... Gives you the opportunity to
load the missing files.


If you look in the list archives there is a very thorough and detailed
writeup from Martin Alterisio just after xmas on this topic:

http://marc.info/?l=php-internals&m=119864555003877&w=2

This will perhaps make you think about discussing on internals.

Col


I read too fast I guess. :) Did they ever talk about a different delimiter?

Now that you bring up that internals post, I remember when that was brought up. It talks about autoload rules issues and possible enhancements. But not about the issue of determining the namespace call vs class call.

I just think if I post it to the internals they'll just brush it off as something that I need to worry about. Rather than really thinking about issue and solutions, such as a different delimiter.
--- End Message ---
--- Begin Message ---
On Wednesday 02 April 2008, Jochem Maas wrote:

> > there is one curiosity / caveat underlying the 5.3 implementation...  so
> > does the namespace get supplied to the autoload function as well as the
> > class name?  is it just one big string or are they separate?
>
> one big string. how does php know before hand whether foo::get() is a
> namespaced function call or a static class method call?

I believe the decision from -internals was "seriously, who uses static methods 
and functions in the same code base that would use namespaces?"  Of course, I 
would hope to be able to say "me!" once I am able to upgrade my work to 5.3, 
but the debate over the separator character is one of those guaranteed to 
start a flame war so I've just resigned myself to probably not being able to 
use namespaces in most places.

-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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

I am trying to figure out expected memory usage of PHP

Under my 32bit install Apache 2 processes are drawing around 45MB
virtual and 25MB RSS. (XCache enabled)

However, under 64bit, same PHP and Apache versions, FastCGI is consuming
around 110MB virt and 25MB RSS.  However, Apache2 processes are
consuming around 215MB virt and 20MB RSS

Can anyone please help debug why the virtual consumption is so high?

Actually the RSS numbers look fine - it's the vsz numbers that I am
trying to understand why so high?

Thanks

Ed W


--- End Message ---
--- Begin Message ---
64 bit integers are twice as big as 32 bit integers.

Cheers,
Rob.


On Wed, 2008-04-02 at 20:16 +0100, Ed W wrote:
> Hi
> 
> I am trying to figure out expected memory usage of PHP
> 
> Under my 32bit install Apache 2 processes are drawing around 45MB
> virtual and 25MB RSS. (XCache enabled)
> 
> However, under 64bit, same PHP and Apache versions, FastCGI is consuming
> around 110MB virt and 25MB RSS.  However, Apache2 processes are
> consuming around 215MB virt and 20MB RSS
> 
> Can anyone please help debug why the virtual consumption is so high?
> 
> Actually the RSS numbers look fine - it's the vsz numbers that I am
> trying to understand why so high?
> 
> Thanks
> 
> Ed W
> 
> 
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
45MB x2 is a lot less than 215MB...

Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..?

Any other suggestions on how to debug this 5x jump in memory usage?

Thanks

Ed W


Robert Cummings wrote:
64 bit integers are twice as big as 32 bit integers.

Cheers,
Rob.


On Wed, 2008-04-02 at 20:16 +0100, Ed W wrote:
Hi

I am trying to figure out expected memory usage of PHP

Under my 32bit install Apache 2 processes are drawing around 45MB
virtual and 25MB RSS. (XCache enabled)

However, under 64bit, same PHP and Apache versions, FastCGI is consuming
around 110MB virt and 25MB RSS.  However, Apache2 processes are
consuming around 215MB virt and 20MB RSS

Can anyone please help debug why the virtual consumption is so high?

Actually the RSS numbers look fine - it's the vsz numbers that I am
trying to understand why so high?

Thanks

Ed W




--- End Message ---
--- Begin Message ---
Hello

 

I have the next code:

 

 

 

-- archive_a_subir.php --

 

<form action="archivo_subir.php" method="post"

enctype="multipart/form-data">

 

         <input type="file" name="file">

 

         <input type="submit" value="ADJUNTAR ARCHIVO">

 

</form>

 

 

 

In archive_subir.php:

 

 

 

<?

 

         $carpeta = "subidos"; // nombre de la carpeta ya creada. chmool 777
(todos los permisos)

 

         copy($_FILES['file']['tmp_name'] , $carpeta . '/' . $_FILE
['file']['name']);

 

?>

 

 

 

You can see this in  <http://www.portbora.com.ar/foro/archivo_a_subir.php>
http://www.portbora.com.ar/foro/archivo_a_subir.php,

when I run these appears the next warning

 

 

 

Warning: copy(subidos/) [ < <http://www.portbora.com.ar/foro/function.copy>
http://www.portbora.com.ar/foro/function.copy>

function.copy]: failed to open stream: Is a directory in
/home/pu000561/public_html/foro/archivo_subir.php on line 3

 

 

 

Why this? How can I run correctly?

 

Thanks.

 

 

 

+                                                                          

+ _

   // Emiliano Boragina _

 

   // Diseño & Comunicación //////////////////

+                                                                          

+ _

 

   // [EMAIL PROTECTED]  /

   // 15 40 58 60 02 ///////////////////////////

+                                                                          

+ _


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

         $carpeta = "subidos"; // nombre de la carpeta ya creada. chmool 777
(todos los permisos)

         copy($_FILES['file']['tmp_name'] , $carpeta . '/' . $_FILE
['file']['name']);

<copied straight from my reply to the same question on php-db>

It's $_FILES not $_FILE (an 's' on the end).

It's always worth using error_reporting(E_ALL) and ini_set('display_errors', true) when doing development, this would have triggered a notice or warning (can't remember which).

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Site which provide free information about Top twenty online colleges.

http://www.online-colleges-and-degrees.com/
-- 
View this message in context: 
http://www.nabble.com/Get-Free-Information-for-Top-twenty-%2820%29-online-colleges-and-universities-tp16453305p16453305.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
I ask you remove this spammer from our LIST

Richard L. Buskirk
Senior Software Engineer


-----Original Message-----
From: steve_carpenter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2008 5:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Get Free Information for Top twenty (20) online colleges and
universities


Site which provide free information about Top twenty online colleges.

http://www.online-colleges-and-degrees.com/
-- 
View this message in context:
http://www.nabble.com/Get-Free-Information-for-Top-twenty-%2820%29-online-co
lleges-and-universities-tp16453305p16453305.html
Sent from the PHP - General mailing list archive at Nabble.com.


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


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

I'm writing a script which requires PAM authentication in order for my users to log in. Unfortunately, it seems the PAM package on PECL won't work, as FreeBSD has no pam_pwdb.so file, so it returns a blank result.

Can someone enlighten me on how to get pecl/PAM working, or another method that I might use? I can't just parse the file directly, as only root has access to the master.passwd file, and the passwd file is shadowed.

PHP: 5.2.5, suPHP/CGI
OS: FreeBSD 7.0-RELEASE
Apache: Apache/2.2.8 (FreeBSD) mod_ssl/2.2.8 OpenSSL/0.9.8e DAV/2

Thanks in advance!

Kyle Baczynski

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

I've recently installed the pecl/PAM module, however, it appears that it is not functioning as it should. It's returning a value of 1, even if the username and password are completely incorrect.

This is the file I'm using to test:
development# cat test.php
<?php
if(pam_auth('sfdfgfdu', '0blah0') == 1) {
        echo "YAY!";
} else {
        echo "BOO!";
}
?>

I've created the /etc/pam.d/php file using pam_unix.so as the library, and added pam.servicename = "php"; to the top of my php.ini file. I'm on FreeBSD 7.0-RELEASE, PHP 5.2.5, and Apache 2.2.

Any assistance would be appreciated.

Thanks!

--- End Message ---
--- Begin Message --- Simple XML has great tools to read xml from a string or a file. But I have it coming in as an http POST and none of them work. Its coming in as a straight file and not as a variable = value pairing like a form does.

What is the best way to do this in PHP

Thanks for any help

--
Michael Horowitz
Your Computer Consultant
http://yourcomputerconsultant.com       
561-394-9079


--- End Message ---
--- Begin Message ---
Good day Michael.

I've done that as

$xml_data = file_get_contents("php://input");
$xml_object = new SimpleXMLElement($xml_data);

And it works.

Best regards,
Ilya Dyoshin



Michael Horowitz пишет:
Simple XML has great tools to read xml from a string or a file. But I have it coming in as an http POST and none of them work. Its coming in as a straight file and not as a variable = value pairing like a form does.

What is the best way to do this in PHP

Thanks for any help






--- End Message ---
--- Begin Message ---
Canadian Doctor Clara  Best Price On Net 79% OFF
http://www.beautywarm.com



No virus found in this outgoing message
Checked by PC Tools AntiVirus (4.0.0.26 - 10.067.006).
http://www.pctools.com/free-antivirus/

--- End Message ---

Reply via email to