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

2008-09-25 Thread Robert Cummings
On Fri, 2008-09-26 at 14:02 +0800, Shelley wrote: > Fyi, > > The interpretation of the score is added. > Welcome to check your programming knowledge level: > http://www.phparch.cn/index.php/php/34-php-basics/202-the-data-literacy-test > > :) >From the interpretation: 20–24 You are an expe

Re: [PHP] Re: PHP on 64bit Ubuntu

2008-09-25 Thread Robert Cummings
On Thu, 2008-09-25 at 23:17 -0700, steve wrote: > > The opposite might be true of user > > code though as developers become presumptive of the compiler doing their > > work for them :) > > Like PHP... which does absolutely no optimizations. You must not be using an optimizer. It may not be PHP sp

Re: [PHP] Re: PHP on 64bit Ubuntu

2008-09-25 Thread steve
> The opposite might be true of user > code though as developers become presumptive of the compiler doing their > work for them :) Like PHP... which does absolutely no optimizations. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] The Data Literacy Test: Interpretation Added

2008-09-25 Thread Shelley
Fyi, The interpretation of the score is added. Welcome to check your programming knowledge level: http://www.phparch.cn/index.php/php/34-php-basics/202-the-data-literacy-test :) -- With best regards, Shelley Shyan http://phparch.cn

[PHP] Re: [PHP-DEV] Re: [PHP] PHP 5.3.0alpha2

2008-09-25 Thread steve
OK, I finally went to do it and this link doesn't work: PHP 5.3.0alpha2 VC9 x86 http://downloads.php.net/pierre/php-5.3.0alpha2-nts-Win32-VC9.zip On Thu, Sep 4, 2008 at 5:23 AM, Johannes Schlüter <[EMAIL PROTECTED]> wrote: > On Wed, 2008-09-03 at 23:36 -0700, steve wrote: >> It is pretty much

Re: [PHP] calling functions from one or multiple files

2008-09-25 Thread Robert Cummings
On Fri, 2008-09-26 at 02:10 +0200, Jochem Maas wrote: > Ashley Sheridan schreef: > > On Fri, 2008-09-26 at 01:05 +0200, Jochem Maas wrote: > >> tedd schreef: > >>> At 3:44 PM -0400 9/24/08, Robert Cummings wrote: > Seems kind of silly to have every function in it's own file. Also seems >

Re: [PHP] calling functions from one or multiple files

2008-09-25 Thread Robert Cummings
On Fri, 2008-09-26 at 01:05 +0200, Jochem Maas wrote: > tedd schreef: > > At 3:44 PM -0400 9/24/08, Robert Cummings wrote: > >> Seems kind of silly to have every function in it's own file. Also seems > >> kind of cluttered ot have every function in one file. > >> > >> Now grouping related functions

Re: [PHP] Unicode problems

2008-09-25 Thread Chris
Thiago H. Pojda wrote: This is slightly OT but I honestly don't know what else I can do. I was asked to migrate a website from diff hosts. Okay, pretty easy, right? Well, as usual, it wasn't. Site pages content type was ISO-8559-1 and it was developed for a MySQL5 database that used latin1 as c

[PHP] Unicode problems

2008-09-25 Thread Thiago H. Pojda
This is slightly OT but I honestly don't know what else I can do. I was asked to migrate a website from diff hosts. Okay, pretty easy, right? Well, as usual, it wasn't. Site pages content type was ISO-8559-1 and it was developed for a MySQL5 database that used latin1 as charset and InnoDB as stor

Re: [PHP] The Data Literacy Test

2008-09-25 Thread Bill Guion
At 9:22 AM +0800 9/25/08, Shelley wrote: 2008/9/25 Philip Thompson <[EMAIL PROTECTED]> On Sep 24, 2008, at 7:29 AM, Maciek Sokolewicz wrote: tedd wrote: At 12:25 PM +0100 9/24/08, Ashley Sheridan wrote: On Wed, 2008-09-24 at 09:20 +0800, Shelley wrote: < http://phparch.cn/index

Re: [PHP] Filters and sanitizing a regexp

