php-general Digest 4 Jul 2007 13:32:56 -0000 Issue 4884

2007-07-04 Thread php-general-digest-help
php-general Digest 4 Jul 2007 13:32:56 - Issue 4884 Topics (messages 258212 through 258236): Re: PHP Brain Teasers 258212 by: Robert Cummings 258225 by: Colin Guthrie 258226 by: Colin Guthrie 258236 by: tedd Re: how PHP is batter? 258213 by: Robert

Re: [PHP] Re: how PHP is batter?

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED] (Chris) wrote: Either phrase can be a good or a bad thing, it all depends on tone - Scottish is very like Japanese in that respect :p with regard to batter - isn't it the scots that have pechant for covering marsbars with the stuff and

Re: [PHP] Re: how PHP is batter?

2007-07-04 Thread Chris
Andrew Hutchings wrote: In article [EMAIL PROTECTED] [EMAIL PROTECTED] (Chris) wrote: Either phrase can be a good or a bad thing, it all depends on tone - Scottish is very like Japanese in that respect :p with regard to batter - isn't it the scots that have pechant for covering

Re: [PHP] how PHP is batter?

2007-07-04 Thread Crayon Shin Chan
On Tuesday 03 July 2007 21:52, Stut wrote: In short words it's not Micro$oft and you don't need to buy stuff to develop in it. You have never needed to buy anything to develop ASP.net applications. However, remember that many of the functions and extensions that PHP has builtin are free

Re: [PHP] how PHP is batter?

