Re: [PHP] Blowfish Encryption

2010-06-08 Thread Paul M Foster
On Mon, Jun 07, 2010 at 11:59:14PM -0400, Adam Richardson wrote: On Mon, Jun 7, 2010 at 11:20 PM, Paul M Foster pa...@quillandmouse.com wrote: I've got a file of passwords I'd like to encrypt/decrypt using blowfish. I'd like to be able to do so with PHP and via the command

Re: [PHP] Security Issue

2010-06-08 Thread Raymond Irving
Are you running the latest version of PHP? If not you should check for PHP vulnerabilities for the version that you have installed. You should also check your OS and web server software for security holes. On Mon, Jun 7, 2010 at 7:54 AM, Igor Escobar titiolin...@gmail.com wrote: Hi Folks!

Re: [PHP] DOMDocument::loadXML() failed when parsing comments inside a script tag

2010-06-08 Thread Raymond Irving
Well it actually failed when loadHTML() is used. The strange thing is that it will fail regardless of the -- characters: Unexpected end tag : strong in Entity __ Raymond Irving On Mon, Jun 7, 2010 at 2:50 PM, Andrew Ballard aball...@gmail.com wrote: On Mon, Jun 7, 2010 at 3:30 PM, Raymond

Re: [PHP] DOMDocument::loadXML() failed when parsing comments inside a script tag

2010-06-08 Thread Andrew Ballard
On Tue, Jun 8, 2010 at 2:50 AM, Raymond Irving xwis...@gmail.com wrote: Well it actually failed when loadHTML() is used. The strange thing is that it will fail regardless of the -- characters: Unexpected end tag : strong in Entity __ Raymond Irving What failed? I copied your example and

[PHP] array key's: which is correct?

2010-06-08 Thread Tanel Tammik
Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array[$i] = ''; Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: DOMDocument throws Unexpected end tag error when loading valid HTML