2008-09-25 Thread Micah Gersten
I'd return an error. You can use this function to make sure they entered a valid date: http://us.php.net/checkdate Provide a template like: (Month/Day/Year) or for EU (Day/Month/Year) If it's not valid, return an error and let them fix it. Chances are, if they entered more characters than a dat

Re: [PHP] Filters and sanitizing a regexp

2008-09-25 Thread Bastien Koert
On Thu, Sep 25, 2008 at 3:57 PM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > > Behalf Of Richard Heyes > > Sent: Thursday, September 25, 2008 2:28 PM > > To: Boyd, Todd M. > > Cc: Frank Stanovcak; php-general@li

Re: [PHP] calling functions from one or multiple files

2008-09-25 Thread Jochem Maas
Ashley Sheridan schreef: > On Fri, 2008-09-26 at 01:05 +0200, Jochem Maas wrote: >> tedd schreef: >>> At 3:44 PM -0400 9/24/08, Robert Cummings wrote: Seems kind of silly to have every function in it's own file. Also seems kind of cluttered ot have every function in one file. No

Re: [PHP] calling functions from one or multiple files

2008-09-25 Thread Ashley Sheridan
On Fri, 2008-09-26 at 01:05 +0200, Jochem Maas wrote: > tedd schreef: > > At 3:44 PM -0400 9/24/08, Robert Cummings wrote: > >> Seems kind of silly to have every function in it's own file. Also seems > >> kind of cluttered ot have every function in one file. > >> > >> Now grouping related functions

Re: [PHP] calling functions from one or multiple files

2008-09-25 Thread Jochem Maas
tedd schreef: > At 3:44 PM -0400 9/24/08, Robert Cummings wrote: >> Seems kind of silly to have every function in it's own file. Also seems >> kind of cluttered ot have every function in one file. >> >> Now grouping related functions into a single file... that's sounds like >> a good middle ground.

Re: [PHP] The Data Literacy Test

2008-09-25 Thread Jochem Maas
Ashley Sheridan schreef: > On Wed, 2008-09-24 at 21:45 -0400, Eric Butera wrote: >> On Wed, Sep 24, 2008 at 9:22 PM, Shelley <[EMAIL PROTECTED]> wrote: >>> 2008/9/25 Philip Thompson <[EMAIL PROTECTED]> >>> On Sep 24, 2008, at 7:29 AM, Maciek Sokolewicz wrote: tedd wrote: >> At 1

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

2008-09-25 Thread ANR Daemon
Greetings, It flance. In reply to Your message dated Thursday, September 25, 2008, 0:21:59, >> > > -Original Message- >> > > I am working on the code of a former employee and >> I don't understand >> > > what this $arr['N']['#'] refers >> to. >> > > >> > > I know it is a multidimensional

RE: [PHP] Filters and sanitizing a regexp

2008-09-25 Thread Boyd, Todd M.
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Richard Heyes > Sent: Thursday, September 25, 2008 2:28 PM > To: Boyd, Todd M. > Cc: Frank Stanovcak; php-general@lists.php.net > Subject: Re: [PHP] Filters and sanitizing a regexp > > > ... > > Hi, >

Re: [PHP] Filters and sanitizing a regexp

2008-09-25 Thread Richard Heyes
> ... Hi, Had to have a play with this. Here's my (somewhat stricter) regex: preg_match('/((?:[0-3]?[0-9])?\d)-([0-1]?\d)-20\d\d/', '31-12-2000', $matches); if (!empty($matches[1]) AND $matches[1] > 31) $matches = array(); if (!empty($matches[2]) AND $matches[2] > 12) $matches = array(); You co

RE: [PHP] Filters and sanitizing a regexp

