php-general Digest 25 Oct 2006 07:45:12 -0000 Issue 4420

2006-10-25 Thread php-general-digest-help
php-general Digest 25 Oct 2006 07:45:12 - Issue 4420 Topics (messages 243588 through 243601): Problems with mail function 243588 by: Ricardo Ríos 243589 by: John Nichel 243592 by: Jochem Maas 243595 by: Chris foreach on a 3d array 243590 by: Dotan

php-general Digest 25 Oct 2006 19:46:23 -0000 Issue 4421

2006-10-25 Thread php-general-digest-help
php-general Digest 25 Oct 2006 19:46:23 - Issue 4421 Topics (messages 243602 through 243621): [php] passing variables doesn't work 243602 by: WILLEMS Wim \(BMB\) 243604 by: Chris 243605 by: Max Belushkin 243607 by: Jochem Maas 243611 by: Ivo F.A.C.

Re: [PHP] foreach on a 3d array

2006-10-25 Thread Ivo F.A.C. Fokkema
On Tue, 24 Oct 2006 23:55:49 +0200, M.Sokolewicz wrote: Dotan Cohen wrote: On 24/10/06, Chris Boget [EMAIL PROTECTED] wrote: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){

[PHP] Re: strtotime

2006-10-25 Thread Ivo F.A.C. Fokkema
On Tue, 24 Oct 2006 20:36:08 -0400, Ron Piggott (PHP) wrote: I have used the strtotime command to calculate a week ago (among other things) with syntax like this: $one_week_ago = strtotime(-7 days); $one_week_ago = date('Y-m-d', $one_week_ago); How would you use this command to figure

[PHP] [PEAR] QUICKFORM JSCALENDAR with multiple dates feature

2006-10-25 Thread Marco Sottana
i find jscalendar element for HTML_QuickForm http://www.netsols.de/pear/jscalendar/ i need to use multiple dates feature http://www.dynarch.com/demos/jscalendar/multiple-dates.html anyone can help me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] [php] passing variables doesn't work

2006-10-25 Thread WILLEMS Wim \(BMB\)
Dear all, I am trying to pass variables from one php-file to another but that doesn't seem to work. Anyone an idea what I am doing wrong? The first file shows a dropdown with all the databases on the server (only 1 for me). You have to select a database and put an SQL query in the textarea.

Re: [PHP] [PEAR] QUICKFORM JSCALENDAR with multiple dates feature

2006-10-25 Thread Chris
Marco Sottana wrote: i find jscalendar element for HTML_QuickForm http://www.netsols.de/pear/jscalendar/ Ask on the pear-general list, you'll get more responses. http://pear.php.net/support/lists.php and please don't cross-post. -- Postgresql php tutorials http://www.designmagick.com/ --

Re: [PHP] [php] passing variables doesn't work

2006-10-25 Thread Chris
WILLEMS Wim (BMB) wrote: Dear all, I am trying to pass variables from one php-file to another but that doesn't seem to work. Anyone an idea what I am doing wrong? The first file shows a dropdown with all the databases on the server (only 1 for me). You have to select a database and put an

Re: [PHP] [php] passing variables doesn't work

2006-10-25 Thread Max Belushkin
Whatever form information you want to pass has to be part of the form. WILLEMS Wim (BMB) wrote: select name=database size=1 In the second script, the value of this will be in $_POST[database]. ?php $wim = 5; /* this is added to test the passing of the variables - doesn't work either */

[PHP] Problem with EXEC and PASSTHRU

2006-10-25 Thread Matt Beechey
I am writing a php website for users to edit a global whitelist for Spam Assassin - all is going fairly well considering I hadn't ever used php until a couple of days ago. My problem is I need to restart AMAVISD-NEW after the user saves the changes. I've acheived this using SUDO and giving the

Re: [PHP] [php] passing variables doesn't work

2006-10-25 Thread Jochem Maas
http://google.com/search?q=phpmyadmin phpmyadmin has all the functionality you are trying to build - and it implements it securely - even if you are writing the code/tool mentioned below as a learning exercise (as opposed to writing it because you need to be able to execute arbitrary queries

Re: [PHP] Problem with EXEC and PASSTHRU

2006-10-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-25 20:35:29 +1300: I am writing a php website for users to edit a global whitelist for Spam Assassin - all is going fairly well considering I hadn't ever used php until a couple of days ago. My problem is I need to restart AMAVISD-NEW after the user saves the

RE: [PHP] IMAP extension causing delays

2006-10-25 Thread Edward Kay
-Original Message- From: Edward Kay [mailto:[EMAIL PROTECTED] Sent: 19 October 2006 14:53 To: php-general@lists.php.net Subject: [PHP] IMAP extension causing delays Hello, I need PHP's IMAP extension for my web app but it is really slowing my server up. My setup: Fedora Core 5,

[PHP] Re: Problem with EXEC and PASSTHRU

2006-10-25 Thread Ivo F.A.C. Fokkema
On Wed, 25 Oct 2006 20:35:29 +1300, Matt Beechey wrote: I am writing a php website for users to edit a global whitelist for Spam Assassin - all is going fairly well considering I hadn't ever used php until a couple of days ago. My problem is I need to restart AMAVISD-NEW after the user saves

Re: [PHP] [php] passing variables doesn't work

2006-10-25 Thread Ivo F.A.C. Fokkema
On Wed, 25 Oct 2006 10:19:24 +0200, Max Belushkin wrote: Whatever form information you want to pass has to be part of the form. WILLEMS Wim (BMB) wrote: select name=database size=1 In the second script, the value of this will be in $_POST[database]. ... which will contain absolutely

Re: [PHP] foreach on a 3d array

2006-10-25 Thread Dotan Cohen
On 25/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: Because that wouldn't work :) This variable may contain stuff like nl,en-us;q=0.7,en;q=0.3. You'll need to do something with this variable first to use array_key_exists (or as you do, isset). That said, I agree that strstr() might not be

Re: [PHP] foreach on a 3d array

2006-10-25 Thread Ivo F.A.C. Fokkema
On Wed, 25 Oct 2006 13:53:47 +0200, Dotan Cohen wrote: On 25/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: Because that wouldn't work :) This variable may contain stuff like nl,en-us;q=0.7,en;q=0.3. You'll need to do something with this variable first to use array_key_exists (or as

Re: [PHP] foreach on a 3d array

2006-10-25 Thread Dotan Cohen
On 25/10/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: Ah, in that case using $HTTP_ACCEPT_LANGUAGE relies on the register_globals setting, which is a security risk (and turned off by default). Please read up on this, so you know what you're up against... See:

Re: [PHP] strtotime

2006-10-25 Thread clive
Ron Piggott (PHP) wrote: I have used the strtotime command to calculate a week ago (among other things) with syntax like this: $one_week_ago = strtotime(-7 days); $one_week_ago = date('Y-m-d', $one_week_ago); How would you use this command to figure out the last day of the month in two months

[PHP] Re: Problem with EXEC and PASSTHRU

2006-10-25 Thread Myron Turner
Matt Beechey wrote: I am writing a php website for users to edit a global whitelist for Spam Assassin - all is going fairly well considering I hadn't ever used php until a couple of days ago. My problem is I need to restart AMAVISD-NEW after the user saves the changes. I've acheived this using

Re: [PHP] strtotime

2006-10-25 Thread Google Kreme
On 24 Oct 2006, at 19:07 , Brad Chow wrote: $date=(2006-10-26); $date=strtotime($date); $date=date('Y-m-1',$date); $now=strtotime(+3 month, strtotime($date)); $lastday=strtotime(-1 day, $now); echo date('Y-m-d',$lastday); //2006-12-31 Yep, that's pretty much exactly what I do. I suspect there

Re: [PHP] PHP 5 Hosting

2006-10-25 Thread Ed Lazor
Hi, I wanted to give some feedback on PHP 5 hosting in case it helps someone. I signed up with DreamHost last Thursday. I also signed up with OCS Solutions to compare the two services. I also maintain a server with CalPop. When I signed up with Dreamhost, I discovered that you have to

[PHP] How does the Zend engine behave?

2006-10-25 Thread jeff . phplist
Hi, I'm using PHP 4.x and I'm trying to understand a bit about memory usage... Firstly, when I say 'include files' below, I mean all forms, include, require and the _once versions. That said, when a script runs and it's made of several include files, what happens? Are the include files

[PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Gert Cuykens
i do not get any output from mysql except form echo $bin that displays 1 ? ?php exec(mysql -h hhh -u uuu - test.php,$out,$bin); print_r($out); echo $bin; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread David Giragosian
What is the SQL you are running in test.php? David On 10/25/06, Gert Cuykens [EMAIL PROTECTED] wrote: i do not get any output from mysql except form echo $bin that displays 1 ? ?php exec(mysql -h hhh -u uuu - test.php,$out,$bin); print_r($out); echo $bin; ? -- PHP General Mailing List

[PHP] Re: Problem with EXEC and PASSTHRU

2006-10-25 Thread Matt Beechey
Ok - This is a reply to ALL - Thanks for the great help - I now understand why it wasn't displaying - it was all due to caching of data at the client end before displaying in blocks. With some help in the comments of the php manual for flush() I found a nice script that uses echo

Re: [PHP] How does the Zend engine behave?

2006-10-25 Thread Jon Anderson
Take this with a grain of salt. I develop with PHP, but I am not an internals guy... [EMAIL PROTECTED] wrote: Are the include files only compiled when execution hits them, or are all include files compiled when the script is first compiled, which would mean a cascade through all statically

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Gert Cuykens
actually something like 'asdadsuiashdiasdh' :) test.php is just some text file i maybe should have renamed it to test.txt sorry. But the thing is i dont get any feedback like 'cant connect to host' or 'invalid sql' etc. exec(mysqldump...) works but exec(mysql...) doesnt On 10/25/06, David

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread David Giragosian
What do you get if you run: echo exec(mysql -h hhh -u uuu - test.php,$out,$bin); On 10/25/06, Gert Cuykens [EMAIL PROTECTED] wrote: actually something like 'asdadsuiashdiasdh' :) test.php is just some text file i maybe should have renamed it to test.txt sorry. But the thing is i dont

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Gert Cuykens
when i do echo exec... i get a blank screen (print_r $out i get Array() echo $bin i get 1) On 10/25/06, David Giragosian [EMAIL PROTECTED] wrote: What do you get if you run: echo exec(mysql -h hhh -u uuu - test.php,$out,$bin); On 10/25/06, Gert Cuykens [EMAIL PROTECTED] wrote:

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Stut
Gert Cuykens wrote: i do not get any output from mysql except form echo $bin that displays 1 ? ?php exec(mysql -h hhh -u uuu - test.php,$out,$bin); print_r($out); echo $bin; ? I don't know for sure but chances are that mysql outputs errors on stderr not stdout, so you need to redirect

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread David Giragosian
Can't say why you're not getting an error message, but when I have a valid user, password, host, and sql in a .txt file, I get the last record from the select statement I run output in the browser. Maybe start with getting it to work with everything used correctly, then work backwards. HTH, On

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Gert Cuykens
BINGO :) ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] = ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 Can you explain a bit more what this do ? 21 For example will i only get stderr or do i get stdout and stderr messages ? On 10/25/06, Stut [EMAIL PROTECTED]

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Stut
Gert Cuykens wrote: BINGO :) Indeed. ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] = ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 Can you explain a bit more what this do ? 21 For example will i only get stderr or do i get stdout and stderr messages ?

