Re: [PHP] PHP and curl

2013-09-26 Thread Shawn McKenzie
$strTerminalname = "CIS"; > $version = "1.2"; > $client = new SoapClient( > "http://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL";<http://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL> > ); > $result = $client->GetSeque

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
alb wrote: > On 25.9.2013 17:12, Shawn McKenzie wrote: > > Just as I thought: > > > > 5.2.0 > > Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from > servers > > running Google web server). (Ilia) > > Thanks, but ... > I am not

Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
Keep on list. $result = $client->GetSequenceNo( "CIS" ); shouldn't be throwing that error. Maybe you are trying to do something with $result afterwards? Try var_dump($result); On Wed, Sep 25, 2013 at 10:12 AM, Alf Stockton wrote: > > On 25/09/13 16:52, Shawn McK

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
Just as I thought: 5.2.0 Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from servers running Google web server). (Ilia) On Wed, Sep 25, 2013 at 10:03 AM, Shawn McKenzie wrote: > I believe this was a bug, is only a warning that may be suppressed and may > have been fi

Re: [PHP] php fopen https error

2013-09-25 Thread Shawn McKenzie
I believe this was a bug, is only a warning that may be suppressed and may have been fixed in 5.2.0. Are you aware that PHP is at 5.5.4 and that 5.1.6 is over 7 years old? -Shawn On Wed, Sep 25, 2013 at 9:09 AM, Markus Falb wrote: > With RHEL/CentOS 5 php I get an SSL Error > RHEL/CentOS 5 ph

Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
SOAP functions can be called as methods of the SoapClient object. Maybe: $client->GetSequenceNo( $parameters ); -Shawn On Wed, Sep 25, 2013 at 9:17 AM, Alf Stockton wrote: > In an attempt to interface with a webservice on a Windows 7 server I have > started writing the following:- > [code] >

[PHP] Re: Integer

2013-02-02 Thread Shawn McKenzie
On 02/01/2013 10:40 PM, Ron Piggott wrote: > In the following the “2.” means a moderator response and “25” is the account > # of the moderator. > > > $author = 2.00025 > > ?> > > How can I get the 25 by itself? > - I want to drop the “2.” and remove all the zero’s >

[PHP] Re: globbed includes?

2012-11-20 Thread Shawn McKenzie
On 11/18/2012 02:29 PM, tamouse mailing lists wrote: > There are certain times I'd like to include all files in a given > directory (such as configuration stuff that is split out by type, a la > apache conf.d). Anyone have something handy that implements that? > Just for fun: array_walk(glob('*.

[PHP] Re: What do you call the end-user?

2012-07-24 Thread Shawn McKenzie
On 07/19/2012 12:26 PM, Tedd Sperling wrote: > Hi gang: > > I can't wait for tomorrow -- so here's my off-topic post today. > > First question: > > What do you call the people who ultimately use your code? Many times I would call them dumb asses. Especially many of the users of free software.

Re: [PHP] url string being split

2012-04-27 Thread Shawn McKenzie
On 04/27/2012 10:56 AM, Chris Stinemetz wrote: > I still haven't been able to find a solution. Is there anyone out > there that knows how to keep the query string intact? > > Thank you, > > Chris urlencode($storerow['store_subject']) -- Thanks! -Shawn http://www.spidean.com -- PHP General Ma

Re: [PHP] Variable Question

2012-04-19 Thread Shawn McKenzie
On 04/19/2012 09:55 AM, Christoph Boget wrote: >> I am trying to use this while look to assign them to variables: >> $word_1 >> $word_2 >> $word_3 >> ... >> $word_25 > > This should work for you: > > http://us3.php.net/manual/en/function.extract.php > > thnx, > Christoph Yes and you can use arr

Re: [PHP] Re: Script failing on extension_dir

2012-04-10 Thread Shawn McKenzie
350:/usr/qmsys/qmphp# > > I am doing this so I can connect the database I use and have only been > studying PHP > for 5 days. > > I have attached a file with the results of php -I and the build script. > > Thanks again > George > > > > -Original Messag

[PHP] Re: Script failing on extension_dir

2012-04-10 Thread Shawn McKenzie
On 04/09/2012 03:16 PM, George R Smith wrote: > EXTDIR=`php -i 2> /dev/null | grep -i "extension_dir" | cut -d" " -f3` > > Error message follows, what does the no mean ? > get the directory where PHP extension are stored > > You need to

Re: [PHP] Re: List working?