2007-07-04 Thread Crayon Shin Chan
On Tuesday 03 July 2007 22:56, Stut wrote: I saw there is a free version of Studio, but I think it's for students... You cannot go build a corporate project with it I think... More FUD. Go read the licence before claiming to know what it says! Regardless, the Express version has strings

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Jochem Maas wrote: Jochem Maas wrote: three for the price of one, cheap at half the price ... for ($me = 1; $you = $me; $me++); One for me and one for you? Everything that is mine is yours? To me, to you? $u = create_function(\$bond, if (\$bond 2) echo \live\; else die();)

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Robert Cummings wrote: On Tue, 2007-07-03 at 21:26 +0100, David Restall - System Administrator wrote: Hi, there are two in this one :- function Cat($Danger = ) { static int $Lives = 9; if (preg_match(/^curiosity$/i, $Danger)) die(Cat Killed); $Threats

[PHP] spliting the elements in array

2007-07-04 Thread sivasakthi
Hi Guys, I have the array like below, squid %tu %tl %mt %A test %st.%hs %a %m %tu %th %Hs %Ss test1 %tv %tr %Hs.%Ss %mt In that i need to split the log name of each line, example : squid,test,test1 in to another array.. could you help me to find the solution? Thanks, Siva

[PHP] Re: spliting the elements in array

2007-07-04 Thread M. Sokolewicz
sivasakthi wrote: Hi Guys, I have the array like below, squid %tu %tl %mt %A test %st.%hs %a %m %tu %th %Hs %Ss test1 %tv %tr %Hs.%Ss %mt In that i need to split the log name of each line, example : squid,test,test1 in to another array.. could you help me to find the solution?

Re: [PHP] mail function problem

2007-07-04 Thread web2
Chris a écrit : Try this: ? $email = [EMAIL PROTECTED]; $headers = From: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; if(mail([EMAIL PROTECTED],essai,test,$headers)) { echo OK: .ini_get('sendmail_path'); } else { echo NOK: .ini_get('sendmail_path'); } ? Note Same

Re: [PHP] mail function problem

2007-07-04 Thread Chris
web2 wrote: Chris a écrit : Try this: ? $email = [EMAIL PROTECTED]; $headers = From: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; if(mail([EMAIL PROTECTED],essai,test,$headers)) { echo OK: .ini_get('sendmail_path'); } else { echo NOK: .ini_get('sendmail_path'); } ?

Re: [PHP] Re: spliting the elements in array

2007-07-04 Thread sivasakthi
Thanks for your response.. Actually i have the collections of strings like, $not_quite_an_array = 'squid %tu %tl %mt %A test %st.%hs %a %m %tu %th %Hs %Ss test1 %tv %tr %Hs.%Ss %mt'; from that i need to split name of each line.. Thanks.. On Wed, 2007-07-04 at 11:26 +0200, M. Sokolewicz

Re: [PHP] Re: spliting the elements in array

2007-07-04 Thread Stut
sivasakthi wrote: Thanks for your response.. Actually i have the collections of strings like, $not_quite_an_array = 'squid %tu %tl %mt %A test %st.%hs %a %m %tu %th %Hs %Ss test1 %tv %tr %Hs.%Ss %mt'; from that i need to split name of each line.. $names = array(); foreach (explode(\n,

[PHP] php security books

2007-07-04 Thread Ross
http://amazon.co.uk/s/ref=nb_ss_w_h_/203-1671317-2810350?initialSearch=1url=search-alias%3Dapsfield-keywords=php+securityGo.x=0Go.y=0Go=Go looking at the top 3 on the list here, personally I quite like the O'Reilly books. Can someone recommend one of these or any other that will give me a

Re: [PHP] Re: PHP Brain Teasers (SPOILER)

2007-07-04 Thread Jochem Maas
Colin Guthrie wrote: Jochem Maas wrote: Jochem Maas wrote: three for the price of one, cheap at half the price ... for ($me = 1; $you = $me; $me++); One for me and one for you? correct! Everything that is mine is yours? To me, to you? $u = create_function(\$bond, if (\$bond 2)

[PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED](Ross) wrote: http://amazon.co.uk/s/ref=nb_ss_w_h_/203-1671317-2810350?initialSearch =1url=search-alias%3Dapsfield-keywords=php+securityGo.x=0Go.y=0Go =Go looking at the top 3 on the list here, personally I quite like the O'Reilly books.

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread tedd
Hi, there are two in this one :- function Cat($Danger = ) { static int $Lives = 9; if (preg_match(/^curiosity$/i, $Danger)) die(Cat Killed); $Threats = array(dog, flu, fall, drowning); if (in_array(strtolower($Danger), $Threats))

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread tedd
Try this: -(4 * 20 + 7) tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: spliting the elements in array

2007-07-04 Thread Fredrik Thunberg
Stut skrev: sivasakthi wrote: Thanks for your response.. Actually i have the collections of strings like, $not_quite_an_array = 'squid %tu %tl %mt %A test %st.%hs %a %m %tu %th %Hs %Ss test1 %tv %tr %Hs.%Ss %mt'; from that i need to split name of each line.. $names = array(); foreach

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Jochem Maas
this one should be easy: function work($v) { echo $v,; } foreach(array_merge(range(9,12),range(1,5)) as $ing) work($ing); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: developer seeking document writer

2007-07-04 Thread tedd
At 5:16 AM +0200 7/4/07, Jochem Maas wrote: adel wrote: hello? why am not getting any reply!? because nobody really wants to write documentation? not even for their own stuff, let alone someone else's. the lack of reply suggests no one is interested - this is not uncommon - it's very hard

Re: [PHP] php security books

2007-07-04 Thread tedd
At 11:22 AM +0100 7/4/07, Ross wrote: http://amazon.co.uk/s/ref=nb_ss_w_h_/203-1671317-2810350?initialSearch=1url=search-alias%3Dapsfield-keywords=php+securityGo.x=0Go.y=0Go=Go looking at the top 3 on the list here, personally I quite like the O'Reilly books. Can someone recommend one of these

Re: [PHP] Re: developer seeking document writer

2007-07-04 Thread tedd
At 4:38 AM + 7/4/07, adel wrote: On 7/4/07, Jochem Maas [EMAIL PROTECTED] wrote: adel wrote: hello? why am not getting any reply!? because nobody really wants to write documentation? not even for their own stuff, let alone someone else's. the lack of reply suggests no one is interested

Re: [PHP] Re: developer seeking document writer

2007-07-04 Thread Stut
tedd wrote: At 4:38 AM + 7/4/07, adel wrote: On 7/4/07, Jochem Maas [EMAIL PROTECTED] wrote: adel wrote: hello? why am not getting any reply!? because nobody really wants to write documentation? not even for their own stuff, let alone someone else's. the lack of reply suggests no one

Re: [PHP] PHP Brain Teasers

2007-07-04 Thread tedd
$chickens = 1000; $roost = 0 $home = false; while ($chickens != $roost) { $chickens--; $roost++; } $home = true; Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP Brain Teasers

2007-07-04 Thread Stut
tedd wrote: $chickens = 1000; $roost = 0 $home = false; while ($chickens != $roost) { $chickens--; $roost++; } $home = true; The chickens have come home to roost. class Here { private $chickens; } -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 10:18 -0400, tedd wrote: $chickens = 1000; $roost = 0 $home = false; while ($chickens != $roost) { $chickens--; $roost++; } $home = true; When the chickens come home to roost. Cheers, Rob. --

Re: [PHP] Re: developer seeking document writer

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 10:04 -0400, tedd wrote: At 5:16 AM +0200 7/4/07, Jochem Maas wrote: adel wrote: hello? why am not getting any reply!? because nobody really wants to write documentation? not even for their own stuff, let alone someone else's. the lack of reply suggests no one is

Re: [PHP] Re: php security books

2007-07-04 Thread Mark Kelly
Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote: Avoid the O'Reilly one as it is flawed. In what way? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Jochem Maas wrote: this one should be easy: function work($v) { echo $v,; } foreach(array_merge(range(9,12),range(1,5)) as $ing) work($ing); dollyWorkin' 9 til' 5/dolly On a similar theme: function jack($all) { static int $play = 0; if ($all == 'work' !$play) return

Re: [PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED](Mark Kelly) wrote: Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote: Avoid the O'Reilly one as it is flawed. In what way? Its written by Chris Shiflett, isn't that enough reason? -- Andrew Hutchings - LinuxJedi -

Re: [PHP] Re: php security books

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 11:23 -0400, Andrew Hutchings wrote: In article [EMAIL PROTECTED] [EMAIL PROTECTED](Mark Kelly) wrote: Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote: Avoid the O'Reilly one as it is flawed. In what way? Its written by Chris Shiflett,

Re: [PHP] Re: php security books

2007-07-04 Thread Stut
Andrew Hutchings wrote: In article [EMAIL PROTECTED] [EMAIL PROTECTED](Mark Kelly) wrote: Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote: Avoid the O'Reilly one as it is flawed. In what way? Its written by Chris Shiflett, isn't that enough reason? There's no need

[PHP] Re: Re 2D: [ 2CPHP 2D] 2CRe 2D: 2Cphp security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED] (Stut) wrote: Andrew Hutchings wrote: In article [EMAIL PROTECTED] [EMAIL PROTECTED](Mark Kelly) wrote: Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote: Avoid the O'Reilly one as it is flawed. In

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Stut wrote: class Here { private $chickens; } -Stut What you do in your private live with chickens is a mystery to us all Stut.. :p Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Zoltán Németh
2007. 07. 4, szerda keltezéssel 16.20-kor Colin Guthrie ezt írta: Jochem Maas wrote: this one should be easy: function work($v) { echo $v,; } foreach(array_merge(range(9,12),range(1,5)) as $ing) work($ing); dollyWorkin' 9 til' 5/dolly On a similar theme: function

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Stut
Colin Guthrie wrote: Stut wrote: class Here { private $chickens; } -Stut What you do in your private live with chickens is a mystery to us all Stut.. :p Nobody 'ere but us chickens. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-04 Thread kvigor
where is the part that it join()'s things together? it's: $in_list = '.join(',',$list).'; what is the output of the join() call it's: '7orange50lbs','8purple60lbs' //once echo'd $query_One = SELECT * FROM shoe WHERE CONCAT(size,color,weight) IN({$in_list}); This is the results of $query_One:

[PHP] Re: Memory_limit higher than 256MB

2007-07-04 Thread Tobias Vollmer
Sorry, I forgot the PHPinfo. I hope it contains everything you need. Thanks again. Tobias Vollmer -- phpinfo() -- PHP Version 5.2.0-8+etch4 System Linux 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 Build Date May 13 2007 18:12:39 Server API Apache 2.0

[PHP] Memory_limit higher than 256MB

2007-07-04 Thread Tobias Vollmer
Hello group. I have a debian etch install with PHP5.2.0-8. For a backup Script of a Typo3-Database I need to temporarily increase the memory_limit to, say, 512MB. Unfortunatly I still get an Error-Message --- Fatal error: Allowed memory size of 268435456 bytes exhausted [...] --- even if I

Re: [PHP] Re: php security books

2007-07-04 Thread Nathan Nobbe
this is getting good; i want to know why its *flawed* now too. no pressure :) -nathan On 7/4/07, Stut [EMAIL PROTECTED] wrote: Andrew Hutchings wrote: In article [EMAIL PROTECTED] [EMAIL PROTECTED](Mark Kelly) wrote: Hi. On Wednesday 04 July 2007 13:01, Andrew Hutchings wrote:

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Larry Garfield
On Wednesday 04 July 2007, tedd wrote: Try this: -(4 * 20 + 7) tedd Four score and seven years ago... Thanks Abe. :-) Try this one: foreach ($actions as $action) { $actions[] = -$action; } This is fun. :-) -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED]

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