Re: [PHP] exec(mysql -h hhh -u uuu -pppp test.php,$out,$bin);

2006-10-25 Thread Gert Cuykens
ok thx all, works great now :) On 10/25/06, Stut [EMAIL PROTECTED] wrote: Gert Cuykens wrote: BINGO :) Indeed. ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] = ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 Can you explain a bit more what this do ? 21 For

[PHP] OPTION

2006-10-25 Thread Ron Piggott (PHP)
I am creating a form right now. I am using the html SELECT tag. SELECT NAME=day_of_month The most number of days in a month is 31 I want the output to be OPTION SELECTED## based on the value of $selected_day_of_month variable. For the days of the month where the number is not selected the

Re: [PHP] OPTION

2006-10-25 Thread Stut
Ron Piggott (PHP) wrote: I am creating a form right now. I am using the html SELECT tag. SELECT NAME=day_of_month The most number of days in a month is 31 I want the output to be OPTION SELECTED## based on the value of $selected_day_of_month variable. For the days of the month where the

Re: [PHP] foreach on a 3d array

2006-10-25 Thread M.Sokolewicz
M.Sokolewicz wrote: Dotan Cohen wrote: On 24/10/06, Chris Boget [EMAIL PROTECTED] wrote: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE,

Re: Re: [PHP] OPTION