2008-09-25 Thread Boyd, Todd M.
> -Original Message- > From: Frank Stanovcak [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2008 12:41 PM > To: php-general@lists.php.net > Subject: [PHP] Filters and sanitizing a regexp > > Is it possible to use the php filter function to sanitize a regular > expression such as

RE: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Richard Lynch
Run another query and let MySQL add it up. > -Original Message- > From: Jason Pruim [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2008 10:05 AM > To: PHP General List > Subject: [PHP] Math problems (No not high school math!) > > So I'm trying to figure out how to do a little ma

[PHP] Re: Filters and sanitizing a regexp

2008-09-25 Thread Frank Stanovcak
by the by I'm using filter_var($string, FITER_VALIDATE_REGEXP, blah blah blah) ""Frank Stanovcak"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is it possible to use the php filter function to sanitize a regular > expression such as to return just the date part of a string tha

[PHP] Filters and sanitizing a regexp

2008-09-25 Thread Frank Stanovcak
Is it possible to use the php filter function to sanitize a regular expression such as to return just the date part of a string that may be passed by an nonobservant user? "#\d\d/\d\d/\d\d\d\d#" input would be something like as02/05/2008df I want to use the filter to give me just the date shou

[PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Lupus Michaelis
Jason Pruim a écrit : $totalday = $totalday/60/60; If you're working with legal dates, this is wrong. A day can be 23 or 25 hours long. Thing about time changing (winter and summer time). Use strtotime to avoid this kind of problems. -- Mickaël Wolff aka Lupus Michaelis htt

Re: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
On Sep 25, 2008, at 11:44 AM, Jim Lucas wrote: Jason Pruim wrote: On Sep 25, 2008, at 11:28 AM, Jim Lucas wrote: Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following

Re: [PHP] Wierd Variable Initialization

2008-09-25 Thread VamVan
Interesting. Thank you On Thu, Sep 25, 2008 at 2:01 AM, Ford, Mike <[EMAIL PROTECTED]> wrote: > On 25 September 2008 03:45, VamVan advised: > > > So guys, > > > > I found some thing strange that happened to me yesterday. Its small > but > > kinda freaked me out. > > > > So I have a tokenmap.php t

RE: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Simcha
> -Original Message- > From: Jason Pruim [mailto:[EMAIL PROTECTED] > Subject: [PHP] Math problems (No not high school math!) > > So I'm trying to figure out how to do a little math in php to add up > the number of hours that people have worked (Still on the timecard for > anyone followin

[PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Maciek Sokolewicz
Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps into a MySQL database, from there, I use a while

Re: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Jim Lucas
Jason Pruim wrote: > > On Sep 25, 2008, at 11:28 AM, Jim Lucas wrote: > >> Jason Pruim wrote: >>> So I'm trying to figure out how to do a little math in php to add up the >>> number of hours that people have worked (Still on the timecard for >>> anyone following along at home) >>> >>> I have it i

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

2008-09-25 Thread Daniel Brown
On Thu, Sep 25, 2008 at 4:28 AM, Valentin Schmid - ICSurselva AG <[EMAIL PROTECTED]> wrote: > 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? Since you're

Re: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
On Sep 25, 2008, at 11:28 AM, Jim Lucas wrote: Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps

Re: [PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
On Sep 25, 2008, at 11:24 AM, Jason Pruim wrote: On Sep 25, 2008, at 11:19 AM, Nathan Rixham wrote: Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at hom

Re: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Jim Lucas
Jason Pruim wrote: > So I'm trying to figure out how to do a little math in php to add up the > number of hours that people have worked (Still on the timecard for > anyone following along at home) > > I have it inserting time in and timeout as timestamps into a MySQL > database, from there, I use

Re: [PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
On Sep 25, 2008, at 11:19 AM, Nathan Rixham wrote: Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timest

[PHP] Re: Math problems (No not high school math!)

2008-09-25 Thread Nathan Rixham
Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps into a MySQL database, from there, I use a while

Re: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Stephen
Jason Pruim wrote: So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps into a MySQL database, from there, I use a while

[PHP] Math problems (No not high school math!)

2008-09-25 Thread Jason Pruim
So I'm trying to figure out how to do a little math in php to add up the number of hours that people have worked (Still on the timecard for anyone following along at home) I have it inserting time in and timeout as timestamps into a MySQL database, from there, I use a while loop to display

Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Daniel Brown
On Thu, Sep 25, 2008 at 6:34 AM, Merlin Morgenstern <[EMAIL PROTECTED]> wrote: > Hello Jochem, > > thank you this has solved my problem: > bla.php 2 > $tf = $argv[1]; Conversely, on a *NIX system, if you want to grab it via the web - locally or from a remote server - you can do this: * * * *

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

2008-09-25 Thread Richard Lynch
> -Original Message- > 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? I suspect... PHP pretty much releases control to the shell or whatever, and just waits aroun

RE: [PHP] calling functions from one or multiple files

2008-09-25 Thread tedd
At 3:44 PM -0400 9/24/08, Robert Cummings wrote: Seems kind of silly to have every function in it's own file. Also seems kind of cluttered ot have every function in one file. Now grouping related functions into a single file... that's sounds like a good middle ground. Cheers, Rob. The Goldie

Re: [PHP] curl_exec hangs/freezes on shared hosting

2008-09-25 Thread Rene Veerman
It's actually the server i'm calling that's at fault, it didn't serve connections from the outside world.. So not a php thing at all, sry for the wasted time.. Rene Veerman wrote: I use the following script to make forward an ajax call from the browser to a server other than my main webserver.

Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Merlin Morgenstern
Hello Jochem, thank you this has solved my problem: bla.php 2 $tf = $argv[1]; Best regards, Merlin Jochem Maas wrote: Merlin Morgenstern schreef: Hi there, I would like to run a php file via cron job and there is a parameter to be passed. Unfortunatelly this does not work: # /usr/local/bin

Re: [PHP] Re: curl_exec hangs/freezes on shared hosting

2008-09-25 Thread Rene Veerman
Nathan Rixham wrote: do a phpinfo() and check if sockets are enabled.. lots of shared hosts have them turned off yep, sockets are enabled on the shared hoster. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Jochem Maas
Merlin Morgenstern schreef: > Hi there, > > I would like to run a php file via cron job and there is a parameter to > be passed. Unfortunatelly this does not work: > > # /usr/local/bin/php /home/www/create_notification_emails.php?tf=2 > Could not open input file: /home/www/create_notification_ema

Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Aschwin Wesselius
Merlin Morgenstern wrote: Hi there, I would like to run a php file via cron job and there is a parameter to be passed. Unfortunatelly this does not work: # /usr/local/bin/php /home/www/create_notification_emails.php?tf=2 Could not open input file: /home/www/create_notification_emails.php?tf=2

[PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Merlin Morgenstern
Hi there, I would like to run a php file via cron job and there is a parameter to be passed. Unfortunatelly this does not work: # /usr/local/bin/php /home/www/create_notification_emails.php?tf=2 Could not open input file: /home/www/create_notification_emails.php?tf=2 The problem seems to be t

[PHP] Re: curl_exec hangs/freezes on shared hosting

2008-09-25 Thread Nathan Rixham
Rene Veerman wrote: I use the following script to make forward an ajax call from the browser to a server other than my main webserver. On my homeserver (debian/apache2/php5 with rootxs) it runs fine, but on my shared hosting (servage.net, phpinfo at http://mediabeez.veerman.ws/mb/sn.php) it f

Re: [PHP] spreadsheets are opened read only

2008-09-25 Thread David Robley
Thodoris wrote: > >> If you are trying to open a file that has a URL instead of a local path, >> then it will always be opened as read-only, and there is no way to >> change this. If you are opening it using a local path (samba, nfs, fish, >> etc) then I would check to see the file permissions. A

[PHP] curl_exec hangs/freezes on shared hosting

2008-09-25 Thread Rene Veerman
I use the following script to make forward an ajax call from the browser to a server other than my main webserver. On my homeserver (debian/apache2/php5 with rootxs) it runs fine, but on my shared hosting (servage.net, phpinfo at http://mediabeez.veerman.ws/mb/sn.php) it freezes / hangs on cur

RE: [PHP] Wierd Variable Initialization

2008-09-25 Thread Ford, Mike
On 25 September 2008 03:45, VamVan advised: > So guys, > > I found some thing strange that happened to me yesterday. Its small but > kinda freaked me out. > > So I have a tokenmap.php that I include include in different configuration > files. Some are classes and some are simple php files. > >

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

2008-09-25 Thread Valentin Schmid - ICSurselva AG
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: ma