2007-07-04 Thread Alan Milnes
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. The code I have is:-

Re: [PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED]quickshift [EMAIL PROTECTED] (Nathan Nobbe) wrote: --=_Part_178329_18179255.1183569772294 Content-Type: text/plain; charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bit Content-Disposition: inline this is getting good; i want to know why its

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Larry Garfield wrote: Try this one: foreach ($actions as $action) { $actions[] = -$action; } This is fun. :-) Every action has an equal and opposite reaction! I think I'm addicted. We should publish a book. It would rival sudoku! Col -- PHP General Mailing List

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 12:31 -0500, Larry Garfield wrote: On Wednesday 04 July 2007, tedd wrote: Try this: -(4 * 20 + 7) tedd Four score and seven years ago... Thanks Abe. :-) Try this one: foreach ($actions as $action) { $actions[] = -$action; } This is fun. :-) For

Re: [PHP] Re: php security books

2007-07-04 Thread Jochem Maas
Andrew Hutchings wrote: In article [EMAIL PROTECTED]quickshift [EMAIL PROTECTED] (Nathan Nobbe) wrote: --=_Part_178329_18179255.1183569772294 Content-Type: text/plain; charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bit Content-Disposition: inline this is getting

Re[2]: [PHP] Re: php security books

2007-07-04 Thread Richard Davey
Hi Andrew, Wednesday, July 4, 2007, 4:23:38 PM, you wrote: Avoid the O'Reilly one as it is flawed. In what way? Its written by Chris Shiflett, isn't that enough reason? No, not really. The errata are clearly published online, and while you could argue that some of them shouldn't have

