php-general Digest 6 Jul 2007 14:28:47 -0000 Issue 4888

2007-07-06 Thread php-general-digest-help
php-general Digest 6 Jul 2007 14:28:47 - Issue 4888 Topics (messages 258385 through 258418): Re: PHP Courses in India 258385 by: Nathan Nobbe Re: PHP Brain Teasers 258386 by: tedd 258387 by: tedd 258388 by: Robert Cummings 258389 by: tedd

php-general Digest 7 Jul 2007 02:51:30 -0000 Issue 4889

2007-07-06 Thread php-general-digest-help
php-general Digest 7 Jul 2007 02:51:30 - Issue 4889 Topics (messages 258419 through 258439): Re: Getting WAY OT now Re: PHP Brain Teasers 258419 by: Daniel Brown 258433 by: tedd 258434 by: tedd Re: Using PHP to retrieve a Yahoo Groups Web Page 258420 by:

Re: [PHP] Adding the array in to each element of another one array

2007-07-06 Thread Jim Lucas
sivasakthi wrote: Hi Guys, I have a array like that below, $values = (name1 %we %tr , name2 %de.%ty %sd, name3 %we 5te %mt/% Hs); another one array like that, $tmp = (%tr, %uy, %xc); I need to add the array of $tmp in to each element of array $values.Also i need to add the $tmp array

[PHP] Possible configuration problem w/ php??

2007-07-06 Thread Jamie Dahl
So after I recently upgraded from php4 to php5 I noticed that email attachments 88k get truncated at 88k within squirrelmail/roundcube, however those same email attachments work just fine if I hit the imap server in thunderbird etc... Has anyone else run across this before? I've seen other

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Jochem Maas
Daniel Brown wrote: Let's get obscure try to guess it before running the code. It actually shouldn't be difficult. I tried to figure it out - I couldn't, I ran the code and I still don't get it. oh well :-) ? class Brainteaser { function

Re: [PHP] PHP Brain Teasers

2007-07-06 Thread Jochem Maas
tedd wrote: 2b || !2b this is not javascript dude. $_2b | ~$_2b; that said this is one of the coolest so far, nice one tedd. Cheers, tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Brain Teasers

2007-07-06 Thread Colin Guthrie
Jochem Maas wrote: Daniel Brown wrote: Let's get obscure try to guess it before running the code. It actually shouldn't be difficult. I tried to figure it out - I couldn't, I ran the code and I still don't get it. oh well :-) I'm guessing it's related to Don't put all your eggs in

[PHP] Re: PHP Brain Teasers

2007-07-06 Thread Colin Guthrie
tedd wrote: $actions $words It pretty much goes without saying. So I wont. My actions say it for me without words. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Brain Teasers

2007-07-06 Thread Brice
On 7/6/07, tedd [EMAIL PROTECTED] wrote: My favorite. /world End of the world. Great! Brice Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] About DREAMWEAVER

2007-07-06 Thread Ford, Mike
On 05 July 2007 20:19, Dan Shirah wrote: There is a Find and Replace function in Dreamweaver, but it is very specific and will only find specific words/tags. Not at all true. Dreamweaver has a fully-functional regexp search in both Text and Source Code modes. Cheers! Mike

Re: [PHP] Suggestion re: PHP Brain Teasers

2007-07-06 Thread David Robley
Steve Edberg wrote: At 7:37 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 16:27 -0700, Steve Edberg wrote: Proposal - Perhaps we could separate Brain Teasers, Obfuscated PHP challenges, and what-have-you to a separate mailing list, say php-fun (php-phun? PHPhun?)? Maybe

Re: [PHP] Suggestion re: PHP Brain Teasers

2007-07-06 Thread Jochem Maas
Steve Edberg wrote: At 7:37 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 16:27 -0700, Steve Edberg wrote: Proposal - Perhaps we could separate Brain Teasers, Obfuscated PHP challenges, and what-have-you to a separate mailing list, say php-fun (php-phun? PHPhun?)? Maybe