2012-03-27 Thread Shawn McKenzie
On 03/27/2012 08:11 PM, Daniel Fenn wrote: > It working fine here, just people are busy I suppose. > y u no help me !! i have white page withg my php codes in my page ! help please !! asap please i put codes in my file and is white > > On Wed, Mar 28, 2012 at 10:45 AM, Sh

Re: [PHP] Re: List working?

2012-03-27 Thread Shawn McKenzie
On 03/27/2012 04:34 PM, Matijn Woudt wrote: > On Tue, Mar 27, 2012 at 11:32 PM, Shawn McKenzie wrote: >> On 03/27/2012 04:23 PM, Jay Blanchard wrote: >>> Seems unusual not to have any traffic on it all day long. >> >> i put in my codes but i only get blank page... &g

[PHP] Re: List working?

2012-03-27 Thread Shawn McKenzie
On 03/27/2012 04:23 PM, Jay Blanchard wrote: > Seems unusual not to have any traffic on it all day long. i put in my codes but i only get blank page... -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: looking for an array sorting function.. just not sure which one..and how yet

2012-03-10 Thread Shawn McKenzie
On 03/10/2012 07:01 PM, Shawn McKenzie wrote: > foreach ($query->result() as $row) { >> $arr_cTree[$row->cID] = array($row->cPcID, $row->cL, $row->cName, >> $row->cSeg, $row->cSort); >> } Actually, you may construct your array as follows to m

[PHP] Re: looking for an array sorting function.. just not sure which one.. and how yet

2012-03-10 Thread Shawn McKenzie
On 03/10/2012 06:42 PM, Govinda wrote: > Hi Everyone > > I am newbie enough with the terminology around PHP arrays that I am slow to > wrap my head around what I know is in the docs (what i am reading)... but > just can't identify yet. > > I think it will be faster if someone can translate for

[PHP] Re: iphone & php

2012-03-05 Thread Shawn McKenzie
On 03/05/2012 11:16 AM, Jim Giner wrote: > An appl that has been working fine for a year now and fine up through last > week, suddenly is not working on my iphone. The only differences between > using it on a pc, ipad or iphone are for font sizes and such (handled by JS) > so I'm puzzled as to

[PHP] Re: Insert new array after specific key in multidimensional array

2012-02-28 Thread Shawn McKenzie
On 02/27/2012 08:12 PM, Micky Hulse wrote: > Howdy! > > Example code: > > > > What would be the best way to insert $o_insert array into $o array > after specified key? > > I hate to just ask for example code, but I can't seem to find the > perfect solution. :(

[PHP] Re: Typecasting question

2012-02-05 Thread Shawn McKenzie
On 02/03/2012 10:11 AM, jas wrote: > array('private_key_type' => OPENSSL_KEYTYPE_RSA, > 'encrypt_key_cipher' => OPENSSL_CIPHER_3DES); Look like ints to me: var_dump(): array(2) { ["private_key_type"]=> int(0) ["encrypt_key_cipher"]=> int(4) } -- Thanks! -Shawn http://www.spidea

[PHP] Re: DOS CLI?

2011-12-02 Thread Shawn McKenzie
On 12/02/2011 03:00 PM, Matt Neimeyer wrote: > Is there (or is there a way to compile) a DOS CLI version of a fairly > recent version of PHP? I have not been able to find one using the > powers of Google. > > Not a Windows Command Prompt CLI but an actual CLI version of PHP that > can be made to r

[PHP] Re: Sniping on the List

2011-11-15 Thread Shawn McKenzie
On 11/14/2011 11:51 AM, George Langley wrote: > Am concerned over the number of posts that appear to be from people > trying to over-inflate their self-importance. If you are the world's > best coder, then help those of us who aren't. If you happen to know a > better way to do something that I'm st

[PHP] Re: Converting string to array index

2011-11-06 Thread Shawn McKenzie
On 11/05/2011 09:21 PM, Ethan Rosenberg wrote: > Dear list - > > I have an associative array that will return a string representing an > array index. I now need to convert this string into an actual array index. > > $test1 = array > ( > "e1" => "[4][7]", > "e2" => "[5][8]" > ); > > so.. $z = $t

[PHP] Re: Displaying variables in text - clarification needed

2011-10-26 Thread Shawn McKenzie
P is 5.2.3 and from what I can tell, hasn't been updated > since February of 2011. > > Thanks, > > --Rick > > In addition to escaping the var with mysql_real_escape_string() or similar, values for text columns need to be quoted as you did in your second example. con