2010-06-08 Thread Peter Lind
2010/6/7 Raymond Irving xwis...@gmail.com: Thanks Nisse. This works great! I just wish the HTML DOM parser could just ignore the contents of the script tags. It would have made life so much easier for developers working with the DOM.

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Paul M Foster
On Tue, Jun 08, 2010 at 04:12:42PM +0300, Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; If the index for (integer) 3, the first example is correct. If the index is (string) '3', the second example is correct. $i = 7; $array[$i] = '';

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 16:12 +0300, Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array[$i] = ''; Br Tanel The two indexes are equivalent, although I reckon the integer one will give better

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Robert Cummings
Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array[$i] = ''; Sometimes it is good to illustrate the correct answer: ?php $array = array ( '1' = '1', '2' = '2', 'three' = 'three', '4.0'

Re: [PHP] Blowfish Encryption

2010-06-08 Thread Adam Richardson
Hi Paul, If one has multiple samples of encrypted emails, it's likely that the several of the samples will end using the same cipher text, as many people end their emails with a consistent signature. This repeated cipher text improves the ability of those trying to attack (decrypt

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 09:38 -0400, Robert Cummings wrote: Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array[$i] = ''; Sometimes it is good to illustrate the correct answer: ?php

Re: [PHP] Security Issue

2010-06-08 Thread Igor Escobar
Hey Richard, I'll find more about this parameter allow_url_include, thank you! Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On Mon, Jun 7, 2010 at 5:26 PM, richard gray r...@richgray.com

Re: [PHP] Blowfish Encryption

2010-06-08 Thread Paul M Foster
On Tue, Jun 08, 2010 at 09:48:43AM -0400, Adam Richardson wrote: Hi Paul, If one has multiple samples of encrypted emails, it's likely that the several of the samples will end using the same cipher text, as many people end their emails with a consistent

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Paul M Foster
On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote: Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array[$i] = ''; Sometimes it is good to illustrate the correct answer: ?php $array = array

[PHP] Pagination?

2010-06-08 Thread Paul Halliday
I just spent the last 1/2 hour looking at many different solutions for this. Is there a universal favorite? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote: On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote: Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array[$i] = '';

Re: [PHP] Pagination?

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 11:37 -0300, Paul Halliday wrote: I just spent the last 1/2 hour looking at many different solutions for this. Is there a universal favorite? Thanks. It depends what you mean by pagination, as there are two parts to it. There is the display of the pagination nav and

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Peter Lind
On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote: On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote: Tanel Tammik wrote: Hi, which one is correct or better? $array[3] = ''; or $array['3']

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 16:44 +0200, Peter Lind wrote: On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote: On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote: Tanel Tammik wrote: Hi, which

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Peter Lind
On 8 June 2010 16:53, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 16:44 +0200, Peter Lind wrote: On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote: On Tue, Jun 08, 2010 at 09:38:58AM

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 17:11 +0200, Peter Lind wrote: On 8 June 2010 16:53, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 16:44 +0200, Peter Lind wrote: On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 10:35 -0400,

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Paul M Foster
On Tue, Jun 08, 2010 at 04:44:53PM +0200, Peter Lind wrote: On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote: On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote: Tanel Tammik wrote: Hi,

Re: [PHP] combo box validation

2010-06-08 Thread Gerardo Benitez
Hi Dave, In general, you can validate this condition with javascript before to send the form, and if some errors exist, the form is not submitted. or validate the conditions in the server side with php. Gerardo. www.webseficientes.com.ar On Mon, Jun 7, 2010 at 2:49 PM, David Mehler

Re: [PHP] session variables in tmp

2010-06-08 Thread Gerardo Benitez
Hi Stephen, you can try setting the session path using session_save_path http://www.php.net/manual/en/function.session-save-path.php. Gerardo www.webseficientes.com.ar On Sat, Jun 5, 2010 at 2:18 AM, Stephen Sunderlin stephen.sunder...@verizon.net wrote: trying out a CentOS release 5.2

Re: [PHP] combo box validation

2010-06-08 Thread Ashley Sheridan
On Tue, 2010-06-08 at 12:57 -0300, Gerardo Benitez wrote: Hi Dave, In general, you can validate this condition with javascript before to send the form, and if some errors exist, the form is not submitted. or validate the conditions in the server side with php. Gerardo.

Re: [PHP] combo box validation

2010-06-08 Thread Gerardo Benitez
your advice is welcome! Gerardo www.webseficientes.com.ar On Tue, Jun 8, 2010 at 1:01 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-08 at 12:57 -0300, Gerardo Benitez wrote: Hi Dave, In general, you can validate this condition with javascript before to send the

[PHP] PHP app Server Load

2010-06-08 Thread Dan Joseph
Hi, This is slightly OT... We're wrapping up a new PHP/MySQL driven web site built on the Zend Framework. We're anticipating a couple hundred thousand members with several thousand of them coming to the site at once. I'm trying to figure out how to determine how many servers we need to support

Re: [PHP] PHP app Server Load

2010-06-08 Thread Daniel Brown
On Tue, Jun 8, 2010 at 12:12, Dan Joseph dmjos...@gmail.com wrote: Anyone know a good way to estimate load based on actually numbers compared to benchmark results from intel on a faster server? Run a DDoS-style (but not legitimate DDoS attack) load-balance simulator against your site and

Re: [PHP] array key's: which is correct?

2010-06-08 Thread Robert Cummings
Paul M Foster wrote: On Tue, Jun 08, 2010 at 04:44:53PM +0200, Peter Lind wrote: On 8 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-08 at 10:35 -0400, Paul M Foster wrote: On Tue, Jun 08, 2010 at 09:38:58AM -0400, Robert Cummings wrote: Tanel Tammik

Re: [PHP] session variables in tmp

2010-06-08 Thread Stephen Sunderlin
Thanks Gerardo. I send a large dump.sql file to my /tmp dir and filled up the remaining space so PHP was not able to write any more session variable. Took me a little while to figure that one out. Thanks for your response. On Tue, 08 Jun 2010 12:00:23 -0400, Gerardo Benitez

Re: [PHP] date_default_timezone_get() differs from ini_get('date.timezone');

2010-06-08 Thread Paul
no idea anybody? problem still exists On 05/30/2010 11:05 AM, php wrote: Hi there i think i did not understand the timezone-settings right. In php.ini, i wrote date.timezone=Europe/Berlin. echo ini_get('date.timezone'); returns Europe/Berlin. But the Class DateTime is using another

Re: [PHP] session variables in tmp

2010-06-08 Thread Gerardo Benitez
Ok, that usually happens. Gerardo www.webseficientes.com.ar On Tue, Jun 8, 2010 at 1:48 PM, Stephen Sunderlin stephen.sunder...@verizon.net wrote: Thanks Gerardo. I send a large dump.sql file to my /tmp dir and filled up the remaining space so PHP was not able to write any more session

Re: [PHP] PHP app Server Load

2010-06-08 Thread Dan Joseph
On Tue, Jun 8, 2010 at 12:19 PM, Daniel Brown danbr...@php.net wrote: On Tue, Jun 8, 2010 at 12:12, Dan Joseph dmjos...@gmail.com wrote: Anyone know a good way to estimate load based on actually numbers compared to benchmark results from intel on a faster server? Run a DDoS-style

Re: [PHP] PHP app Server Load

2010-06-08 Thread Daniel P. Brown
On Tue, Jun 8, 2010 at 13:29, Dan Joseph dmjos...@gmail.com wrote: As for estimating how things would run on a better server.  There are benchmarks that score the CPUs.  Let's say one scored 5500, and one scored 1100, is it safe to say the higher one can handle 5x the load? Very, very

[PHP] finding the web root

2010-06-08 Thread Tanel Tammik
Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... ?php $root = explode('/', $_SERVER['DOCUMENT_ROOT']); $cwd = explode(DIRECTORY_SEPARATOR, __DIR__); $web_root = '/' . implode('/', array_diff($cwd, $root));

RE: [PHP] Security Issue

2010-06-08 Thread David Stoltz
allow_url_include is (or should be) disabled by default. http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url- include I can't think of one good reason to ever enable this, it would be a security issue no matter how you slice it... -Original Message- From: Igor

Re: [PHP] Security Issue

2010-06-08 Thread Michael Shadle
Yes and scrubbing the input to ensure the field used for this URL rejects certain characters or does sanity checking on it would also be another suggestion. Turning this off would fix remote include requests. But still need to check for people requesting local files. Should never take user

Re: [PHP] finding the web root

2010-06-08 Thread Jim Lucas
Tanel Tammik wrote: Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... ?php $root = explode('/', $_SERVER['DOCUMENT_ROOT']); $cwd = explode(DIRECTORY_SEPARATOR, __DIR__); $web_root = '/' .

Re: [PHP] finding the web root

2010-06-08 Thread Tanel Tammik
Jim Lucas li...@cmsws.com wrote in message news:4c0e99d9.20...@cmsws.com... Tanel Tammik wrote: Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... ?php $root = explode('/', $_SERVER['DOCUMENT_ROOT']);

Re: [PHP] finding the web root

2010-06-08 Thread Nathan Nobbe
On Tue, Jun 8, 2010 at 12:27 PM, Tanel Tammik keevit...@gmail.com wrote: Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... ?php $root = explode('/', $_SERVER['DOCUMENT_ROOT']); $cwd =

Re: [PHP] finding the web root

2010-06-08 Thread Micky Hulse
$_SERVER['DOCUMENT_ROOT'] although a post on the manual mentions some variability between environments. $root = (array_key_exists('DOCUMENT_ROOT', $_ENV)) ? $_ENV['DOCUMENT_ROOT'] : $_SERVER['DOCUMENT_ROOT']; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] finding the web root