RE: [PHP] Re: php security books

2007-07-04 Thread bruce
andrew... are you sure about this... i would have thought that if you have an apache user 'apache' and allow php to be run as/by 'apache' than this would provide complete access to anything php needs to do as 'apache'. this should definitely work if you allow the 'group' for the apache err log

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 14:26 -0400, Robert Cummings wrote: On Wed, 2007-07-04 at 12:31 -0500, Larry Garfield wrote: On Wednesday 04 July 2007, tedd wrote: Try this: -(4 * 20 + 7) tedd Four score and seven years ago... Thanks Abe. :-) Try this one: foreach

[PHP] Re: Re 2D: [ 2CPHP 2D] 2CRe 2D: 2Cphp security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED](Jochem Maas) wrote: OK, well, for example page 3 of the book suggests making PHP output errors into Apache's error_log. To do this on Linux it means PHP would have to be run as root. huh? funny thing is that on all the machines I work

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Robert Cummings wrote: For every action there is an equal and opposite reaction. Thanks Abe, Sir Abraham Newton - father of modern mechanics! :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 19:38 +0100, Colin Guthrie wrote: Robert Cummings wrote: For every action there is an equal and opposite reaction. Thanks Abe, Sir Abraham Newton - father of modern mechanics! It's the new physics where you have to lobby to get things to move :/ Cheers, Rob. --

[PHP] Question re virtual and scope of definitions

