php-general Digest 27 Sep 2008 15:42:22 -0000 Issue 5705

2008-09-27 Thread php-general-digest-help
php-general Digest 27 Sep 2008 15:42:22 - Issue 5705 Topics (messages 281020 through 281037): Re: The Data Literacy Test: Interpretation Added 281020 by: Shelley 281021 by: Shelley 281022 by: Robert Cummings event feeder 281023 by: Alain Roger Re: Sepating

php-general Digest 28 Sep 2008 04:37:09 -0000 Issue 5706

2008-09-27 Thread php-general-digest-help
php-general Digest 28 Sep 2008 04:37:09 - Issue 5706 Topics (messages 281038 through 281064): Re: Regular Expression Backreference in subpattern. 281038 by: Nathan Rixham 281044 by: Al 281047 by: Shiplu 281048 by: Richard Lynch 281049 by: Shiplu

[PHP] event feeder

2008-09-27 Thread Alain Roger
Hi, i would like to display on my web application, the latest 3 events added to my web DB. something like latest 3 event which happen to company. what is the best way knowing that each event is translated in several languages and stored into DB ? should i directly read latest 3 events from DB

Re: [PHP] Sepating MySQL result set into html tables

2008-09-27 Thread Thodoris
O/H Robert Cummings ??: On Fri, 2008-09-26 at 14:41 -0400, Robert Cummings wrote: On Fri, 2008-09-26 at 21:23 +0300, Thodoris wrote: On Fri, 2008-09-26 at 13:50 -0400, [EMAIL PROTECTED] wrote: Might I suggest you count the fields and divide it by the cols you want to

[PHP] Prevent execution bad commands

2008-09-27 Thread Manoj Singh
Hi All, I am developing a web page where i have to display the files list based on some search criteria and of certain duration. My web server is on linux operating system. The command i am using for this peropse is: find /home/test -mtime -$duration | sort | xargs grep -l $search_criteria Is

[PHP] PHP + Cron jobs

2008-09-27 Thread Waynn Lue
This is something that I've noticed for awhile, but last post to this mailing list reminded me that someone probably already knows how to work around this! I have a cron job that looks something like 12 6 * * * php /home/foo/temp.php But even if temp.php doesn't output anything, I still get

Re: [PHP] PHP + Cron jobs

2008-09-27 Thread Per Jessen
Waynn Lue wrote: This is something that I've noticed for awhile, but last post to this mailing list reminded me that someone probably already knows how to work around this! I have a cron job that looks something like 12 6 * * * php /home/foo/temp.php But even if temp.php doesn't output

Re: [PHP] PHP + Cron jobs

2008-09-27 Thread Waynn Lue
This is something that I've noticed for awhile, but last post to this mailing list reminded me that someone probably already knows how to work around this! I have a cron job that looks something like 12 6 * * * php /home/foo/temp.php But even if temp.php doesn't output anything,

Re: [PHP] PHP + Cron jobs

2008-09-27 Thread Per Jessen
Waynn Lue wrote: I actually am using MAILTO, and that's where the problem is. A cronjob only mails when there actually is output, which I'm fine with. In fact, when I run php temp.php from the command line, I don't get any output. But when it's part of the cronjob, there's that

Re: [PHP] PHP + Cron jobs

2008-09-27 Thread Waynn Lue
Hm looks like it's CLI. $ php -v PHP 5.2.6 (cli) (built: Aug 11 2008 13:36:00) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with Advanced PHP Debugger (APD) v0.9, , by George Schlossnagle

Re: [PHP] Prevent execution bad commands

2008-09-27 Thread Ashley Sheridan
On Sat, 2008-09-27 at 14:45 +0530, Manoj Singh wrote: Hi All, I am developing a web page where i have to display the files list based on some search criteria and of certain duration. My web server is on linux operating system. The command i am using for this peropse is: find /home/test

Re: [PHP] PHP + Cron jobs

2008-09-27 Thread Per Jessen
Waynn Lue wrote: Hm looks like it's CLI. $ php -v PHP 5.2.6 (cli) (built: Aug 11 2008 13:36:00) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with Advanced PHP Debugger (APD) v0.9, , by George Schlossnagle Yep, looks good - check

Re: [PHP] Prevent execution bad commands