[PHP] Re: PHP 5.2 and Apache 2.2 are really compatible?

2011-10-19 Thread Shawn McKenzie
On 10/19/2011 10:36 AM, Joseph Adenuga wrote: > > > > Dear All, > > > I’m using Window XP operating system. I’ve just installed > PHP 5.2.5 and Apache 2.2.8 over a week now. I’ve checked if Apache > installation > is okay with ‘localhost’ in my Firefox browser and it displays ‘It Works!’ > B

[PHP] Re: files outside of documentRoot

2011-10-08 Thread Shawn McKenzie
On 10/08/2011 03:40 PM, Ricardo Martinez wrote: > Hi List! > > I need to access files outside the DocumentRoot. > > I've been looking for info and documentation, and I've read that it can be > done using symbolic links and another way is by using headers. > > I want to know, what do you think, w

[PHP] Re: Secure data management

2011-10-04 Thread Shawn McKenzie
On 10/04/2011 02:23 PM, Jim Giner wrote: > I thought I knew how to do this. > > I have a form that collects some data fields. My script checks if magic > quotes are off and (since they are) executes "addslashes" on each input > field. Then I run a query to INSERT these 'slashed' vars into the

Re: [PHP] book quest

2011-09-28 Thread Shawn McKenzie
On 09/28/2011 06:23 PM, Daniel Brown wrote: > On Wed, Sep 28, 2011 at 19:13, Andy McKenzie wrote: >> >> I agree with Bastien -- I've had great luck with the PHP books. >> "Beginning PHP4" has a permanent place on my shelf, even though PHP4 >> is outdated. "Beginning PHP5.3" hasn't quite supplante

[PHP] Re: Question about losing port number

2011-09-26 Thread Shawn McKenzie
On 09/26/2011 05:45 PM, vince chan wrote: > Hi: > I have a general question about PHP: > So basically I have a link, and I want the href to be absolute., so I > do 'https://' . $_SERVER['HTTP_HOST'] . '/login' ; this gives me > https://127.0.0.1/login on my local; however, what i really want is >

[PHP] Re: How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Shawn McKenzie
On 09/22/2011 10:54 AM, Eric wrote: > if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) { > echo ""; > echo "Username must only contain A-Z and 0-9"; > include("register.html"); > exit; > } > > I used the code above but I now get this error message > > Warning: preg_ma

[PHP] Re: PHP 5.4.0beta1 released

2011-09-16 Thread Shawn McKenzie
On 09/15/2011 08:50 PM, d...@php.net wrote: Thanks X4! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Bug?

2011-09-15 Thread Shawn McKenzie
On 09/15/2011 04:07 PM, Igor Escobar wrote: > Anyone can explain this? > > https://gist.github.com/1220404 > > Part of the code are in portuguese so... > iguais = equal > diferentes = different > > Regards, > Igor Escobar > *Software Engineer > * > + http://blog.igorescobar.com > + http://www.ig

[PHP] Re: htmlentities

2011-09-13 Thread Shawn McKenzie
On 09/13/2011 01:38 PM, Ron Piggott wrote: > > Is there a way to only change accented characters and not HTML (Example: >) > > The syntax > > echo htmlentities( stripslashes(mysql_result($whats_new_result,0,"message")) > ) . "\r\n"; > > is doing everything (as I expect). I store breakin

[PHP] Re: Repetitive answers . . .

2011-09-09 Thread Shawn McKenzie
On 09/09/2011 12:04 PM, Joshua Stoutenburg wrote: > NOTE: There could be lag caused by network and server technologies. > Perhaps answers arrive during the time it takes a person to prepare an > answer. These are forgivable. This is the reason, same as on any other public mailing list. Better t

[PHP] Re: Bug #51739 tricky string to float conversion

2011-08-31 Thread Shawn McKenzie
On 08/31/2011 01:48 PM, Shawn McKenzie wrote: > > The cast to float is truncating the invalid characters and since your > string contains a float that is INF (8315e839) before the truncation at > the "d", then it returns INF. Makes perfect sense. > Just FYI... Do

[PHP] Re: Bug #51739 tricky string to float conversion

2011-08-31 Thread Shawn McKenzie
On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote: > Hi, > I have opend Bug #51739 in 2010. It was closed as bogus before my last > question was answered. It would be fine to know what you think about > that bug. > In short: > var_dump((float)"8315e839da08e2a7afe6dd12ec58245d"); > results i

[PHP] Re: ZCE