2007-07-04 Thread spam
Hi, today I wanted to use virtual (an `include' wasn't an option) to get the output from another PHP script. I got errors about functions being already defined, which is true since in both scripts are functions of the same name. I always thought virtual makes an Apache subrequest which gives me a

Re: RE: [PHP] Re: php security books

2007-07-04 Thread Nathan Nobbe
the root user issue aside, i still dedicate a separate file in /var/log for my php apps. -nathan On 7/4/07, Andrew Hutchings [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED][EMAIL PROTECTED] (bruce) wrote: andrew... ¾ are you sure about this... i would have thought that if you have

Re: RE: [PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED][EMAIL PROTECTED] (bruce) wrote: andrew... are you sure about this... i would have thought that if you have an apache user 'apache' and allow php to be run as/by 'apache' than this would providecomplete access to anything php needs to do as 'apache'. Logging

Re: RE: [PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED]quickshifti [EMAIL PROTECTED] (Nathan Nobbe) wrote: [EMAIL PROTECTED] Content-Type: text/plain; charsetãO-8859-1; format\owedContent-Transfer-Encoding: quoted-printable Content-Disposition: inline the root user issue aside, i still dedicate a separate file

Re: Re[2]: [PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED](Richard Davey) wrote: Hi Andrew, Wednesday, July 4, 2007, 4:23:38 PM, you wrote: Avoid the O'Reilly one as it is flawed. In what way? Its written by Chris Shiflett, isn't that enough reason? No, not really. The errata are

Re: [PHP] getting timestamp for first day of current week

2007-07-04 Thread Olav Mørkrid
On 03/07/07, Robert Cummings [EMAIL PROTECTED] wrote: If that's ALWAYS the case then it sounds like you have all the information you need to get the Monday you want :) what do you mean? php clearly makes a mistake in giving monday of the current week. -- PHP General Mailing List

Re: [PHP] getting timestamp for first day of current week

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 22:14 +0200, Olav Mørkrid wrote: On 03/07/07, Robert Cummings [EMAIL PROTECTED] wrote: If that's ALWAYS the case then it sounds like you have all the information you need to get the Monday you want :) what do you mean? php clearly makes a mistake in giving monday

Re: [PHP] Re: developer seeking document writer

2007-07-04 Thread adel
to reply you all Anthony Hiscox tedd agree, PHP frameworks is nothing new, almost all of them is well documented and can output HTML but... it is VALID HTML? look this web site am developing using my framework [1] it validates [2] and now look at original HTML source code [3], this framework

Re: [PHP] Re: php security books

2007-07-04 Thread Mario Guenterberg
On Wed, Jul 04, 2007 at 11:36:06AM -0700, bruce wrote: andrew... are you sure about this... i would have thought that if you have an apache user 'apache' and allow php to be run as/by 'apache' than this would provide complete access to anything php needs to do as 'apache'. this should

Re[4]: [PHP] Re: php security books

2007-07-04 Thread Richard Davey
Hi Andrew, Wednesday, July 4, 2007, 8:29:51 PM, you wrote: I have no doubt he is a great bloke and a great public speaker / PR for PHP application level security, I apologise if it sounded like FUDing (why does that sound dirty?). I just don't like / agree with his book or some of the

Re: [PHP] php security books

2007-07-04 Thread jekillen
On Jul 4, 2007, at 3:22 AM, Ross wrote: http://amazon.co.uk/s/ref=nb_ss_w_h_/203-1671317-2810350? initialSearch=1url=search-alias%3Dapsfield- keywords=php+securityGo.x=0Go.y=0Go=Go looking at the top 3 on the list here, personally I quite like the O'Reilly books. Can someone recommend

Re: [PHP] Memory_limit higher than 256MB

2007-07-04 Thread Chris
Tobias Vollmer wrote: Hello group. I have a debian etch install with PHP5.2.0-8. For a backup Script of a Typo3-Database I need to temporarily increase the memory_limit to, say, 512MB. Unfortunatly I still get an Error-Message --- Fatal error: Allowed memory size of 268435456 bytes exhausted

Re: [PHP] Question re virtual and scope of definitions

2007-07-04 Thread Chris
(Karl Pflästerer) wrote: Hi, today I wanted to use virtual (an `include' wasn't an option) to get the output from another PHP script. I got errors about functions being already defined, which is true since in both scripts are functions of the same name. I always thought virtual makes an Apache