2008-09-27 Thread Lupus Michaelis
Ashley Sheridan a écrit : find /home/test -mtime -$duration | sort | xargs grep -l $search_criteria It's likely yes, unless you validate the search criteria in any way, you're just asking for trouble. I just add an exemple that delete evérything on your server : $searh_criteria = `rm

Re: [PHP] PHP + Cron jobs

2008-09-27 Thread Thodoris
O/H Waynn Lue ??: This is something that I've noticed for awhile, but last post to this mailing list reminded me that someone probably already knows how to work around this! I have a cron job that looks something like 12 6 * * * php /home/foo/temp.php But even if temp.php doesn't output

Re: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Thodoris
Hello all, Is there a way to limit the memory consumption and / or the CPU consumption of processes launched by the php functions system, exec, passthru, proc_open and shell_exec? We use mod_php with an apache (mpm-prefork) on Linux. The following settings don't have any effect at all: PHP:

[PHP] Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in E:\src\php\WebEngine\- on line 4

Re: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Thodoris
O/H Thodoris έγραψε: Hello all, Is there a way to limit the memory consumption and / or the CPU consumption of processes launched by the php functions system, exec, passthru, proc_open and shell_exec? We use mod_php with an apache (mpm-prefork) on Linux. The following settings don't have

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Nathan Rixham
Shiplu wrote: The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in

RE: [PHP] event feeder

2008-09-27 Thread Richard Lynch
i would like to display on my web application, the latest 3 events added to my web DB. something like latest 3 event which happen to company. what is the best way knowing that each event is translated in several languages and stored into DB ? should i

Re: [PHP] Prevent execution bad commands

2008-09-27 Thread Daniel Brown
On Sat, Sep 27, 2008 at 5:15 AM, Manoj Singh [EMAIL PROTECTED] wrote: Hi All, I am developing a web page where i have to display the files list based on some search criteria and of certain duration. My web server is on linux operating system. The command i am using for this peropse is: find

RE: [PHP] Prevent execution bad commands

2008-09-27 Thread Richard Lynch
I am developing a web page where i have to display the files list based on some search criteria and of certain duration. My web server is on linux operating system. The command i am using for this peropse is: find /home/test -mtime -$duration | sort |

RE: [PHP] PHP + Cron jobs

2008-09-27 Thread Richard Lynch
You are using the old school PHP CGI as if it were PHP CLI. Upgrade and use PHP CLI. Or just add -q to the args: 12 6 * * * php -q /home/foo/temp.php php -h will show you the version and nature (CLI/CGI) of PHP you are running, as well as the args and what they do, in rather terse format.

RE: [PHP] PHP + Cron jobs

2008-09-27 Thread Richard Lynch
From: Waynn Lue [EMAIL PROTECTED] Sent: Saturday, September 27, 2008 6:04 AM To: Per Jessen Cc: php-general@lists.php.net Subject: Re: [PHP] PHP + Cron jobs This is something that I've noticed for awhile, but last post to this mailing list reminded me

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Al
What's the complete row? e.g., trtdcharge/tdtd100/td/tr Or, are there other td cells in the row? Shiplu wrote: The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP

RE: [PHP] PHP + Cron jobs

2008-09-27 Thread Richard Lynch
___ O/H Waynn Lue ??: Perhaps this would do the job much better. 12 6 * * * php -f /home/foo/temp.php Probably no different, unless the new-fangled -f implies -q, and he's running the new version of PHP, which I doubt. Also consider an alternative

RE: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Richard Lynch
memory_limit and time_limit are implemented down in the guts of the PHP interpreter; They are not magic. They can't do diddly when PHP is running some other binary... From: Thodoris [EMAIL PROTECTED] Sent: Saturday, September 27, 2008 8:24 AM To: [EMAIL

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Nathan Rixham [EMAIL PROTECTED] wrote: Shiplu wrote: The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP Warning: preg_match():

RE: [PHP] Regular Expression Backreference in subpattern.

2008-09-27 Thread Richard Lynch
Not sure what you think the (?P is doing, but it looks very suspicious to me... I'm no PCRE expert though... Try this: '|td\\s*charge\\s*/td\\s*td\\s*([0-9]*)\\s*/td|' \\s allows for whitespace If you only want ones that HAVE to have numbers, and no blanks, change * after the 0-9] bit into +

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Al [EMAIL PROTECTED] wrote: What's the complete row? e.g., trtdcharge/tdtd100/td/tr Or, are there other td cells in the row? No TD cells. forget the real world problem. I made the exact replica of that. I need the sample work. -- Blog: http://talk.cmyweb.net/ Follow me:

Re: [PHP] Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Richard Lynch [EMAIL PROTECTED] wrote: Not sure what you think the (?P is doing, but it looks very suspicious to me... I'm no PCRE expert though... Try this: '|td\\s*charge\\s*/td\\s*td\\s*([0-9]*)\\s*/td|' \\s allows for whitespace If you only want ones that HAVE to

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Al
Shiplu wrote: The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in

Re: [PHP] Prevent execution bad commands

2008-09-27 Thread Stut
On 27 Sep 2008, at 10:15, Manoj Singh wrote: I am developing a web page where i have to display the files list based on some search criteria and of certain duration. My web server is on linux operating system. The command i am using for this peropse is: find /home/test -mtime -$duration |

Re[4]: [PHP] Don't understand what is this $arr['N']['#']

2008-09-27 Thread ANR Daemon
Greetings, Richard Heyes. In reply to Your message dated Friday, September 26, 2008, 12:41:32, Please don't top post any more. thank you. Because it's such a cardinal sin and will result in you being sent straight to hell. I've heard that it's not so nice there at this time of year, though

[PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Nathan Rixham
Shiplu wrote: The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP Warning: preg_match(): Compilation failed: syntax error after (?P at offset 25 in

[PHP] Re[2]: Unicode problems

2008-09-27 Thread ANR Daemon
Greetings, Thiago H. Pojda. In reply to Your message dated Friday, September 26, 2008, 18:33:22, I had similar problems, I cant get the whole situation out of what you wrote but here are two hints. If you got SSH Access you can try to import the DB by following command I don't have SSH

Re: [PHP] The Data Literacy Test: Interpretation Added

2008-09-27 Thread tedd
At 1:06 PM +0800 9/27/08, Shelley wrote: 2008/9/26 tedd mailto:[EMAIL PROTECTED][EMAIL PROTECTED] there are three that you apparently don't know. ??? What is three, excuse me? You say in your link: 20-24 Your are an expert blah blah... So you know 24 of them. I say there are 27 -- so, the

Re: [PHP] Convert local dates into GMT+1 dates

2008-09-27 Thread ANR Daemon
Greetings, debussy007. In reply to Your message dated Friday, September 26, 2008, 16:52:18, I have local dates (Belgium), which I want to convert to GMT+1 date. The dates are stored in the DB and are of the following format: '2008-06-24 23:30:02' Does that means your dates stored as strings?

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
On 9/27/08, Nathan Rixham [EMAIL PROTECTED] wrote: Shiplu wrote: The string is tdcharge/tdtd100/td. I want and array( charge=100). I am using this regular expression, '/td([^]+)\/tdtd(?P\1\d+)\/td/'. But its not working.. I get this error., PHP Warning: preg_match():

Re: [PHP] Re: Regular Expression Backreference in subpattern.

2008-09-27 Thread Shiplu
Sorry The previous code was wrong, Its the correct version, $x = a b;c d;e f;; preg_match('/(?Pkeys\w) (?Pvalues\w)/',$x,$m); print_r($m); Now I am using backrefrence \1 in in ?P option like (?P\1\d+). and I got the error. -- Blog: http://talk.cmyweb.net/ Follow me: http://twitter.com/shiplu

Re: Re[4]: [PHP] Don't understand what is this $arr['N']['#']

2008-09-27 Thread Ashley Sheridan
On Sat, 2008-09-27 at 23:10 +0400, ANR Daemon wrote: Greetings, Richard Heyes. In reply to Your message dated Friday, September 26, 2008, 12:41:32, Please don't top post any more. thank you. Because it's such a cardinal sin and will result in you being sent straight to hell. I've heard

Re: [PHP] Don't understand what is this $arr['N']['#']

2008-09-27 Thread Shawn McKenzie
Ashley Sheridan wrote: On Sat, 2008-09-27 at 23:10 +0400, ANR Daemon wrote: Greetings, Richard Heyes. In reply to Your message dated Friday, September 26, 2008, 12:41:32, Please don't top post any more. thank you. Because it's such a cardinal sin and will result in you being sent straight

Re: [PHP] Don't understand what is this $arr['N']['#']

2008-09-27 Thread Ashley Sheridan
On Sat, 2008-09-27 at 18:09 -0500, Shawn McKenzie wrote: Ashley Sheridan wrote: On Sat, 2008-09-27 at 23:10 +0400, ANR Daemon wrote: Greetings, Richard Heyes. In reply to Your message dated Friday, September 26, 2008, 12:41:32, Please don't top post any more. thank you. Because it's

Re: [PHP] The Data Literacy Test: Interpretation Added

2008-09-27 Thread Shelley
2008/9/28 tedd [EMAIL PROTECTED] At 1:06 PM +0800 9/27/08, Shelley wrote: 2008/9/26 tedd mailto:[EMAIL PROTECTED][EMAIL PROTECTED] there are three that you apparently don't know. ??? What is three, excuse me? You say in your link: 20-24 Your are an expert blah blah... So you know 24

Re: [PHP] How to submit form via PHP

2008-09-27 Thread Waynn Lue
No it doesn't... without an action statement... Sorry to drag up an old thread, but I just saw this. Is that true of all browsers? I'm wondering because I just coded a site to use this behavior, then I saw that the html specification says the action attribute is required. Thanks, Waynn On