2006-10-25 Thread Joe Wollard
...and if you wanted to go an extra step you could try an alternate syntax of the exact same code: ?php foreach (range(1, 31) as $day) print 'option value=' . $day . '' . ($selected_day_of_month == $day ? ' selected' : '') . '' . $day . '/option'; ? Either way, Stut is correct. Don't

Re: [PHP] OPTION

2006-10-25 Thread Paul Novitski
At 10/25/2006 04:09 PM, Stut wrote: Dang that's painful!! Try this... ?php foreach (range(1, 31) as $day) { print 'option value='.$day.''; if ($selected_day_of_month == $day) print ' selected'; print ''.$day.'/option'; } ? Ouch! Gnarly mix of

Re: [PHP] OPTION

2006-10-25 Thread Robert Cummings
On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski wrote: At 10/25/2006 04:09 PM, Stut wrote: Dang that's painful!! Try this... ?php foreach (range(1, 31) as $day) { print 'option value='.$day.''; if ($selected_day_of_month == $day) print '

Re: [PHP] How does the Zend engine behave?

2006-10-25 Thread Larry Garfield
On Wednesday 25 October 2006 14:48, Jon Anderson wrote: Take this with a grain of salt. I develop with PHP, but I am not an internals guy... [EMAIL PROTECTED] wrote: Are the include files only compiled when execution hits them, or are all include files compiled when the script is first

[PHP] Job Opening

2006-10-25 Thread Larry Garfield
Well since the consensus seemed to be to allow job postings, I'll make one. :-) My company is looking for a few good PHP programmers. We are a Chicago-area web consulting firm developing web sites and web applications for a variety of clients, including several large academic institutions.  

[PHP] heredoc usage [WAS: OPTION]

2006-10-25 Thread Paul Novitski
At 10/25/2006 04:09 PM, Stut wrote: print 'option value='.$day.''; if ($selected_day_of_month == $day) print ' selected'; print ''.$day.'/option'; On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski wrote: print hdDay