Re: [PHP] Reading an xml file from a POST array

2008-04-03 Thread Ilya Dyoshin
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

[PHP] base64 encode question

2008-04-03 Thread Sn!per
Hi all, I have a short script that I want to store the last login time and the host IP number (harcoded for the moment). Those two variables are stored in $last_login, which is an array. [EMAIL PROTECTED] test]# cat lt.php ? $last_login = array('time' = time(), 'host' = 192.168.10.100);

Re: [PHP] base64 encode question

2008-04-03 Thread Aschwin Wesselius
Sn!per wrote: encoded value is: YToyOntzOjQ6InRpbWUiO2k6MTIwNzIwODk4MjtzOjQ6Imhvc3QiO3M6MTQ6IjE5Mi4xNjguMTAuMTAwIjt9 encoded value is: YToyOntzOjQ6InRpbWUiO2k6MTIwNzIwODk4NDtzOjQ6Imhvc3QiO3M6MTQ6IjE5Mi4xNjguMTAuMTAwIjt9 encoded value is:

[PHP] Re: Memory usage very high under AMD64?

2008-04-03 Thread Colin Guthrie
Hi Ed, Long time no speak... keep running into you every now and then online :) Hope you are well. Ed W wrote: 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

[PHP] Re: autoload with namespace

2008-04-03 Thread Colin Guthrie
Larry Garfield wrote: 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.

Re: [PHP] Re: autoload with namespace

2008-04-03 Thread Larry Garfield
On Thursday 03 April 2008, Colin Guthrie wrote: Larry Garfield wrote: 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

[PHP] Re: autoload with namespace

2008-04-03 Thread Colin Guthrie
Larry Garfield wrote: See, I'm working on a different approach for Drupal. We're actually scanning our own code base and building up an index of all classes (and functions!) in the system, saving that to the database, and then the autoload implementation just polls the database for the

[PHP] mkdir/exec(cacls) question....

2008-04-03 Thread Constance.Kan
Bishopsfield Road Fareham Hampshire PO14 1NH Tel: 01329 815200 Fax: 01329 822483 The content of this e-mail is the sole responsibility of the sender - Fareham College accepts no responsibility for its accuracy or the

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Aschwin Wesselius
Ed W wrote: RSS is staying approximately constant, ie the memory in use has not changed much VSZ, ie virtual memory has increased by more than 2x2=4. If someone has some hard experience of both platforms then please add some experience to this - however, I'm looking for some hard debugging

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Ed W
Aschwin Wesselius wrote: Ed W wrote: RSS is staying approximately constant, ie the memory in use has not changed much VSZ, ie virtual memory has increased by more than 2x2=4. If someone has some hard experience of both platforms then please add some experience to this - however, I'm

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Aschwin Wesselius
Ed W wrote: 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

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Ed W
Aschwin Wesselius wrote: Ed W wrote: 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

[PHP] Re: Memory usage very high under AMD64?

2008-04-03 Thread Colin Guthrie
Ed W wrote: Interesting, but I think I have come to the wrong forum? Where do the programmers who implement PHP hang out? I really need to get under the bonnet on this and find out what's happening - I'm not after speculation (thanks to everyone who responded though) You probably want the

RES: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Thiago Pojda
Try those Internal lists. You can check them out @ http://www.php.net/mailing-lists.php Good luck! -Mensagem original- De: Ed W [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 3 de abril de 2008 07:08 Para: Aschwin Wesselius Cc: Robert Cummings; php-general@lists.php.net Assunto:

[PHP] Question About PHP Includes

2008-04-03 Thread jwynacht
Hi, I help maintain a Movable Type install for a non-profit organization. Things have worked well with the site but the other day the home page went blank and the rest of the pages lost all of their formatting. I've done some debugging and it seems that some include statements are no longer

Re: [PHP] Question About PHP Includes

2008-04-03 Thread Daniel Brown
On Thu, Apr 3, 2008 at 11:22 AM, jwynacht [EMAIL PROTECTED] wrote: Hi, I help maintain a Movable Type install for a non-profit organization. Things have worked well with the site but the other day the home page went blank and the rest of the pages lost all of their formatting. I've done

Re: [PHP] Question About PHP Includes

