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
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
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
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
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
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();)
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
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
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?
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
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');
}
?
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
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,
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
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)
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.
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))
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
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
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
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
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
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
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
$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:
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
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.
--
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
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
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
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 -
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,
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
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
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
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
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,
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:
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
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
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:
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]
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:-
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
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
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
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
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
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
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
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
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
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.
--
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
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
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
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
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
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
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
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
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
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
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
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
(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
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
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
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
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 ''
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
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
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/)
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
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
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
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.
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
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
79 matches
Mail list logo