2011-08-23 Thread Shawn McKenzie
On 08/23/2011 08:36 AM, Yuri Yarlei wrote: > Hi, > > I like to share with the list, that I passed in the ZCE and now I'm a Zend > Certified Engineer. > > I did a post when I started studying in my blog: > http://www.yuriyarlei.net/en/zend-php-certification > Congratulations! -- Thanks! -Shawn

[PHP] Re: Unanticipated characters returned from multidimensional array

2011-08-06 Thread Shawn McKenzie
On 08/06/2011 08:09 AM, David Green wrote: > foreach($tableNews as $headline => $text){ > $new_text = $text['text']; > echo ""; > echo "$new_text"; > foreach ($text as $soucre => $description){ > $new_description = $description['name']; > echo ""; > echo "$ne

Re: [PHP] Complex (or not so) array data form submission?

2011-08-04 Thread Shawn McKenzie
On 08/04/2011 01:56 PM, Andrew Ballard wrote: > On Thu, Aug 4, 2011 at 2:04 PM, Jamie Krasnoo wrote: >> Thanks. I think what I got hung up on was that I was trying this: >> >> name="addresses[][id]" >> name="addresses[][address1]" >> name="addresses[][address2]" >> name="addresses[][city]" >> name

[PHP] Re: $_POST value disappearing?

2011-08-02 Thread Shawn McKenzie
On 08/02/2011 10:04 AM, Donovan Brooke wrote: > Hello!, > > I must not be understanding something as I would expect 'f_file' > to show up in the print_r below.: > > ---form-- > > > > > > > ---endform-- > > --index.php-- > > --/index.php-- > > > > > The result I get is: > -

Re: [PHP] I can't execute pf commands

2011-07-28 Thread Shawn McKenzie
On 07/28/2011 01:22 PM, Arthur Moczulski wrote: > Answer to your problem is in your pop Apache module configuration. I would > suggest to look how different your cli php.ini file is in comparison to your > Apache php module php.ini file No > Also I would not follow the suggestion of adding Apache

[PHP] Re: I can't execute pf commands

2011-07-28 Thread Shawn McKenzie
On 07/28/2011 11:09 AM, Bulent Malik wrote: > Hi > > I use php5.3 on freebsd > > I also use pf ( packet filter) on it. > > I need to execute pfctl in php script. But I couldn't execute . I don't get > any errors about that. > > Shell commands is allowed in php.ini My > > My script is below,

[PHP] Re: pathinfo function

2011-07-26 Thread Shawn McKenzie
On 07/26/2011 05:47 PM, Tim Streater wrote: > Is it to be expected that, if a file has no extension, and I do this: > >$info = pathinfo ($myfile); > > that I will get an error if I try to reference $info["extension"] ?? > > -- > Cheers -- Tim Just like any other array you'll get a notice:

Re: [PHP] Re: PHP frameworks

2011-07-21 Thread Shawn McKenzie
On 07/21/2011 07:44 PM, Micky Hulse wrote: > On Thu, Jul 21, 2011 at 5:33 PM, Micky Hulse wrote: >> Your app models? > > More specifically, your app model data. :) A la CakePHP. Will automagically build controllers and views for the admin of your tables/models if you wish. -- Thanks! -Shawn h

[PHP] Re: PHP frameworks

2011-07-21 Thread Shawn McKenzie
On 07/21/2011 03:59 PM, Chris Stinemetz wrote: > Hello all, > > I am thinking about venturing into PHP frameworks, but I would like to > get advice on what the correct selection would be for someone that is > about intermediate in PHP knowledge. > > Thank you, So, with your post you will probabl

[PHP] Re: str_replace around a character??

2011-07-14 Thread Shawn McKenzie
On 07/13/2011 04:03 PM, Karl DeSaulniers wrote: > > Thanks Shawn, > I had actually found the same thing myself.. > > $subCc = array_map('trim',explode(",",$subCc)); > > But I could not find my post last night to make a new comment about it. > Thank you for yours though.. I did not think of the i

[PHP] Re: Variable scope

2011-07-14 Thread Shawn McKenzie
On 07/14/2011 03:54 PM, Karl DeSaulniers wrote: > Can anyone explain this to me. I can't read through all that crap, but I notice multiple times that you use undefined variables, due to typo or just not remembering what they are. You pass in $subjField but later try and use $subjectField. You pa

[PHP] Re: IF stream lining

2011-07-14 Thread Shawn McKenzie
On 07/13/2011 11:20 PM, Ron Piggott wrote: > > Is there a way to stream line this: > > if ( ( $val <> "with" ) AND ( $val <> "from" ) ) { > > Ron > > The Verse of the Day > “Encouragement from God’s Word” > http://www.TheVerseOfTheDay.info > Depends on what you mean by streamlined. If it w

[PHP] Re: str_replace around a character??

2011-07-13 Thread Shawn McKenzie
On 07/13/2011 02:54 AM, Karl DeSaulniers wrote: > Hello All, > I am needing some assistance. I am trying to add some Cc and Bcc to a > mail script I have. > On the form I have instructions for each to be separated by a comma + a > space. > In an all perfect world each user would do this perfectly.

[PHP] Re: Installing PHP

2011-07-04 Thread Shawn McKenzie
On 07/04/2011 07:39 AM, Jim Giner wrote: > Hi all, > (Hopefully I posted this in a place that can/will help me) > > I got curious about running php / apache on my own laptop in order to help > my devl process, instead of writing, uploading and testing on my site. > > Found a nice pair of docs fro

Re: [PHP] Re: Php filter validate url

2011-06-27 Thread Shawn McKenzie
On 06/27/2011 10:01 AM, Plamen Ivanov wrote: > On Sun, Jun 26, 2011 at 5:44 PM, Shawn McKenzie wrote: >> >> On 06/26/2011 12:31 PM, Adam Tong wrote: >>> Hi, >>> >>> I wanted tu use php filters for validation to avoid regular expresions. >>> Is

Re: [PHP] Re: Php filter validate url

2011-06-26 Thread Shawn McKenzie
On 06/26/2011 04:50 PM, Fatih P. wrote: > Guys, when you reply a mail, You should write your reply on the top of it, > not at the bottom of it. > makes it easier to follow. > Ready flame-throwers! -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To un

[PHP] Re: Php filter validate url

2011-06-26 Thread Shawn McKenzie
On 06/26/2011 12:31 PM, Adam Tong wrote: > Hi, > > I wanted tu use php filters for validation to avoid regular expresions. > Is it possible that FILTER_VALIDATE_URL only checks if the string has > http:// and do not check for the format domain.something? > > $url = 'http://wwwtestcom'; > $url

[PHP] Re: Php filter validate url

2011-06-26 Thread Shawn McKenzie
On 06/26/2011 12:31 PM, Adam Tong wrote: > Hi, > > I wanted tu use php filters for validation to avoid regular expresions. > Is it possible that FILTER_VALIDATE_URL only checks if the string has > http:// and do not check for the format domain.something? > > $url = 'http://wwwtestcom'; > $url

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 06:54 PM, David Nicholls wrote: >> I'm late to the party, but strtotime works great, though you need to >> give it what it expects: >> >> $ts = strtotime(str_replace('/', '-', $date)); >> > > Thanks, Shawn, that's a bit more elegant! I'll give it a go. I didn't > know how to do the

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 09:05 AM, David Nicholls wrote: > I'm trying to convert a date and time string using strtotime() > > The date and time strings are the first entry in each line in a csv file > in the form: > > 22/06/2011 9:47:20 PM, data1, data2,... > > I've been trying to use the following approac

[PHP] Re: this newsgroup and OE

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 09:45 AM, Jim Giner wrote: > Perhaps someone can tell me the secret to getting problem-free access to the > php newsgroups using OE. I have two other newsgroup servers configured in > OE which do not give me any difficulties at all. My setup for news.php.net > however gives me no

Re: [PHP] Re: mysqlnd and LOAD DATA INFILE

2011-06-20 Thread Shawn McKenzie
On 06/20/2011 10:53 AM, Marten Lehmann wrote: > Hello, > >> What does that mean? It generates an error? It executes without error >> but the data isn't loaded? Try a test on the command line and see what >> you get. > > when calling mysql_error() the message "The used > command is not allowed

[PHP] Re: mysqlnd and LOAD DATA INFILE

2011-06-20 Thread Shawn McKenzie
On 06/20/2011 07:51 AM, Marten Lehmann wrote: > isn't working any longer What does that mean? It generates an error? It executes without error but the data isn't loaded? Try a test on the command line and see what you get. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List

Re: [PHP] Submit Using An Image Form Processing

2011-06-19 Thread Shawn McKenzie
On 06/19/2011 07:26 AM, tedd wrote: > At 6:34 PM -0500 6/18/11, Shawn McKenzie wrote: >> >> Get method is for retrieval only. It is not for anything that has a >> consequence (insert, update, delete, send email, etc.). Use only post >> for those. >> >&g

Re: [PHP] Submit Using An Image Form Processing

2011-06-18 Thread Shawn McKenzie
On 06/18/2011 11:06 AM, Jason Pruim wrote: > > On Jun 18, 2011, at 11:54 AM, "Ron Piggott" > wrote: > >> > SRC="http://www.theverseoftheday.info/store-images/trash_can.png"; WIDTH="20" >> HEIGHT="20" style="float: right;boarder: 0;" alt="Remove Product From >> Shopping Cart" name="remove_pro

[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Shawn McKenzie
On 06/14/2011 01:30 PM, Ashley M. Kirchner wrote: > if ($array = preg_grep('/^ wmax = /', $output)) { > $array = array_values($array); > $wmax = explode(', ', $array[0]); > } Sorry, didn't have a way to test when I posted. So you've posted two different expected outputs and

[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Shawn McKenzie
On 06/14/2011 01:03 PM, Shawn McKenzie wrote: > $wmax = explode(', ', $output[count($output)-1]); Should be -2 :( $wmax = explode(', ', $output[count($output)-2]); -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To u

[PHP] Re: Extracting data from exec() call

2011-06-14 Thread Shawn McKenzie
On 06/14/2011 12:35 PM, Ashley M. Kirchner wrote: > > I'm trying to extract data coming from an exec() call. The exec() > call is performing an ncdump on a netCDF file: > >$filename = "mlab.20110101.cdf"; > exec("/usr/bin/ncdump -l 2048 -v wmax ".$filename, $output); > ec

Re: [PHP] date.timezone set and still getting strict warnings.

2011-06-14 Thread Shawn McKenzie
On 06/14/2011 09:35 AM, Tamara Temple wrote: > > On Jun 13, 2011, at 4:17 PM, Daniel Brown wrote: > >> On Mon, Jun 13, 2011 at 16:25, Tamara Temple >> wrote: >>> I have date.timezone set, as shown in the phpinfo() output: >>> >>> portfolio:Downloads tamara$ php -r 'phpinfo();' | grep 'timezone'

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] 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 Shawn McKenzie
some point... >> >> (sorry i keep on hitting reply instead of reply to all) >> >> -- >> The trouble with programmers is that you can never tell what a programmer is >> doing until it’s too late. ~Seymour Cray >> >> >> >> On Tue, Jun 7, 201

[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

[PHP] Re: A Review Request

2011-05-19 Thread Shawn McKenzie
On 05/18/2011 02:22 PM, tedd wrote: > Hi gang: > > I am considering providing PHP code to the general public via my website > > This is my first attempt: > > http://sperling.com/php/authorization/ > > What do you people think? > > Cheers, > > tedd > I have to agree about the braces, but at

Re: [PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Shawn McKenzie
e=1 and A1.value=800 and > A2.variable=2 and A2.value=999 and > A3.variable=3 and A3.value=3.14 and > A1.results_id=Results.results_id and > A2.results_id=Results.results_id and > A3.results_id=Results.results_id > > Theoretically this works, but how good will be the performanc

[PHP] Re: Storing indefinite arrays in database

2011-05-11 Thread Shawn McKenzie
On 05/10/2011 03:16 PM, Benedikt Voigt wrote: > Hi, > I'am very new to PHP, so please any comment is welcome. > > I want to write a function in PHP, which takes X arguments and outputs a > value. > The functioning of this function should be stored in a db (mydb? or > better alternatives?) > The fu

[PHP] Re: files outside of the web tree

2011-04-27 Thread Shawn McKenzie
On 04/27/2011 12:08 PM, Jim Giner wrote: > I have managed to build include files and store them above my public folder > and the called pages manage to find them from the public folder and properly > include them. My problem is with the html src= attribute. I have uploaded > photos to be incl

[PHP] Re: JavaScript Injection ???

2011-04-18 Thread Shawn McKenzie
On 04/18/2011 12:06 PM, tedd wrote: > Hi gang: > > Quite some time ago I had a demo that showed Javascript injection. It > was where a user could type in: > > alert("Evil Code"); > > and a JavaScript alert would be shown. > > But now my demo no longer works. So, what happened? Was there a php

[PHP] Re: How to write a PHP coding to list out all files and directories aslinks to them?

2011-04-16 Thread Shawn McKenzie
On 04/14/2011 06:16 PM, Mikhail S wrote: > How to write a PHP coding to list out all files and directories as links to > them? > > This is somewhat similar to some index pages. When new file or folder is > added to the directory, HTML page should display the newly created > file/folder together wi

[PHP] Re: Ranges for case statement and a WTF moment.

2011-04-06 Thread Shawn McKenzie
On 04/05/2011 10:28 AM, Richard Quadling wrote: > Hi. > > I just wanted to quickly see if PHP supported ranges in its > switch/case statement (http://en.wikipedia.org/wiki/Ellipsis) > > $s = intval(date('s')); > switch($s) > { > case 0...9 : echo 'Between 0 and 9'; break; > c

Re: [PHP] problem with if and exact match

2011-03-15 Thread Shawn McKenzie
On 03/15/2011 07:30 AM, Steve Staples wrote: > > Wouldn't this be better to use, as it is meant to search for the string > inside the string? (use use regex) > > if(stristr($name, 'Jackson')) > { > echo "String is in String"; > } > else > { > echo "Failed"; > } > > http://ca.php.net

Re: [PHP] $_POST variable

2011-03-12 Thread Shawn McKenzie
On 03/12/2011 10:37 AM, tedd wrote: > At 9:28 PM +0200 3/11/11, Danny wrote: >> Hi guys, >> >> I have a form that has a long list of radio-bottons inside of it. The >> radio-buttons are dynamically created via php and MySQL. >> >> Here is an example of one of the radio buttons: >> >> > ?>" value="0

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 02:33 PM, Jim Lucas wrote: > On 3/11/2011 12:03 PM, Shawn McKenzie wrote: >> On 03/11/2011 01:28 PM, Danny wrote: >>> Hi guys, >>> >>> I have a form that has a long list of radio-bottons inside of it. The >>> radio-buttons are dynamically

[PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 01:28 PM, Danny wrote: > Hi guys, > > I have a form that has a long list of radio-bottons inside of it. The > radio-buttons are dynamically created via php and MySQL. > > Here is an example of one of the radio buttons: > > " > value="0"> > " > value="1"> > > Now, when I submit t

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-07 Thread Shawn McKenzie
On 03/05/2011 04:38 PM, Mark Kelly wrote: > Hi. > > Thanks for all the replies. > > On Saturday 05 Mar 2011 at 22:11 Simon J Welsh wrote: > >> On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote: >>> $regex = '/"([^"]+)"/'; > > Shawn,

[PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Shawn McKenzie
On 03/05/2011 09:26 AM, Mark Kelly wrote: > Hi. > > I'm hoping someone can help me extract text between double quotes from a > string. > > $regex = 'some magic'; > $r = preg_match($regex, $sentence, $phrases); > > So, if > > $sentence = 'Dave said "This is it". "Nope, that is the wrong colour

[PHP] Re: String Encodings - loose guidelines

2011-01-26 Thread Shawn McKenzie
On 01/25/2011 02:36 PM, Donovan Brooke wrote: > Hello, > > I don't yet have a complete understanding of string encodings for the > various environments they may need to pass through or be in. I have > found bits and pieces within Larry's book, the online docs, and by > googling... and > my app see

Re: [PHP] Installing PEAR

2011-01-25 Thread Shawn McKenzie
On 01/25/2011 11:25 AM, Nilesh Govindarajan wrote: > On 01/25/2011 10:32 PM, Ethan Rosenberg wrote: >> Dear List -- >> >> How do install PEAR on Linux? I installed lynx and as root, I ran the >> command lynx -source http://pear.php.net/go-pear | php. It seemed to >> install, but the command pear

Re: [PHP] Re: array to var - with different name

2011-01-21 Thread Shawn McKenzie
On 01/20/2011 05:26 PM, Tommy Pham wrote: > On Thu, Jan 20, 2011 at 2:49 PM, Shawn McKenzie wrote: >> On 01/20/2011 04:28 PM, Donovan Brooke wrote: >>> Hello again! >>> >>> I'm trying to find a good way to convert array key/value's to >>>

[PHP] Re: array to var - with different name

2011-01-20 Thread Shawn McKenzie
On 01/20/2011 04:28 PM, Donovan Brooke wrote: > Hello again! > > I'm trying to find a good way to convert array key/value's to > variable name values... but with the caveat of the name being > slightly different than the original key > (to fit my naming conventions). > > first, I (tediously) did

[PHP] Re: News Server Time Outs

2011-01-20 Thread Shawn McKenzie
On 01/19/2011 10:09 AM, Al wrote: > The newsgroup server seems to have a repeated-visit throttle, or whatever. > > For the last two weeks at least, I can only open 2 or 3 messages and > them I get repeated time-outs. It acts like the DoS or flood prevention > is kidding in to aggressively. > > A

Re: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Shawn McKenzie
On 10/25/2010 09:49 AM, Paul M Foster wrote: > On Sun, Oct 24, 2010 at 09:33:23PM -0400, Adam Richardson wrote: > > > >> This >> was after many criticisms were leveled against the use of magic quotes: >> http://en.wikipedi

Re: [PHP] floored by floor()

2010-10-14 Thread Shawn McKenzie
On 10/14/2010 09:22 AM, Mattias Thorslund wrote: > Thanks, I guess I needed to read that again. What confused me here was > that var_dump(327.03 * 100) returns the expected value and not something > like (float)32702.99... > > Cheers, > > Mattias > echo serialize(327.03 * 100); --

Re: [PHP] Question about news.php.net

2010-09-13 Thread Shawn McKenzie
On 09/13/2010 06:51 PM, MikeB wrote: > Daniel Brown wrote: >> >> I don't believe that we've been having any issues with the server, >> no. Are you using NNTP to connect? > > yes, NNTP. > >> You may want to consider using >> the HTTP-based RSS and/or RDF feeds if it continues to be an issue.

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-12 Thread Shawn McKenzie
On 09/12/2010 02:38 AM, Tamara Temple wrote: > > On Sep 11, 2010, at 10:46 PM, Shawn McKenzie wrote: >> It could however be a problem if there is a BOT or something that >> continually submits to your page. In that case (and in general) I would >> recommend using a for

[PHP] Re: php cli question

2010-09-11 Thread Shawn McKenzie
On 09/10/2010 11:13 AM, J Ravi Menon wrote: > Hi, > > I have some basic questions on running php (5.2.x series on Linux > 2.6) as a standalone daemon using posix methods (fork() etc..): > > #!/usr/bin/php > > require_once ('someclass.php'); > > // do some initializations > . > > // main 'for

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-11 Thread Shawn McKenzie
On 09/11/2010 11:52 AM, Tamara Temple wrote: > I have a general question and am looking for best practices. > > Suppose I present a user with a form for editing an entry in a table, > i.e., the form has filled in values from the existing table entry. > > Now, suppose they click on 'submit' withou

Re: [PHP] Encoding Ampersands

2010-07-29 Thread Shawn McKenzie
On 07/28/2010 11:29 PM, Rick Dwyer wrote: > So htmlentities() will work for "Green, Red & Blue"? > > Will it work for "htm?color=blue&number=2&letter="? > > --Rick For ampersands yes, for other things no. Use the correct tool for the job. To output HTML use htmlentities(). To pass in

[PHP] Re: PHP database interface layer

2010-07-22 Thread Shawn McKenzie
On 07/22/2010 08:35 AM, Marc Guay wrote: > Hi everyone, > > I've built a fairly large normalized database schema for a project. > This is fun for me as I like thinking about how everything is > interconnected. Foreign keys are all set up, many-to-many tables are > go, etc, and so on. But now it

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Shawn McKenzie
On 07/15/2010 04:40 PM, Leonardo wrote: > > Bad habit. I know. Did it fix it? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Shawn McKenzie
On 07/15/2010 10:51 AM, Leonardo wrote: > Hi everybody. I need to use exec() to run a background php script, but > it's not working properly. Take a look at this sample: > > a.php > >echo ' File A (1) '; > >exec('php b.php > output.txt &'); > >echo ' File A (2) '; > >?> >

[PHP] Re: validating form input

2010-07-09 Thread Shawn McKenzie
On 07/08/2010 02:38 PM, David Mehler wrote: > Hello, > Got a form that takes in data to enter in to a database. I want to > make it as secure and as invulnerable to sql injection and other > attacks as possible. I'm wondering if mysqli_real_escape_string or > stripslashes should be used or if the f

[PHP] Re: Multiple Access Question

2010-07-07 Thread Shawn McKenzie
On 07/07/2010 11:59 AM, tedd wrote: > Hi gang: > > I have *my way* of handling this problem, but I would like to hear how > you guys do it. > > Here's the problem -- let's say you have a database containing names and > addresses and you want "approved" users to be able to access the data. > As su

  1   2   3   4   5   6   7   8   9   10   >