2010-06-08 Thread Jim Lucas
Tanel Tammik wrote: Jim Lucas li...@cmsws.com wrote in message news:4c0e99d9.20...@cmsws.com... Tanel Tammik wrote: Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... ?php $root = explode('/',

Re: [PHP] finding the web root

2010-06-08 Thread Jim Lucas
Jim Lucas wrote: Tanel Tammik wrote: Jim Lucas li...@cmsws.com wrote in message news:4c0e99d9.20...@cmsws.com... Tanel Tammik wrote: Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... ?php $root =

Re: [PHP] Finding a font.

2010-06-08 Thread David McGlone
On Monday 07 June 2010 22:22:31 Karl DeSaulniers wrote: Hi Dave, It is called Fine Hand I believe. Found a copy here. http://www.fonts.com/FindFonts/Detail.htm?pid=203813/cgi-bin/ MsmGo.exe?grab_id=0page_id=8346query=HANDWRITINGSCOPE=Fonts Thank you Karl, how did you find it? every google

Re: [PHP] Finding a font.

2010-06-08 Thread David McGlone
On Monday 07 June 2010 23:22:14 Adam Richardson wrote: On Mon, Jun 7, 2010 at 10:22 PM, Karl DeSaulniers k...@designdrumm.comwrote: Hi Dave, It is called Fine Hand I believe. Found a copy here. I believe Karl nailed it. And, for future reference, WhatTheFont works quite well for

Re: [PHP] Finding a font.

2010-06-08 Thread Karl DeSaulniers
I knew it had to be a script or handwriting font. I googled script font, went to that site and had all the fonts display the A and started scrolling. Gave up on script fonts and typed in handwriting fonts and BAM! ;) Karl On Jun 8, 2010, at 7:45 PM, David McGlone wrote: On Monday 07 June

Re: [PHP] Finding a font.

2010-06-08 Thread Karl DeSaulniers
That and I have an uncanny scanning ability while scrolling. Don't know where it comes from, but glad its there. lol Karl On Jun 8, 2010, at 7:45 PM, David McGlone wrote: On Monday 07 June 2010 22:22:31 Karl DeSaulniers wrote: Hi Dave, It is called Fine Hand I believe. Found a copy here.