2008-04-03 Thread Daniel Brown
On Thu, Apr 3, 2008 at 11:42 AM, Jon Wynacht [EMAIL PROTECTED] wrote: Hi Dan, I just tried that and didn't see any errors on the screen or in my log file. I'm really quite stumped and am wondering if my ISP made some changes on their end? Thanks, Jon Please keep all replies

[PHP] Cpoying mails from one IMAP server to an other IMAP server

2008-04-03 Thread Damian Hischier
Hi list I have to copy mails from one IMAP server to an other IMAP server. For that purpose I want to write a PHP script. Can anybody help me on that Thank you very much for your help Damian

[PHP] How to get a code review?

2008-04-03 Thread David Jourard
Hi, I'm a perl programmer and I've written a registration/login program in Perl. I've just finished writing a small program in php to check the login cookie created by my perl program for any php html page. Can anyone direct me to a list or forum where one can get a code review of the php

Re: [PHP] How to get a code review?

2008-04-03 Thread Daniel Brown
On Thu, Apr 3, 2008 at 12:09 PM, David Jourard [EMAIL PROTECTED] wrote: Hi, I'm a perl programmer and I've written a registration/login program in Perl. I've just finished writing a small program in php to check the login cookie created by my perl program for any php html page. Can

Re: [PHP] How to get a code review?

2008-04-03 Thread Robert Cummings
On Thu, 2008-04-03 at 12:09 -0400, David Jourard wrote: Hi, I'm a perl programmer and I've written a registration/login program in Perl. I've just finished writing a small program in php to check the login cookie created by my perl program for any php html page. Can anyone direct me

Re: [PHP] How to get a code review?

2008-04-03 Thread Nathan Nobbe
On Thu, Apr 3, 2008 at 10:09 AM, David Jourard [EMAIL PROTECTED] wrote: Can anyone direct me to a list or forum where one can get a code review of the php by other experienced php programmers. how much code is there ? -nathan

[PHP] Re: Cpoying mails from one IMAP server to an other IMAP server

2008-04-03 Thread Colin Guthrie
Damian Hischier wrote: Hi list I have to copy mails from one IMAP server to an other IMAP server. For that purpose I want to write a PHP script. Can anybody help me on that Thank you very much for your help If you really, really want to write your own go for it, but I've migrated

RE: [PHP] How to get a code review?

2008-04-03 Thread admin
You can simply check the session or cookie if(!session_is_registered(user)) { echo I cant see the session_register user; }else{ echo I see the session $user; } User is an example of a session_register(user); the user variable has been set in the

Re: [PHP] Question About PHP Includes