RE: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Kaleb Pomeroy
A ticket, a tasket, a red and yellow basket -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Friday, July 06, 2007 2:59 AM To: Daniel Brown Cc: Larry Garfield; php-general@lists.php.net Subject: Re: [PHP] Re: PHP Brain Teasers Daniel Brown wrote: Let's get

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown wrote: On 7/5/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: Which came first, the chicken or the

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Paul Novitski
At 7/5/2007 01:45 PM, Daniel Brown wrote: $objects-original_image = http://www.sewterific.com/images/Just%20Baskets/SmPicnicBasket.jpg;; $_SCRIPT[word] = task; $_SCRIPT[otherword] = ticket; $update_word1 = $_SCRIPT[word].et; $rgb1 = 134,89,32; $rgb2 = 231,223,48;

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Tijnema
On 7/6/07, tedd [EMAIL PROTECTED] wrote: At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown wrote: On 7/5/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote:

Re: [PHP] Getting WAY OT now Re: PHP Brain Teasers

2007-07-06 Thread David Restall - System Administrator
Hi, Tedd Wrote :- At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown wrote: On 7/5/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: Which came

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Daniel Brown
On 7/6/07, Paul Novitski [EMAIL PROTECTED] wrote: Without bothering to run the code I'd say a tisket, a tasket, a green and yellow basket. Very close. The RGB values actually give away the colors (brown and yellow), and through string replacement and appending, the words `task` and

Re: [PHP] Re: php security books

2007-07-06 Thread Chris Shiflett
Andrew Hutchings wrote: I prefer prepared statements and would use them all the time if it wasn't for the fact that those queries aren't cached until recent versions of MySQL 5.1 Use PDO. It emulates prepared statements and doesn't avoid the query cache:

Re: [PHP] About Website Search Engine

2007-07-06 Thread tedd
At 1:34 PM -0700 7/5/07, Kelvin Park wrote: I'm trying to build a search engine for my website (with php), it will have functions such as finding product names and their codes from the mysql database. Does anyone know any good tutorial or reference on any website, or any good books out there

Re: [PHP] PHP Brain Teasers

2007-07-06 Thread Daniel Brown
On 7/5/07, tedd [EMAIL PROTECTED] wrote: My favorite. /world Fan-freaking-tastic! I've never seen it before (I live under a rock), but it has so many potential uses. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 10:08 -0400, tedd wrote: At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown wrote: On 7/5/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-07-05 at 15:04 -0500, Kaleb

Re: [PHP] Getting WAY OT now Re: PHP Brain Teasers

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 15:19 +0100, David Restall - System Administrator wrote: Hi, Tedd Wrote :- At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown wrote: On 7/5/07, Robert Cummings [EMAIL

Re: [PHP] Getting WAY OT now Re: PHP Brain Teasers

2007-07-06 Thread Daniel Brown
On 7/6/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-07-06 at 15:19 +0100, David Restall - System Administrator wrote: Hi, Tedd Wrote :- At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown

Re: [PHP] Using PHP to retrieve a Yahoo Groups Web Page

2007-07-06 Thread Greg Donald
On 7/4/07, Alan Milnes [EMAIL PROTECTED] wrote: I have spent the afternoon trawling the web for how to retrieve a Yahoo Groups Web Page using PHP. The best option seems to be curl, which is installed on my host. I need to understand how to set the cookies so that Yahoo accepts my response.

Re: [PHP] Using PHP to retrieve a Yahoo Groups Web Page

2007-07-06 Thread Jim Lucas
Greg Donald wrote: On 7/4/07, Alan Milnes [EMAIL PROTECTED] wrote: I have spent the afternoon trawling the web for how to retrieve a Yahoo Groups Web Page using PHP. The best option seems to be curl, which is installed on my host. I need to understand how to set the cookies so that Yahoo

Re: [PHP] Using PHP to retrieve a Yahoo Groups Web Page

2007-07-06 Thread Alan Milnes
On 06/07/07, Greg Donald [EMAIL PROTECTED] wrote: Specifically you need these two options: CURLOPT_COOKIEFILE CURLOPT_COOKIEJAR http://us2.php.net/manual/en/function.curl-setopt.php Thanks - that was it. Alan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Possible configuration problem w/ php??

2007-07-06 Thread Dan
You should probably contact squrrelmail or roundcube, I believe they are both open source and they are more likely to know the cause of have heard of it before. - Dan Jamie Dahl [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So after I recently upgraded from php4 to php5 I

[PHP] Reading Error: socket '/var/lib/mysql/mysql.sock'

2007-07-06 Thread kvigor
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) FYI I did this to solved the problem but it didn't work: http://webyog.com/forums/lofiversion/index.php/t1367.html the only thing is that I'm running MySQL 5.0 (I have a my.ini not my.cfg) and I put the var

[PHP] Re: Reading Error: socket '/var/lib/mysql/mysql.sock'

2007-07-06 Thread kvigor
PROBLEM SOLVED had wrong db connection file on HOST SERVER. kvigor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) FYI I did this to solved the problem but it didn't work:

[PHP] Finding text in a variable

2007-07-06 Thread Alan Milnes
I have a piece of code which uses curl to get a web page and puts it into a variable. I now need to search that variable and find everything between `div class=msgarea` and the next `/div` From what I have found elsewhere I think I will need to use a regular expression but can anyone point me

Re: [PHP] Finding text in a variable

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 22:46 +0100, Alan Milnes wrote: I have a piece of code which uses curl to get a web page and puts it into a variable. I now need to search that variable and find everything between `div class=msgarea` and the next `/div` From what I have found elsewhere I think I will

[PHP] Where does PHP look for php.ini??

2007-07-06 Thread Tijnema
Hi, I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in /etc I have compiled php with --prefix=/usr, and my /usr/etc is symlinked to /etc, but it doesn't read the php.ini file.. when I use the CLI with -c /etc it works fine :) Tijnema -- Vote for PHP Color Coding in

[PHP] About PHP CMS

2007-07-06 Thread Kelvin Park
Is it possible to have PHP code completely separate from the HTML page that needs to be completely dynamic? (That's how ASP.NET sort of works I think). If this is possible, HTML CODE, PHP CODE, AND THE CSS CODE can be completely separate, increasing the clarity of all the source code. My second

Re: [PHP] About PHP CMS

2007-07-06 Thread Davi
Em Sexta 06 Julho 2007 21:24, Kelvin Park escreveu: Is it possible to have PHP code completely separate from the HTML page that needs to be completely dynamic? (That's how ASP.NET sort of works I think). If this is possible, HTML CODE, PHP CODE, AND THE CSS CODE can be completely separate,

Re: [PHP] Where does PHP look for php.ini??

2007-07-06 Thread Stut
Tijnema wrote: I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in /etc I have compiled php with --prefix=/usr, and my /usr/etc is symlinked to /etc, but it doesn't read the php.ini file.. when I use the CLI with -c /etc it works fine :) php -i on the command line, or

Re: [PHP] Where does PHP look for php.ini??

2007-07-06 Thread Tijnema
On 7/7/07, Stut [EMAIL PROTECTED] wrote: Tijnema wrote: I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in /etc I have compiled php with --prefix=/usr, and my /usr/etc is symlinked to /etc, but it doesn't read the php.ini file.. when I use the CLI with -c /etc it

Re: [PHP] Getting WAY OT now Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 3:19 PM +0100 7/6/07, David Restall - System Administrator wrote: Tedd Wrote :- As far as eggs are concerned, they predate fish considerably. As far as I'm aware, eggs don't predate anything. How could they - they don't have legs or mouths so couldn't eat anything if they could run to

Re: [PHP] Getting WAY OT now Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 10:32 AM -0400 7/6/07, Daniel Brown wrote: An article I just read this morning is quite fitting for this exact discussion: http://dsc.discovery.com/news/2007/07/02/bigbird_ani.html?category=animalsguid=20070702170030dcitc=w19-502-ak- Not a bad article, but just speculation based

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 10:24 AM -0400 7/6/07, Robert Cummings wrote: On Fri, 2007-07-06 at 10:08 -0400, tedd wrote: I doubt that one can demarcate the non-chicken parents from the chicken offspring. So... it is perplexing. We don't need to demarcate, we only need to know that it happened. Yes, but knowing

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 4:16 PM +0200 7/6/07, Tijnema wrote: From which point in the evolution do you call it a chicken egg? See it like bytes, is a fish egg, and is a chicken egg, then it went from fish egg to chicken egg like this: 0001 0011 0111 0001 0011 0111

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Tijnema
On 7/7/07, tedd [EMAIL PROTECTED] wrote: At 4:16 PM +0200 7/6/07, Tijnema wrote: From which point in the evolution do you call it a chicken egg? See it like bytes, is a fish egg, and is a chicken egg, then it went from fish egg to chicken egg like this: 0001 0011

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 21:40 -0400, tedd wrote: At 10:24 AM -0400 7/6/07, Robert Cummings wrote: On Fri, 2007-07-06 at 10:08 -0400, tedd wrote: I doubt that one can demarcate the non-chicken parents from the chicken offspring. So... it is perplexing. We don't need to demarcate, we only

[PHP] checking for duplicate values among five variables

2007-07-06 Thread Kenn Murrah
Can anyone help me with a way to determine of two or more variables have the same value? For instance, $a1 = 1000 $a2 = 2000 $a3 = 2000 $a4 = 4000 $a5 = 5000 I want check these five variables and determine whether, as in this case, two or more of the variables have the same value. Any

Re: [PHP] checking for duplicate values among five variables

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 21:51 -0500, Kenn Murrah wrote: Can anyone help me with a way to determine of two or more variables have the same value? For instance, $a1 = 1000 $a2 = 2000 $a3 = 2000 $a4 = 4000 $a5 = 5000 I want check these five variables and determine whether, as in this

Re: [PHP] checking for duplicate values among five variables

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 23:03 -0400, Robert Cummings wrote: On Fri, 2007-07-06 at 21:51 -0500, Kenn Murrah wrote: Can anyone help me with a way to determine of two or more variables have the same value? For instance, $a1 = 1000 $a2 = 2000 $a3 = 2000 $a4 = 4000 $a5 = 5000 I

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread heavyccasey
Isn't this a PHP list? Why is there discussion about chickens? if ($this == PHP List) { unset('chicken discussion!'); } On 7/6/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-07-06 at 21:40 -0400, tedd wrote: At 10:24 AM -0400 7/6/07, Robert Cummings wrote: On Fri, 2007-07-06 at

[PHP] Inserting single quotes

2007-07-06 Thread skip evans
Hey all, I have the following in a text field in the database. 'u',0,'account',1 One my dev server if I update this in the database I get the same string. On my production server I get this: \'u\',0,\'account\',1 I thought setting magic_quotes=Off would disable this, but it did not. Can

Re: [PHP] Inserting single quotes

2007-07-06 Thread skip evans
I'm sorry, I totally misnamed the subject of this email. It's the slashes that are getting inserted, but as I said only on one server, not the other. So I don't want to change the code, if I can help it. I hope there is a setting that will prevent this from happening. Skip base64 wrote:

Re: [PHP] Inserting single quotes

2007-07-06 Thread Chris
The ini setting is magic_quotes_gpc ( http://www.php.net/ref.info#ini.magic-quotes-gpc ). If that doesn't work the it's mostly like an issue in your code, make sure there aren't any differences. Chris skip evans wrote: I'm sorry, I totally misnamed the subject of this email. It's the

Re: [PHP] Inserting single quotes

2007-07-06 Thread skip evans
Yes, it turns out the production server did not have a php.ini file!!! I copied the php.ini-recommended file into place, and it has magic_quotes_gpc off and that did the trick. Thanks much! Skip Chris wrote: The ini setting is magic_quotes_gpc (