Re: [PHP] php-cli-shebang

2011-06-07 Thread Lists
Lists wrote: Windows Server 2003 PHP fastcgi 5.2 O.K. '-q' is quiet mode (no header info), which works better when not using the -f flag when calling the script (it appears). anyway, I solved my issues with a work around, so no worries. Donovan -- dbrooke -- PHP General Mailing List (h

Re: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Jim Lucas
On 6/7/2011 2:44 PM, Adam Preece wrote: > hi, > > thanks for your reply. > > i have figured out, well kind of, and got the data i need but the problem is > its nested within to many arrays! > > Array ( > [threads & form types] => > Array ( [0] => Array ( [name] => imperial

[PHP] php-cli-shebang

2011-06-07 Thread Lists
Windows Server 2003 PHP fastcgi 5.2 Hello, I am needing to call a php script from another language, so I am using cli. I have it basically working but have a couple questions. First, what is the (suggested) '-q' flag for in the shebang script? last, my shell is returning the actual call along

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 04:35 PM, Alex Nikitin wrote: > Shawn, == is not good for string comparison, its a bad habit that one > should get out of, use ===, its much safer . Yes, except that I was comparing a string to an array of integers :) > > Also try the same algorithm on 10 arrays of some number o

Re: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
hi, thanks for your reply. i have figured out, well kind of, and got the data i need but the problem is its nested within to many arrays! Array ( [threads & form types] => Array ( [0] => Array ( [name] => imperial thread form [id] => 28 [page_cat_id] => 9 [main_nav] =

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 04:28 PM, Floyd Resler wrote: > > Shawn, > I'm terrible with regular expressions. Could you give me an example? > > Thanks! > Floyd > > Depends. Could be as simple as this to return an array of all occurrences of $needle in any of the $haystack_array values: $haystack_arra

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Alex Nikitin
It runs fast on my 2.33 core 2, and about as fast on this small data set, on the dual 6 core with 96GB ram, or the 8 core 9GB box, it depends on the size of your data set, memory speed and latency, and miniscule amount of processing power (once again assuming small data set). That said, you could

RE: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Jasper Mulder
> From: a...@blueyonder.co.uk > Date: Tue, 7 Jun 2011 21:50:27 +0100 > To: php-general@lists.php.net > Subject: [PHP] advice on how to build this array from an array. > > hi all, > > please forgive me if i do not make sense, ill try my best to explain. > >

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 03:57 PM, Floyd Resler wrote: > > On Jun 7, 2011, at 4:42 PM, Alex Nikitin wrote: > >> If you don't need the location, you can implode the array and use preg >> match, quickly testing it, that gives you about 4.5 times performance >> increase, but it wont give you the location, only

Re: [PHP] Going crazy with include & require not working

2011-06-07 Thread Brian Dunning
Thanks, this helped me solve it. FPDI extends a class in FPDF, so I simply had to reverse the order in which I call them and all is hunky dory. On Jun 6, 2011, at 5:54 PM, Michael Shadle wrote: > > ini_set('display_errors', 1); > -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Floyd Resler
On Jun 7, 2011, at 4:42 PM, Alex Nikitin wrote: > If you don't need the location, you can implode the array and use preg > match, quickly testing it, that gives you about 4.5 times performance > increase, but it wont give you the location, only if a certain value exists > within the array... You

[PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
hi all, please forgive me if i do not make sense, ill try my best to explain. i have this array or arrays. Array ( [name] => super duplex stainless steels [id] => 30 [page_cat_id] => 10 [main_nav] => true [cat_name] => material range ) Array ( [name] => standard stainless steels [id] => 31 [p

Re: [PHP] Re: Fuzzy Array Search

2011-06-07 Thread Alex Nikitin
If you don't need the location, you can implode the array and use preg match, quickly testing it, that gives you about 4.5 times performance increase, but it wont give you the location, only if a certain value exists within the array... You can kind of do some really clever math to get your search

[PHP] Re: Fuzzy Array Search

2011-06-07 Thread Shawn McKenzie
On 06/07/2011 12:45 PM, Floyd Resler wrote: > What would be the easiest way to do a fuzzy array search? Can I do this > without having to step through the array? > > Thanks! > Floyd > I use preg_grep() -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Fuzzy Array Search

2011-06-07 Thread Alex Nikitin
What do you mean by "fuzzy search"? Like an approximate search, and instead of you stepping through the array, you guesstimate where to start, or search for approximate string value in an array of strings? -- The trouble with programmers is that you can never tell what a programmer is doing until

[PHP] Fuzzy Array Search

2011-06-07 Thread Floyd Resler
What would be the easiest way to do a fuzzy array search? Can I do this without having to step through the array? Thanks! Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php hide menu

2011-06-07 Thread tedd
At 12:12 PM -0500 6/7/11, Chris Stinemetz wrote: > Chris: You mean something like this? http://php1.net/b/zipcode-states/ The explanation (and js) is there. Yes, do you have a tutorial to go with the demo? Thank you, The demo is a tutorial. The javascript code is there -- just downl

Re: [PHP] php hide menu

2011-06-07 Thread tedd
At 11:40 PM -0500 6/6/11, Chris Stinemetz wrote: I have three drop down menus in my form. How do I make it so the second and third menus are only visible once the prior menu was selected? Chris: You mean something like this? http://php1.net/b/zipcode-states/ The explanation (and js) is ther

[PHP] Re: What do you get for ...

2011-06-07 Thread Geoff Lane
On Tuesday, June 7, 2011, Richard Quadling wrote: > But the surprising issue is that your 5.1.6 returns bool(false). So > far, that's the only report I've got that shows inconsistent > behaviour for PHP5+ I too was surprised, which is why I took the time to report. AFAICT, I've got the standard L

Re: [PHP] What do you get for ...

2011-06-07 Thread Tim Streater
On 07 Jun 2011 at 11:35, Richard Quadling wrote: > What do you get for ... > > php -r "var_dump(realpath(null));" OS X: string(10) "/Users/tim" -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What do you get for ...

2011-06-07 Thread Steve Staples
On Tue, 2011-06-07 at 16:09 +0300, Vitalii Demianets wrote: > On Tuesday 07 June 2011 13:35:06 Richard Quadling wrote: > > Hi. > > > > What do you get for ... > > > > php -r "var_dump(realpath(null));" > > > > 1. > PHP 5.3.6 @ Gentoo Linux(x86_64) > > tmp $ php -r "print getcwd();" > /var/tmp >

Re: [PHP] What do you get for ...

2011-06-07 Thread Vitalii Demianets
On Tuesday 07 June 2011 13:35:06 Richard Quadling wrote: > Hi. > > What do you get for ... > > php -r "var_dump(realpath(null));" > 1. PHP 5.3.6 @ Gentoo Linux(x86_64) tmp $ php -r "print getcwd();" /var/tmp tmp $ php -r "var_dump(realpath(null));" string(8) "/var/tmp" 2. PHP 5.2.14 @ Linux(ARM

Re: [PHP] Re: What do you get for ...

2011-06-07 Thread Richard Quadling
On 7 June 2011 13:04, Geoff Lane wrote: > On Tuesday, June 7, 2011, Richard Quadling wrote: > >> What do you get for ... > >> php -r "var_dump(realpath(null));" > > PHP 5.3.5-1ubuntu7.2 on Ubuntu 11.04 kernel 2.6.18 returns the same > value as __DIR__ > > However, PHP 5.1.6 on CentOS 5.6 kernel 2.

[PHP] Re: What do you get for ...

2011-06-07 Thread Geoff Lane
On Tuesday, June 7, 2011, Richard Quadling wrote: > What do you get for ... > php -r "var_dump(realpath(null));" PHP 5.3.5-1ubuntu7.2 on Ubuntu 11.04 kernel 2.6.18 returns the same value as __DIR__ However, PHP 5.1.6 on CentOS 5.6 kernel 2.6.18 returns bool(false). Doing php -r "var_dump(__DIR_

Re: [PHP] What do you get for ...

2011-06-07 Thread Richard Quadling
On 7 June 2011 12:25, Stuart Dallas wrote: > On Tue, Jun 7, 2011 at 12:10 PM, Richard Quadling > wrote: >> >> > -Original Message- >> > What output do you get on non Windows setups? > > OSX 10.6.7 > PHP 5.3.4 > OSX Server 10.6 > PHP 5.3.0 > Linux 2.6.35.4-rscloud (Rackspace cloud) > PHP 5

RE: [PHP] php hide menu

2011-06-07 Thread Jay Blanchard
[snip] I would like to pass the value from the prior menu to the next. Would you please show me how to handle this? [/snip] As several have mentioned, this is a job for AJAX and JavaScript. Here is a good tutorial: http://www.yourinspirationweb.com/en/how-to-create-chained-select-with-p hp-and-jqu

Re: [PHP] What do you get for ...

2011-06-07 Thread Stuart Dallas
On Tue, Jun 7, 2011 at 12:10 PM, Richard Quadling wrote: > > -Original Message- > > What output do you get on non Windows setups? > OSX 10.6.7 PHP 5.3.4 OSX Server 10.6 PHP 5.3.0 Linux 2.6.35.4-rscloud (Rackspace cloud) PHP 5.3.6 Linux 2.6.18 (CentOS) PHP 5.2.10 Linux 2.6.18 (CentOS)

Re: [PHP] What do you get for ...

2011-06-07 Thread Richard Quadling
> -Original Message- > What output do you get on non Windows setups? Hmmm. I really should have asked what the non windows users get. Oh. Look. I did. ;-) -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP Genera

Re: [PHP] php hide menu

2011-06-07 Thread Chris Stinemetz
> If you do require the value from the first menu to be passed to the select > statements for the other menus let me know I will explain how that is done, > it is a little more complex. > I would like to pass the value from the prior menu to the next. Would you please show me how to handle this?

RE: [PHP] What do you get for ...

2011-06-07 Thread admin
Microsoft Windows Version 5.1.2600 E:\>php -r "var_dump(realpath(null));" string(41) "E:\" E:\> Richard L. Buskirk -Original Message- From: Richard Quadling [mailto:rquadl...@gmail.com] Sent: Tuesday, June 07, 2011 6:35 AM To: PHP General list Subject: [PHP] What do you get for ... H

RE: [PHP] What do you get for ...

2011-06-07 Thread Jason
>-Original Message- >From: Richard Quadling [mailto:rquadl...@gmail.com] >Sent: 07 June 2011 11:35 >To: PHP General list >Subject: [PHP] What do you get for ... > >Hi. > >What do you get for ... > >php -r "var_dump(realpath(null));" > >I'm wondering if the result should be a boolean false.

[PHP] What do you get for ...

2011-06-07 Thread Richard Quadling
Hi. What do you get for ... php -r "var_dump(realpath(null));" I'm wondering if the result should be a boolean false. But I'm getting very different results for different versions of PHP for Windows. For PHP5+ (upto lastest 5.3.7-dev), the output is always the same as getcwd() For PHP4, some

Re: [PHP] PHP download page blocking other HTTP requests

2011-06-07 Thread Richard Quadling
On 7 June 2011 09:24, Pete Ford wrote: > On 06/06/11 21:07, Richard Quadling wrote: >> >> On 6 June 2011 13:55, Pete Ford  wrote: >>> >>> Is there something on the Apache/PHP end that might be causing this >>> blocking? (Apache 2.2.10, PHP 5.2.14) >> >> The browser and / or OS may be obeying the s

Re: [PHP] Going crazy with include & require not working

2011-06-07 Thread Richard Quadling
On 7 June 2011 04:05, tedd wrote: > At 5:50 PM -0700 6/6/11, Brian Dunning wrote: >> >> Here's my code: >> >> error_reporting(E_ALL); Not all errors are reported using E_ALL. Try error_reporting(-1); Also, check the include files don't then set error_reporting(0) or something like that. -- Ric

Re: [PHP] PHP download page blocking other HTTP requests

2011-06-07 Thread Pete Ford
On 06/06/11 21:07, Richard Quadling wrote: On 6 June 2011 13:55, Pete Ford wrote: Is there something on the Apache/PHP end that might be causing this blocking? (Apache 2.2.10, PHP 5.2.14) The browser and / or OS may be obeying the settings about the number of simultaneous connections per host

RE: [PHP] Can't use class "'DOMDocument"

2011-06-07 Thread admin
Did you install the php-xml ? Richard L. Buskirk -Original Message- From: Adam Tong [mailto:adam.to...@gmail.com] Sent: Monday, June 06, 2011 9:49 PM To: php-general@lists.php.net Subject: [PHP] Can't use class "'DOMDocument" Hi, When I try using DOMDocument I get the following error:

RE: [PHP] php hide menu

2011-06-07 Thread admin
Dynamically changing displays can be done with JavaScript. First thing I want you to think of is whether or not your 2nd and 3rd menus require information from the first menu to display or sort. According to what I see they do not. If they do not : We start off wrapping each of the second and 3r