2008-04-03 Thread Jon Wynacht
Whoopssorry abut the reply ;-( Thanks for the advice...I'll start making the changes in the path. Cheers, Jon On Apr 3, 2008, at 8:56 AM, Daniel Brown wrote: On Thu, Apr 3, 2008 at 11:42 AM, Jon Wynacht [EMAIL PROTECTED] wrote: Hi Dan, I just tried that and didn't see any errors on

[PHP] everything as classes

2008-04-03 Thread robert
Along the lines of a previous post How to get a code review, I am curious if it is overkill to create everything in classes. For example, a movie website where there is a class for the movie datatype, class for getting/adding/deleting/updating movie's data to the database, and class for

Re: [PHP] How to get a code review?

2008-04-03 Thread David Jourard
Nathan Nobbe wrote: how much code is there ? -nathan 200 lines Robert Cummings You could provide links to the source code and post the links here. Pastebin is often used... http://www.pastebin.com Thanks http://pastebin.com/m6c8cb17c Daniel Brown wrote: By code review, what exactly

Re: [PHP] everything as classes

2008-04-03 Thread Nathan Nobbe
On Thu, Apr 3, 2008 at 10:33 AM, robert [EMAIL PROTECTED] wrote: Along the lines of a previous post How to get a code review, I am curious if it is overkill to create everything in classes. For example, a movie website where there is a class for the movie datatype, class for

Re: [PHP] How to get a code review?

2008-04-03 Thread Nathan Nobbe
On Thu, Apr 3, 2008 at 10:41 AM, David Jourard [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: how much code is there ? 200 lines i think ur safe posting that on the list directly. sometimes people post several thousand lines and those sort of things are overlooked. I work alone and this

Re: [PHP] How to get a code review?

2008-04-03 Thread David Jourard
Nathan Nobbe wrote: On Thu, Apr 3, 2008 at 10:09 AM, David Jourard [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Can anyone direct me to a list or forum where one can get a code review of the php by other experienced php programmers. how much code is there ? -nathan I

Re: [PHP] How to get a code review?

2008-04-03 Thread Nathan Nobbe
On Thu, Apr 3, 2008 at 11:29 AM, David Jourard [EMAIL PROTECTED] wrote: I posted it at http://pastebin.com/m6c8cb17c for the variable names, you might consider camelCase or underscores to enhance readbility, for example $htmlpathcomponents would become $htmlPathComponents (my preference)

Re: [PHP] everything as classes

2008-04-03 Thread Richard Heyes
Along the lines of a previous post How to get a code review, I am curious if it is overkill to create everything in classes. Everything, yes. Sometimes all you need is a quick and not so dirty function. Though saying that, OO is generally thought of as the way to go. For example, a movie

Re: [PHP] LDAP in php

2008-04-03 Thread [EMAIL PROTECTED]
Richard Lynch schrieb: You probably wouldn't run it through Apache, but you probably COULD run an LDAP server of sorts using http://php.net/sockets Yes... this starts to sound as a solution... Sorry, I hope I do not sound lazy, I just need a bit of a help to locate the starting point. I

Re: [PHP] How to get a code review?

2008-04-03 Thread Ryan Panning
Robert Cummings wrote: You could provide links to the source code and post the links here. Pastebin is often used... http://www.pastebin.com Cheers, Rob. Another good option is PHP Builder, they have a forum setup specifically for code reviewing. They have a large user base too.

Re: [PHP] LDAP in php

2008-04-03 Thread Nathan Nobbe
On Thu, Apr 3, 2008 at 2:22 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am 100% aware of the fact that LDAP is a read optimized database (though I am not sure where this optimization goes when back end is PostgreSQL, for example - the LDAP commands seem simple and re-writing them into SQL

Re: [PHP] LDAP in php

2008-04-03 Thread [EMAIL PROTECTED]
Nathan Nobbe schrieb: I am 100% aware of the fact that LDAP is a read optimized database (though I am not sure where this optimization goes when back end is PostgreSQL, for example - the LDAP commands seem simple and re-writing them into SQL can't be so much overhead; the

[PHP] Re: [PHP-DB] php4 to php5

2008-04-03 Thread Greg Bowser
Sounds like you're talking about the register_globals functionality. It's a php.ini setting that will cause $_POST['foo'] or $_GET['foo'] to be copied to the global variable $foo. This is somewhat of a security risk, thus disabled by default. There's another superglobal array that you might find

Re: [PHP] Re: [PHP-DB] php4 to php5

2008-04-03 Thread Jim Lucas
Greg Bowser wrote: Sounds like you're talking about the register_globals functionality. It's a php.ini setting that will cause $_POST['foo'] or $_GET['foo'] to be copied to the global variable $foo. This is somewhat of a security risk, thus disabled by default. There's another superglobal array

Re: [PHP] How to get a code review?

2008-04-03 Thread Shawn McKenzie
Nathan Nobbe wrote: On Thu, Apr 3, 2008 at 10:41 AM, David Jourard [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: how much code is there ? 200 lines i think ur safe posting that on the list directly. sometimes people post several thousand lines and those sort of things are

[PHP] preg_replace Question

2008-04-03 Thread Richard Luckhurst
Hi List I am trying to perform a number of replacements of place holders in an html page I am working on using preg_replace. I am stuck with a pronlem I can not work out and would appreciate some help. The code I have is as follows $html = preg_replace('/%Amount/',$amount,$html); $html

[PHP] Character set problems

2008-04-03 Thread Rob Gould
I'm having a hard time figuring out why my character sets and data look when when viewed in phpAdmin when browsing the table-columns, but then I go to show the data on my web-page with PHP, I get garbage-characters where I should be seeing apostrophs and special foreign-characters. I copied