[PHP] HTML in database

2007-07-04 Thread Bruce Cowin
I am writing code to store a bunch of email files, in MIME format, into a database. The body of some of these emails, but not all, are in HTML format. If I use addslashes (after checking get_magic_quotes_gpc()), the database record won't get saved. There's no error message, just no record

Re: [PHP] HTML in database

2007-07-04 Thread Chris
Bruce Cowin wrote: I am writing code to store a bunch of email files, in MIME format, into a database. The body of some of these emails, but not all, are in HTML format. If I use addslashes (after checking get_magic_quotes_gpc()), the database record won't get saved. There's no error

Re: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. Regards, Bruce Chris [EMAIL PROTECTED] 5/07/2007 12:10:17 p.m. Bruce Cowin wrote: I am writing code to store a bunch of email files, in MIME format, into a database. The

Re[2]: [PHP] HTML in database

2007-07-04 Thread Richard Davey
Hi Bruce, Thursday, July 5, 2007, 1:26:01 AM, you wrote: Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. MSSQL treats '' as an escaped ', not \' like MySQL does. So you can't addslashes it. Perform your own ' to ''

Re[3]: [PHP] HTML in database

2007-07-04 Thread Richard Davey
Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. MSSQL treats '' as an escaped ', not \' like MySQL does. So you can't addslashes it. Perform your own ' to '' conversion. And to reply to my own reply :) ... If you can, use

Re: [PHP] simple OCR in php

2007-07-04 Thread Ray
On Tuesday 03 July 2007 12:03 am, Richard Lynch wrote: On Sat, June 30, 2007 12:12 pm, Jay Blanchard wrote: [snip] In short PHP cannot perform OCR functions. Why? PHP provides all requisite functions/features so if someone was sadistic enough and talented enough there's nothing to

Re: [PHP] HTML in database

2007-07-04 Thread Chris
Bruce Cowin wrote: Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. Ahh - sorry, missed that in your original post. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/)

Re: Re[3]: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
Oh, thanks very much. I didn't know about PDO before. I wish I had before I had written my own db class! :-) Thanks again and I'll try it out. Regards, Bruce Richard Davey [EMAIL PROTECTED] 5/07/2007 12:38:02 p.m. Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I

Re: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
Me too. :-) I appreciated your quick response, though. Regards, Bruce Chris [EMAIL PROTECTED] 5/07/2007 1:14:58 p.m. Bruce Cowin wrote: Thanks. Sorry, I should have mentioned I'm using MS Sql Server and I don't see a mssql equivalent to that function. Ahh - sorry, missed that in your

[PHP] PHP as a strategic BUSINESS language

2007-07-04 Thread Mark Allen
I had high hopes for it when I started down the path, and was glad to find this list thinking that it would be a great resource for using PHP to help solve BUSINESS issues but basically 80% of the questions have nothing to do with BUSINESS issues but how do I do X questions which IMO should NOT

Re: Re[2]: [PHP] HTML in database

2007-07-04 Thread Bruce Cowin
I was still having the same problems even with PDO, but doing my own replace: $body = str_replace(', \, $body); fixed the problem. Thanks again! Regards, Bruce Richard Davey [EMAIL PROTECTED] 5/07/2007 12:34:29 p.m. Hi Bruce, Thursday, July 5, 2007, 1:26:01 AM, you wrote: Thanks.

Re: Re[4]: [PHP] Re: php security books

2007-07-04 Thread Andrew Hutchings
In article [EMAIL PROTECTED] [EMAIL PROTECTED](Richard Davey) wrote: I actually agree with you about Ilia's book, it is the best of the three available (the Pro PHP Security one is certainly the worst), although there are areas where even Ilia basically shrugs his shoulders in the text and

Re: [PHP] PHP as a strategic BUSINESS language

2007-07-04 Thread Larry Garfield
Wow. If you're going to be a troll, try and come up with something even vaguely intelligent to say. :-) If you want a language that solves business issues, try COBOL. *snicker* Programming languages are a tool to logic problems. People solve business problems using logic. Anyone who claims